jpadilla / pyjwt

JSON Web Token implementation in Python
https://pyjwt.readthedocs.io
MIT License
5.1k stars 682 forks source link

Option to disable refresh/retry on kid mismatch #936

Closed kpark-hrp closed 6 months ago

kpark-hrp commented 9 months ago

Description

This PR allows user to selectively disable refresh of signing keys on kid mismatch. Fixes #929

Changes

Default parameter of retry: bool = True has been added to two following methods.

def get_signing_key(self, kid: str, retry: bool = True) -> PyJWK: 
    ...

def get_signing_key_from_jwt(self, token: str, retry: bool = True) -> PyJWK:
    ...

Note: No breaking change as the default behavior remains the same

kpark-hrp commented 9 months ago

@jpadilla @auvipy Hi, can you guys take a look at this small PR?

auvipy commented 6 months ago

why you closed it?