Fix a data type mismatch when checking OAUTH2 claims

This commit is contained in:
Martin Tietz 2023-11-17 10:48:07 +01:00 committed by GitHub
parent 6d7338e64d
commit 5bdccb6e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,8 @@ class OAuth2Authentication(BaseAuthentication):
claim = profile.get(key)
if claim is None:
continue
if not isinstance(claim, list):
claim = [claim]
authorized_claims = additional_claims.get(key)
if any(item in authorized_claims for item in claim):
reason = "Claim match found. Authorizing"