public function getJson($key)
    {
        $signature = array();
        $signature['protected'] = self::base64Encode(Parser::encode($this->headers));
        $signature['payload']   = self::base64Encode($this->claim);
        $signature['signature'] = $this->getEncodedSignature($key);

        return Parser::encode($signature);
    }
public function getJson($key)
    {
        $signature = array();
        $signature['protected'] = self::base64Encode(Parser::encode($this->headers));
        $signature['payload']   = self::base64Encode($this->claim);
        $signature['signature'] = $this->getEncodedSignature($key);

        return Parser::encode($signature);
    }
public function getJson ( $ key ) { $ signature = array ( ) ; $ signature [ 'protected' ] = self :: base64Encode ( Parser :: encode ( $ this -> headers ) ) ; $ signature [ 'payload' ] = self :: base64Encode ( $ this -> claim ) ; $ signature [ 'signature' ] = $ this -> getEncodedSignature ( $ key ) ; return Parser :: encode ( $ signature ) ; }
Returns this signature in the JWS JSON Serialization format

@see http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-39#section-3.2
@param string $key
@return string
Returns this signature in the JWS JSON Serialization format