Bug with some special char in the firstname or lastname

Add str_replace because token is encoded in base64 URL (and not just base64).
Solves the problem with some special char
Re: #101
isekai
Jonathan Daggerhart 6 years ago committed by GitHub
parent aca202f5ac
commit 4d7939e9e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -316,7 +316,16 @@ class OpenID_Connect_Generic_Client {
} }
// Extract the id_token's claims from the token // Extract the id_token's claims from the token
$id_token_claim = json_decode( base64_decode( $tmp[1] ), TRUE ); $id_token_claim = json_decode(
base64_decode(
str_replace( // because token is encoded in base64 URL (and not just base64)
array('-', '_'),
array('+', '/'),
$tmp[1]
)
)
, TRUE
);
return $id_token_claim; return $id_token_claim;
} }

Loading…
Cancel
Save