Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
If jwk is not initialized and the kid is not in the OpenID cached config the library crashes into an unrecoverable state.
  • Loading branch information
JesseDeLoore authored Jan 23, 2020
1 parent df3d5b1 commit c252e79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions microsoft_auth/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def get_claims(self, allow_refresh=True):
token = self.token["id_token"].encode("utf8")

kid = jwt.get_unverified_header(token)["kid"]
jwk = None
public_key = None
for key in self.jwks:
if kid == key["kid"]:
Expand Down

0 comments on commit c252e79

Please sign in to comment.