Skip to content

Commit

Permalink
Update AdfsResourceOwner.php
Browse files Browse the repository at this point in the history
Comment for base64URL decoding added
  • Loading branch information
theroch authored Apr 23, 2024
1 parent 4cd1d7c commit 73ce1fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Provider/AdfsResourceOwner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -122,4 +123,4 @@ public function getIdToken($token = null) {
$values = $token->getValues();
return $values['id_token'] ?? null;
}
}
}

0 comments on commit 73ce1fc

Please sign in to comment.