Skip to content

Commit

Permalink
Merge pull request #14 from makinacorpus/fix
Browse files Browse the repository at this point in the history
fix crash in extract_claim_from_tokens
  • Loading branch information
gbip authored Jun 26, 2024
2 parents 0331fa9 + 786a7d5 commit db0b18c
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 db0b18c

Please sign in to comment.