feat: allow flat claims instead of nested claims as alternative (#19286)

This commit is contained in:
gerhardj-b 2025-11-20 01:58:53 +01:00 committed by GitHub
parent c2f889cf9a
commit 66c5b7380d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1023,6 +1023,10 @@ class OAuthManager:
for nested_claim in nested_claims:
claim_data = claim_data.get(nested_claim, {})
# Try flat claim structure as alternative
if not claim_data:
claim_data = user_data.get(oauth_claim, {})
oauth_roles = []
if isinstance(claim_data, list):