Skip to content

Commit 56e115f

Browse files
committed
Fixed bug
1 parent eb5a334 commit 56e115f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ads/common/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ def _validate_and_refresh_token(self, configuration: Dict[str, Any]):
862862

863863
time_now = int(time.time())
864864
time_expired = security_token_container.get_jwt()["exp"]
865-
if time_now - time_expired < SECURITY_TOKEN_LEFT_TIME:
865+
if time_expired - time_now < SECURITY_TOKEN_LEFT_TIME:
866866
if not self.oci_config_location:
867867
logger.warning("Can not auto-refresh token. Specify parameter `oci_config_location` through ads.set_auth() or ads.auth.create_signer().")
868868
else:

0 commit comments

Comments
 (0)