From 64803e893cd4babf375789be711313034ccf27ca Mon Sep 17 00:00:00 2001 From: Sascha-Oliver Prolic Date: Wed, 13 May 2020 17:51:04 -0400 Subject: [PATCH 1/2] fix php docblock token and signature also allow `Key` as key, not only strings --- src/Token.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Token.php b/src/Token.php index 2f6299b1..24bd58b1 100644 --- a/src/Token.php +++ b/src/Token.php @@ -12,6 +12,7 @@ use DateTimeInterface; use Generator; use Lcobucci\JWT\Claim\Validatable; +use Lcobucci\JWT\Signer\Key; use OutOfBoundsException; /** @@ -182,7 +183,7 @@ public function getClaim($name, $default = null) * Verify if the key matches with the one that created the signature * * @param Signer $signer - * @param string $key + * @param Key|string $key * * @return boolean * From 96255bd6ff4835335bf514895d5e9650b9c52d54 Mon Sep 17 00:00:00 2001 From: Sascha-Oliver Prolic Date: Wed, 13 May 2020 17:52:19 -0400 Subject: [PATCH 2/2] Update Signature.php --- src/Signature.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Signature.php b/src/Signature.php index 42f2b22a..60f9b936 100644 --- a/src/Signature.php +++ b/src/Signature.php @@ -7,6 +7,8 @@ namespace Lcobucci\JWT; +use Lcobucci\JWT\Signer\Key; + /** * This class represents a token signature * @@ -38,7 +40,7 @@ public function __construct($hash) * * @param Signer $signer * @param string $payload - * @param string $key + * @param Key|string $key * * @return boolean */