Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 91b7bd4

Browse files
committed
Using verify_id_token is better then id_token.verify().
1 parent a08823d commit 91b7bd4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/oidcmsg/oidc/session.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from ..message import SINGLE_REQUIRED_JSON
1010
from ..message import SINGLE_REQUIRED_STRING
1111
from ..oauth2 import ResponseMessage
12-
from ..oidc import clear_verified_claims
12+
from ..oidc import clear_verified_claims, verify_id_token
1313
from ..oidc import verified_claim_name
1414
from ..oidc import IdToken
1515
from ..oidc import ID_TOKEN_VERIFY_ARGS
@@ -62,9 +62,8 @@ def verify(self, **kwargs):
6262
except KeyError:
6363
pass
6464
idt = IdToken().from_jwt(str(self["id_token_hint"]), **args)
65-
if not idt.verify(**kwargs):
65+
if not verify_id_token(self, claim='id_token_hint', **kwargs):
6666
return False
67-
6867
# Add the verified ID Token to the message instance
6968
self[verified_claim_name("id_token_hint")] = idt
7069

0 commit comments

Comments
 (0)