From e2e08987d890a3a85b8b9750eb2b93dc32a43a64 Mon Sep 17 00:00:00 2001 From: bharti-sagar Date: Thu, 16 Mar 2023 08:20:59 +0530 Subject: [PATCH] SK-548 removal of grace period 5 mins for cache refresh of bearer token in python sdk --- skyflow/vault/_token.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skyflow/vault/_token.py b/skyflow/vault/_token.py index 7252730..d80f175 100644 --- a/skyflow/vault/_token.py +++ b/skyflow/vault/_token.py @@ -19,7 +19,7 @@ def tokenProviderWrapper(storedToken: str, newTokenProvider, interface: str): try: decoded = jwt.decode(storedToken, options={ "verify_signature": False, "verify_aud": False}) - if time.time() + 300 < decoded['exp']: + if time.time() < decoded['exp']: return storedToken else: newToken = newTokenProvider()