loadAndDecryptUsingKey() public method

public loadAndDecryptUsingKey ( $input, Jose\Object\JWKInterface $jwk, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, &$recipient_index = null )
$jwk Jose\Object\JWKInterface
$allowed_key_encryption_algorithms array
$allowed_content_encryption_algorithms array
 /**
  * Decode a JSON Web Token.
  *
  * @param  Token  $token
  * @return array
  * @throws \Tymon\JWTAuth\Exceptions\JWTException
  */
 public function decode($token)
 {
     try {
         $loader = new Loader();
         $verifiedJWS = $loader->loadAndVerifySignatureUsingKey((string) $token, $this->signatureKey, [$this->signatureKey->get('alg')]);
         $jwe = $loader->loadAndDecryptUsingKey($verifiedJWS->getPayload(), $this->encryptionKey, ['dir'], [$this->encryptionKey->get('alg')]);
     } catch (Exception $e) {
         throw new TokenInvalidException('Could not decode token: ' . $e->getMessage());
     }
     return $jwe->getPayload();
 }