From 73ce1fc31289bf5177a883d2d7595eddce3abecc Mon Sep 17 00:00:00 2001 From: Frank Rochlitzer Date: Tue, 23 Apr 2024 08:52:25 +0200 Subject: [PATCH] Update AdfsResourceOwner.php Comment for base64URL decoding added --- src/Provider/AdfsResourceOwner.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Provider/AdfsResourceOwner.php b/src/Provider/AdfsResourceOwner.php index fbc6e83..b4b5830 100644 --- a/src/Provider/AdfsResourceOwner.php +++ b/src/Provider/AdfsResourceOwner.php @@ -93,6 +93,7 @@ protected function parseToken(AccessToken $accessToken) { continue; } $token = $token[1]; + // Convert Base64URL to Base64 by replacing “-” with “+” and “_” with “/” $json = base64_decode(strtr($token, '-_', '+/')); if (!is_string($json)) { @@ -122,4 +123,4 @@ public function getIdToken($token = null) { $values = $token->getValues(); return $values['id_token'] ?? null; } -} \ No newline at end of file +}