org.springframework.security.oauth2.client.code
Class AuthorizationCodeAccessTokenProvider
java.lang.Object
org.springframework.security.oauth2.client.provider.OAuth2AccessTokenSupport
org.springframework.security.oauth2.client.code.AuthorizationCodeAccessTokenProvider
- All Implemented Interfaces:
- InitializingBean, OAuth2AccessTokenProvider
public class AuthorizationCodeAccessTokenProvider
- extends OAuth2AccessTokenSupport
- implements OAuth2AccessTokenProvider
Provider for obtaining an oauth2 access token by using an authorization code.
- Author:
- Ryan Heaton, Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthorizationCodeAccessTokenProvider
public AuthorizationCodeAccessTokenProvider()
supportsResource
public boolean supportsResource(OAuth2ProtectedResourceDetails resource)
- Description copied from interface:
OAuth2AccessTokenProvider
- Whether this provider supports the specified resource.
- Specified by:
supportsResource in interface OAuth2AccessTokenProvider
- Parameters:
resource - The resource.
- Returns:
- Whether this provider supports the specified resource.
obtainNewAccessToken
public OAuth2AccessToken obtainNewAccessToken(OAuth2ProtectedResourceDetails details)
throws UserRedirectRequiredException,
org.springframework.security.access.AccessDeniedException
- Description copied from interface:
OAuth2AccessTokenProvider
- Obtain a new access token for the specified protected resource.
- Specified by:
obtainNewAccessToken in interface OAuth2AccessTokenProvider
- Parameters:
details - The protected resource for which this provider is to obtain an access token.
- Returns:
- The access token for the specified protected resource. The return value may NOT be null.
- Throws:
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.
Copyright © 2011. All Rights Reserved.