From c39f3a5b9428236f600329a06d79b6213bc8e5a2 Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Mon, 10 Jul 2023 15:54:04 +0930 Subject: [PATCH] fix: remove 5.x support and update decode method signature --- composer.json | 2 +- lib/JWTClaims.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e2db5adb..d9c292ee 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "ext-mbstring": "*", "guzzlehttp/guzzle": "^6.2 | ^7.0", "league/oauth2-client": "^2.5.0", - "firebase/php-jwt": "^5.0 | ^6.0" + "firebase/php-jwt": "^6.0" }, "require-dev": { "phpunit/phpunit": "^4.8", diff --git a/lib/JWTClaims.php b/lib/JWTClaims.php index 61707bae..e9ccb467 100644 --- a/lib/JWTClaims.php +++ b/lib/JWTClaims.php @@ -36,8 +36,7 @@ class JWTClaims private function verify($token) { $json = file_get_contents('https://identity.xero.com/.well-known/openid-configuration/jwks'); $jwks = json_decode($json, true); - $supportedAlgorithm = array('RS256'); - $verifiedJWT = JWT::decode($token, JWK::parseKeySet($jwks), $supportedAlgorithm); + $verifiedJWT = JWT::decode($token, JWK::parseKeySet($jwks)); return $verifiedJWT; }