public class ClientCredentialsAccessTokenProvider extends OAuth2AccessTokenSupport implements AccessTokenProvider
logger| Constructor and Description |
|---|
ClientCredentialsAccessTokenProvider() |
| Modifier and Type | Method and Description |
|---|---|
OAuth2AccessToken |
obtainAccessToken(OAuth2ProtectedResourceDetails details,
AccessTokenRequest request)
Obtain a new access token for the specified protected resource.
|
OAuth2AccessToken |
refreshAccessToken(OAuth2ProtectedResourceDetails resource,
OAuth2RefreshToken refreshToken,
AccessTokenRequest request) |
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 ClientCredentialsAccessTokenProvider()
public boolean supportsResource(OAuth2ProtectedResourceDetails resource)
AccessTokenProvidersupportsResource in interface AccessTokenProviderresource - The resource.public boolean supportsRefresh(OAuth2ProtectedResourceDetails resource)
supportsRefresh in interface AccessTokenProviderresource - The resource to checkpublic OAuth2AccessToken refreshAccessToken(OAuth2ProtectedResourceDetails resource, OAuth2RefreshToken refreshToken, AccessTokenRequest request) throws UserRedirectRequiredException
refreshAccessToken in interface AccessTokenProviderresource - the resource for which a token refresh is requiredrefreshToken - the refresh token to sendUserRedirectRequiredExceptionpublic OAuth2AccessToken obtainAccessToken(OAuth2ProtectedResourceDetails details, AccessTokenRequest request) throws UserRedirectRequiredException, org.springframework.security.access.AccessDeniedException, OAuth2AccessDeniedException
AccessTokenProviderobtainAccessToken in interface AccessTokenProviderdetails - 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.OAuth2AccessDeniedExceptionCopyright © 2018. All rights reserved.