public interface AccessTokenProvider
Modifier and Type | Method and Description |
---|---|
OAuth2AccessToken |
obtainAccessToken(OAuth2ProtectedResourceDetails details,
AccessTokenRequest parameters)
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.
|
OAuth2AccessToken obtainAccessToken(OAuth2ProtectedResourceDetails details, AccessTokenRequest parameters) throws UserRedirectRequiredException, UserApprovalRequiredException, org.springframework.security.access.AccessDeniedException
details
- The protected resource for which this provider is to obtain an access token.parameters
- 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.UserApprovalRequiredException
- If the provider is ready to issue a token but only if the user approvesorg.springframework.security.access.AccessDeniedException
- If the user denies access to the protected resource.boolean supportsResource(OAuth2ProtectedResourceDetails resource)
resource
- The resource.OAuth2AccessToken refreshAccessToken(OAuth2ProtectedResourceDetails resource, OAuth2RefreshToken refreshToken, AccessTokenRequest request) throws UserRedirectRequiredException
resource
- the resource for which a token refresh is requiredrefreshToken
- the refresh token to sendUserRedirectRequiredException
boolean supportsRefresh(OAuth2ProtectedResourceDetails resource)
resource
- The resource to checkCopyright © 2019. All rights reserved.