Skip to content

Commit

Permalink
fix crash in extract_claim_from_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
gbip committed Jun 26, 2024
1 parent 0331fa9 commit 786a7d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django_pyoidc/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.12
0.0.13
2 changes: 1 addition & 1 deletion django_pyoidc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def extract_claim_from_tokens(claim: str, tokens: dict, raise_exception=True) ->
value = tokens["info_token_claims"][claim]
elif "id_token_claims" in tokens and claim in tokens["id_token_claims"]:
value = tokens["id_token_claims"][claim]
elif "access_token_claims" and claim in tokens["access_token_claims"]:
elif "access_token_claims" in tokens and claim in tokens["access_token_claims"]:
value = tokens["access_token_claims"][claim]
else:
if raise_exception:
Expand Down

0 comments on commit 786a7d5

Please sign in to comment.