public class AccessTokenProviderChain extends OAuth2AccessTokenSupport implements AccessTokenProvider
logger| Constructor and Description | 
|---|
| AccessTokenProviderChain(List<? extends AccessTokenProvider> chain) | 
| Modifier and Type | Method and Description | 
|---|---|
| OAuth2AccessToken | obtainAccessToken(OAuth2ProtectedResourceDetails resource,
                 AccessTokenRequest request)Obtain a new access token for the specified protected resource. | 
| protected OAuth2AccessToken | obtainNewAccessTokenInternal(OAuth2ProtectedResourceDetails details,
                            AccessTokenRequest request) | 
| OAuth2AccessToken | refreshAccessToken(OAuth2ProtectedResourceDetails resource,
                  OAuth2RefreshToken refreshToken,
                  AccessTokenRequest request)Obtain a new access token for the specified resource using the refresh token. | 
| void | setClientTokenServices(ClientTokenServices clientTokenServices)Token services for long-term persistence of access tokens. | 
| boolean | supportsRefresh(OAuth2ProtectedResourceDetails resource) | 
| boolean | supportsResource(OAuth2ProtectedResourceDetails resource)Whether this provider supports the specified resource. | 
getAccessTokenUri, getHttpMethod, getRequestCallback, getResponseErrorHandler, getResponseExtractor, getRestTemplate, retrieveToken, setAuthenticationHandler, setInterceptors, setMessageConverters, setRequestFactory, setTokenRequestEnhancerpublic AccessTokenProviderChain(List<? extends AccessTokenProvider> chain)
public void setClientTokenServices(ClientTokenServices clientTokenServices)
clientTokenServices - the clientTokenServices to setpublic boolean supportsResource(OAuth2ProtectedResourceDetails resource)
AccessTokenProvidersupportsResource in interface AccessTokenProviderresource - The resource.public boolean supportsRefresh(OAuth2ProtectedResourceDetails resource)
supportsRefresh in interface AccessTokenProviderresource - The resource to checkpublic OAuth2AccessToken obtainAccessToken(OAuth2ProtectedResourceDetails resource, AccessTokenRequest request) throws UserRedirectRequiredException, org.springframework.security.access.AccessDeniedException
AccessTokenProviderobtainAccessToken in interface AccessTokenProviderresource - The protected resource for which this provider is to obtain an access token.request - The parameters of the request giving context for the token details if any.UserRedirectRequiredException - If the provider requires the current user to be redirected for
 authorization.org.springframework.security.access.AccessDeniedException - If the user denies access to the protected resource.protected OAuth2AccessToken obtainNewAccessTokenInternal(OAuth2ProtectedResourceDetails details, AccessTokenRequest request) throws UserRedirectRequiredException, org.springframework.security.access.AccessDeniedException
UserRedirectRequiredExceptionorg.springframework.security.access.AccessDeniedExceptionpublic OAuth2AccessToken refreshAccessToken(OAuth2ProtectedResourceDetails resource, OAuth2RefreshToken refreshToken, AccessTokenRequest request) throws UserRedirectRequiredException
refreshAccessToken in interface AccessTokenProviderresource - The resource.refreshToken - The refresh token.UserRedirectRequiredExceptionCopyright © 2019. All rights reserved.