Fix more data type mismatch when checking OAUTH2 claims
parent
0bc044fa67
commit
23c618e1c9
|
@ -243,6 +243,8 @@ class OAuth2Authentication(BaseAuthentication):
|
||||||
if not isinstance(claim, list):
|
if not isinstance(claim, list):
|
||||||
claim = [claim]
|
claim = [claim]
|
||||||
authorized_claims = additional_claims.get(key)
|
authorized_claims = additional_claims.get(key)
|
||||||
|
if not isinstance(authorized_claims, list):
|
||||||
|
authorized_claims = [authorized_claims]
|
||||||
if any(item in authorized_claims for item in claim):
|
if any(item in authorized_claims for item in claim):
|
||||||
reason = "Claim match found. Authorizing"
|
reason = "Claim match found. Authorizing"
|
||||||
return (True, reason)
|
return (True, reason)
|
||||||
|
|
Loading…
Reference in New Issue