Skip to content

Commit

Permalink
Merge pull request #74 from skyflowapi/SK-548
Browse files Browse the repository at this point in the history
SK-548 removal of grace period 5 mins for cache refresh of bearer token in python sdk
  • Loading branch information
skyflow-bharti committed Mar 17, 2023
2 parents 5fdaf14 + e2e0898 commit 895affe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skyflow/vault/_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 895affe

Please sign in to comment.