Polish OAuth2AuthorizedClientService

Fixes gh-4746
This commit is contained in:
Joe Grandja
2017-10-29 20:25:03 -04:00
parent b496ad4d86
commit c3d2effc1d
10 changed files with 36 additions and 183 deletions

View File

@@ -38,7 +38,6 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.oauth2.client.InMemoryOAuth2AuthorizedClientService;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
import org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient;
import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest;
@@ -397,8 +396,8 @@ public class OAuth2LoginApplicationTests {
private ClientRegistrationRepository clientRegistrationRepository;
@Bean
public OAuth2AuthorizedClientService<OAuth2AuthorizedClient> authorizedClientService() {
return new InMemoryOAuth2AuthorizedClientService<>(this.clientRegistrationRepository);
public OAuth2AuthorizedClientService authorizedClientService() {
return new InMemoryOAuth2AuthorizedClientService(this.clientRegistrationRepository);
}
}
}