aboutsummaryrefslogtreecommitdiff
path: root/google/oauth2/credentials.py
diff options
context:
space:
mode:
Diffstat (limited to 'google/oauth2/credentials.py')
-rw-r--r--google/oauth2/credentials.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py
index e259f78..6d34edf 100644
--- a/google/oauth2/credentials.py
+++ b/google/oauth2/credentials.py
@@ -270,7 +270,7 @@ class Credentials(credentials.ReadOnlyScoped, credentials.CredentialsWithQuotaPr
raise exceptions.RefreshError(
"The refresh_handler returned expiry is not a datetime object."
)
- if _helpers.utcnow() >= expiry - _helpers.CLOCK_SKEW:
+ if _helpers.utcnow() >= expiry - _helpers.REFRESH_THRESHOLD:
raise exceptions.RefreshError(
"The credentials returned by the refresh_handler are "
"already expired."
@@ -359,7 +359,7 @@ class Credentials(credentials.ReadOnlyScoped, credentials.CredentialsWithQuotaPr
expiry.rstrip("Z").split(".")[0], "%Y-%m-%dT%H:%M:%S"
)
else:
- expiry = _helpers.utcnow() - _helpers.CLOCK_SKEW
+ expiry = _helpers.utcnow() - _helpers.REFRESH_THRESHOLD
# process scopes, which needs to be a seq
if scopes is None and "scopes" in info: