use urlsafe_base64decode for keycloak id tokens to support certain utf8 characters w/ burnettk (#852)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
parent
0b296f4c46
commit
6bafd7b144
|
@ -456,7 +456,9 @@ def _parse_id_token(token: str) -> Any:
|
||||||
|
|
||||||
payload = parts[1]
|
payload = parts[1]
|
||||||
padded = payload + "=" * (4 - len(payload) % 4)
|
padded = payload + "=" * (4 - len(payload) % 4)
|
||||||
decoded = base64.b64decode(padded)
|
|
||||||
|
# https://lists.jboss.org/pipermail/keycloak-user/2016-April/005758.html
|
||||||
|
decoded = base64.urlsafe_b64decode(padded)
|
||||||
return json.loads(decoded)
|
return json.loads(decoded)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue