Skip to content

Commit f2ff63e

Browse files
committed
Allow 'float' for timedelta seconds
1 parent 1f49f41 commit f2ff63e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jwt/jwk_set_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class JWKSetCache:
8-
def __init__(self, lifespan: int) -> None:
8+
def __init__(self, lifespan: float) -> None:
99
self.jwk_set_with_timestamp: Optional[PyJWTSetWithTimestamp] = None
1010
self.lifespan = lifespan
1111

jwt/jwks_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def __init__(
2020
cache_keys: bool = False,
2121
max_cached_keys: int = 16,
2222
cache_jwk_set: bool = True,
23-
lifespan: int = 300,
23+
lifespan: float = 300,
2424
headers: Optional[Dict[str, Any]] = None,
25-
timeout: int = 30,
25+
timeout: float = 30,
2626
ssl_context: Optional[SSLContext] = None,
2727
):
2828
if headers is None:

0 commit comments

Comments
 (0)