Skip to content

Commit b8e4788

Browse files
H-LREBeleftherias
authored andcommitted
Fix test to use non-expired token
Closes gh-9506
1 parent 4a49284 commit b8e4788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/PasswordOAuth2AuthorizedClientProviderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void authorizeWhenPasswordAndAuthorizedWithRefreshTokenAndTokenExpiredThe
212212
public void authorizeWhenPasswordAndAuthorizedAndTokenNotExpiredButClockSkewForcesExpiryThenReauthorize() {
213213
Instant now = Instant.now();
214214
Instant issuedAt = now.minus(Duration.ofMinutes(60));
215-
Instant expiresAt = now.minus(Duration.ofMinutes(1));
215+
Instant expiresAt = now.plus(Duration.ofMinutes(1));
216216
OAuth2AccessToken expiresInOneMinAccessToken = new OAuth2AccessToken(OAuth2AccessToken.TokenType.BEARER,
217217
"access-token-1234", issuedAt, expiresAt);
218218
OAuth2AuthorizedClient authorizedClient = new OAuth2AuthorizedClient(this.clientRegistration,

0 commit comments

Comments
 (0)