OAuth2 OpenID Connect provider support etc. #3

Merged
LeoVasanko merged 65 commits from oidconnect into main 2026-02-18 02:40:27 +00:00
Showing only changes of commit ba3695cf88 - Show all commits
+6 -1
View File
@@ -186,17 +186,22 @@ def decode_access_token(
"""
_ensure_key()
try:
# Don't pass audience if None to avoid PyJWT audience validation
# PyJWT requires audience parameter when token has aud claim.
# When audience is None, we skip PyJWT's audience validation and validate manually.
options = {}
decode_kwargs = {
"algorithms": ["EdDSA"],
"issuer": issuer,
}
if audience is not None:
decode_kwargs["audience"] = audience
else:
options["verify_aud"] = False
return jwt.decode(
token,
_public_key,
options=options,
**decode_kwargs
)
except jwt.PyJWTError as e: