Skip to content

Commit db0b18c

Browse files
authored
Merge pull request #14 from makinacorpus/fix
fix crash in extract_claim_from_tokens
2 parents 0331fa9 + 786a7d5 commit db0b18c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

django_pyoidc/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.12
1+
0.0.13

django_pyoidc/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def extract_claim_from_tokens(claim: str, tokens: dict, raise_exception=True) ->
4343
value = tokens["info_token_claims"][claim]
4444
elif "id_token_claims" in tokens and claim in tokens["id_token_claims"]:
4545
value = tokens["id_token_claims"][claim]
46-
elif "access_token_claims" and claim in tokens["access_token_claims"]:
46+
elif "access_token_claims" in tokens and claim in tokens["access_token_claims"]:
4747
value = tokens["access_token_claims"][claim]
4848
else:
4949
if raise_exception:

0 commit comments

Comments
 (0)