|
@@ -17,6 +17,7 @@ package org.springframework.security.oauth2.server.authorization;
|
|
|
|
|
|
import org.springframework.security.oauth2.core.OAuth2AccessToken;
|
|
import org.springframework.security.oauth2.core.OAuth2AccessToken;
|
|
import org.springframework.security.oauth2.core.OAuth2RefreshToken;
|
|
import org.springframework.security.oauth2.core.OAuth2RefreshToken;
|
|
|
|
+import org.springframework.security.oauth2.core.OAuth2RefreshToken2;
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
|
|
import org.springframework.security.oauth2.server.authorization.client.RegisteredClient;
|
|
import org.springframework.security.oauth2.server.authorization.client.RegisteredClient;
|
|
import org.springframework.security.oauth2.server.authorization.client.TestRegisteredClients;
|
|
import org.springframework.security.oauth2.server.authorization.client.TestRegisteredClients;
|
|
@@ -48,7 +49,7 @@ public class TestOAuth2Authorizations {
|
|
"code", Instant.now(), Instant.now().plusSeconds(120));
|
|
"code", Instant.now(), Instant.now().plusSeconds(120));
|
|
OAuth2AccessToken accessToken = new OAuth2AccessToken(
|
|
OAuth2AccessToken accessToken = new OAuth2AccessToken(
|
|
OAuth2AccessToken.TokenType.BEARER, "access-token", Instant.now(), Instant.now().plusSeconds(300));
|
|
OAuth2AccessToken.TokenType.BEARER, "access-token", Instant.now(), Instant.now().plusSeconds(300));
|
|
- OAuth2RefreshToken refreshToken = new OAuth2RefreshToken(
|
|
|
|
|
|
+ OAuth2RefreshToken refreshToken = new OAuth2RefreshToken2(
|
|
"refresh-token", Instant.now(), Instant.now().plus(1, ChronoUnit.HOURS));
|
|
"refresh-token", Instant.now(), Instant.now().plus(1, ChronoUnit.HOURS));
|
|
OAuth2AuthorizationRequest authorizationRequest = OAuth2AuthorizationRequest.authorizationCode()
|
|
OAuth2AuthorizationRequest authorizationRequest = OAuth2AuthorizationRequest.authorizationCode()
|
|
.authorizationUri("https://provider.com/oauth2/authorize")
|
|
.authorizationUri("https://provider.com/oauth2/authorize")
|