From 997205b843bd99c2b3c1ef13364198bbf9eea15b Mon Sep 17 00:00:00 2001 From: adelstone Date: Thu, 11 Jan 2024 00:21:57 +0100 Subject: [PATCH 1/2] Fix AppleAccessToken.php Fixes: JWT::decode does not accept array as third parameter --- src/Token/AppleAccessToken.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Token/AppleAccessToken.php b/src/Token/AppleAccessToken.php index cbb8b9b..228f972 100644 --- a/src/Token/AppleAccessToken.php +++ b/src/Token/AppleAccessToken.php @@ -42,12 +42,15 @@ public function __construct(array $keys, array $options = []) $decoded = null; $last = end($keys); + $headers = new \stdClass(); + $headers->alg = 'ES256'; + foreach ($keys as $key) { try { try { $decoded = JWT::decode($options['id_token'], $key); } catch (\UnexpectedValueException $e) { - $decoded = JWT::decode($options['id_token'], $key, ['RS256']); + $decoded = JWT::decode($options['id_token'], $key, $headers); } break; } catch (\Exception $exception) { @@ -56,6 +59,7 @@ public function __construct(array $keys, array $options = []) } } } + if (null === $decoded) { throw new \Exception('Got no data within "id_token"!'); } From 152136fde9a81509def732b4bc3a83935ec4e71c Mon Sep 17 00:00:00 2001 From: Alex Cern Date: Thu, 11 Jan 2024 19:41:16 +0100 Subject: [PATCH 2/2] Changed project's maintainer info --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index c34a244..3fe9980 100644 --- a/composer.json +++ b/composer.json @@ -4,9 +4,9 @@ "license": "MIT", "authors": [ { - "name": "Patrick Bußmann", - "email": "patrick.bussmann@bussmann-it.de", - "homepage": "https://github.com/patrickbussmann" + "name": "Rainer Adelstone", + "email": "rainer.adelstone@gmail.com", + "homepage": "https://github.com/adelstone" } ], "keywords": [