We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ed0a17b + 0f3b69a commit 3e31b85Copy full SHA for 3e31b85
1 file changed
railib/credentials.py
@@ -46,7 +46,7 @@ def __init__(self, access_token: str, expires_in: int):
46
self.created_on = round(time.time())
47
48
def is_expired(self):
49
- return time.time() - self.created_on >= self.expires_in
+ return time.time() - self.created_on >= self.expires_in - 5 # anticipate token expiration by 5 seconds
50
51
52
# Represents OAuth client credentials.
0 commit comments