public function getCompact($key)
    {
        $headers   = self::base64Encode(Parser::encode($this->headers));
        $claim     = self::base64Encode($this->claim);
        $signature = $this->getEncodedSignature($key);

        return $headers . '.' . $claim . '.' . $signature;
    }