Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Fixed
- Add iterator for JWKSet in `#1041 <https://github.com/jpadilla/pyjwt/pull/1041>`__
- Validate `iss` claim is a string during encoding and decoding by @pachewise in `#1040 <https://github.com/jpadilla/pyjwt/pull/1040>`__
- Improve typing/logic for `options` in decode, decode_complete by @pachewise in `#1045 <https://github.com/jpadilla/pyjwt/pull/1045>`__
- Declare float supported type for lifespan and timeout by @nikitagashkov in `#1068 <https://github.com/jpadilla/pyjwt/pull/1068>`__

Added
~~~~~
Expand Down
2 changes: 1 addition & 1 deletion jwt/jwk_set_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class JWKSetCache:
def __init__(self, lifespan: int) -> None:
def __init__(self, lifespan: float) -> None:
self.jwk_set_with_timestamp: Optional[PyJWTSetWithTimestamp] = None
self.lifespan = lifespan

Expand Down
4 changes: 2 additions & 2 deletions jwt/jwks_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def __init__(
cache_keys: bool = False,
max_cached_keys: int = 16,
cache_jwk_set: bool = True,
lifespan: int = 300,
lifespan: float = 300,
headers: Optional[Dict[str, Any]] = None,
timeout: int = 30,
timeout: float = 30,
ssl_context: Optional[SSLContext] = None,
):
if headers is None:
Expand Down