Skip to content

Commit

Permalink
OpenID: Ensure claims_supported lists each claim only once
Browse files Browse the repository at this point in the history
  • Loading branch information
Natureshadow authored and n2ygk committed Jan 23, 2022
1 parent 1b3fc51 commit 9fbe840
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions oauth2_provider/views/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ def get(self, request, *args, **kwargs):

validator_class = oauth2_settings.OAUTH2_VALIDATOR_CLASS
validator = validator_class()
oidc_claims = validator.get_discovery_claims(request)
if "sub" not in oidc_claims:
oidc_claims.append("sub")
oidc_claims = list(set(validator.get_discovery_claims(request)))

data = {
"issuer": issuer_url,
Expand Down

0 comments on commit 9fbe840

Please sign in to comment.