|
|
|
|
@ -41,7 +41,11 @@ import org.springframework.security.oauth2.core.OAuth2AccessToken;
@@ -41,7 +41,11 @@ import org.springframework.security.oauth2.core.OAuth2AccessToken;
|
|
|
|
|
import org.springframework.security.oauth2.core.TestOAuth2AccessTokens; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationExchange; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponse; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.TestOAuth2AuthorizationExchanges; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.TestOAuth2AuthorizationRequests; |
|
|
|
|
import org.springframework.security.oauth2.core.endpoint.TestOAuth2AuthorizationResponses; |
|
|
|
|
import org.springframework.security.oauth2.core.oidc.IdTokenClaimNames; |
|
|
|
|
import org.springframework.security.oauth2.core.oidc.endpoint.OidcParameterNames; |
|
|
|
|
import org.springframework.security.oauth2.core.oidc.user.OidcUser; |
|
|
|
|
@ -211,7 +215,9 @@ public class OAuth2LoginTests {
@@ -211,7 +215,9 @@ public class OAuth2LoginTests {
|
|
|
|
|
OAuth2LoginWithJwtDecoderFactoryBeanConfig config = this.spring.getContext() |
|
|
|
|
.getBean(OAuth2LoginWithJwtDecoderFactoryBeanConfig.class); |
|
|
|
|
|
|
|
|
|
OAuth2AuthorizationExchange exchange = TestOAuth2AuthorizationExchanges.success(); |
|
|
|
|
OAuth2AuthorizationRequest request = TestOAuth2AuthorizationRequests.request().scope("openid").build(); |
|
|
|
|
OAuth2AuthorizationResponse response = TestOAuth2AuthorizationResponses.success().build(); |
|
|
|
|
OAuth2AuthorizationExchange exchange = new OAuth2AuthorizationExchange(request, response); |
|
|
|
|
OAuth2AccessToken accessToken = TestOAuth2AccessTokens.scopes("openid"); |
|
|
|
|
OAuth2AuthorizationCodeAuthenticationToken token = new OAuth2AuthorizationCodeAuthenticationToken(google, exchange, accessToken); |
|
|
|
|
|
|
|
|
|
|