File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
services/signin/src/main/java/software/amazon/awssdk/services/signin/auth Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ private RefreshResult<AwsCredentials> updateSigninCredentials() {
138138 () -> SdkClientException .create ("Invalid token expiration time. You must re-authenticate." )
139139 );
140140
141- if (shouldRefresh (currentExpirationTime , staleTime )
142- && shouldRefresh (currentExpirationTime , prefetchTime )) {
141+ if (shouldNotRefresh (currentExpirationTime , staleTime )
142+ && shouldNotRefresh (currentExpirationTime , prefetchTime )) {
143143 log .debug (() -> "Using access token from disk, current expiration time is : " + currentExpirationTime );
144144 AwsCredentials credentials = tokenFromDisc .getAccessToken ()
145145 .toBuilder ()
@@ -241,9 +241,9 @@ public Builder toBuilder() {
241241
242242 /**
243243 *
244- * @return true if the token should be refreshed ( it is after the given refresh window, eg stale time or prefetch time)
244+ * @return true if the token does NOT need to be refreshed - it is after the given refresh window, eg stale/ prefetch time.
245245 */
246- private static boolean shouldRefresh (Instant expiration , Duration refreshWindow ) {
246+ private static boolean shouldNotRefresh (Instant expiration , Duration refreshWindow ) {
247247 Instant now = Instant .now ();
248248 return expiration .isAfter (now .plus (refreshWindow ));
249249 }
You can’t perform that action at this time.
0 commit comments