Browse Source

Fix test to use non-expired token

Closes gh-9506
pull/9267/head
Hassene Laaribi 5 years ago committed by Eleftheria Stein
parent
commit
b8e47882aa
  1. 2
      oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/PasswordOAuth2AuthorizedClientProviderTests.java

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

@ -212,7 +212,7 @@ public class PasswordOAuth2AuthorizedClientProviderTests { @@ -212,7 +212,7 @@ public class PasswordOAuth2AuthorizedClientProviderTests {
public void authorizeWhenPasswordAndAuthorizedAndTokenNotExpiredButClockSkewForcesExpiryThenReauthorize() {
Instant now = Instant.now();
Instant issuedAt = now.minus(Duration.ofMinutes(60));
Instant expiresAt = now.minus(Duration.ofMinutes(1));
Instant expiresAt = now.plus(Duration.ofMinutes(1));
OAuth2AccessToken expiresInOneMinAccessToken = new OAuth2AccessToken(OAuth2AccessToken.TokenType.BEARER,
"access-token-1234", issuedAt, expiresAt);
OAuth2AuthorizedClient authorizedClient = new OAuth2AuthorizedClient(this.clientRegistration,

Loading…
Cancel
Save