org.springframework.security.oauth2.client
Class DefaultOAuth2ClientContext
java.lang.Object
org.springframework.security.oauth2.client.DefaultOAuth2ClientContext
- All Implemented Interfaces:
- Serializable, OAuth2ClientContext
public class DefaultOAuth2ClientContext
- extends Object
- implements OAuth2ClientContext, Serializable
The OAuth 2 security context (for a specific user or client or combination thereof).
- Author:
- Dave Syer
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultOAuth2ClientContext
public DefaultOAuth2ClientContext()
DefaultOAuth2ClientContext
public DefaultOAuth2ClientContext(AccessTokenRequest accessTokenRequest)
DefaultOAuth2ClientContext
public DefaultOAuth2ClientContext(OAuth2AccessToken accessToken)
getAccessToken
public OAuth2AccessToken getAccessToken()
- Specified by:
getAccessToken
in interface OAuth2ClientContext
- Returns:
- the current access token if any (may be null or empty)
setAccessToken
public void setAccessToken(OAuth2AccessToken accessToken)
- Specified by:
setAccessToken
in interface OAuth2ClientContext
- Parameters:
accessToken
- the current access token
getAccessTokenRequest
public AccessTokenRequest getAccessTokenRequest()
- Specified by:
getAccessTokenRequest
in interface OAuth2ClientContext
- Returns:
- the current request if any (may be null or empty)
setPreservedState
public void setPreservedState(String stateKey,
Object preservedState)
- Description copied from interface:
OAuth2ClientContext
- Convenience method for saving state in the
OAuth2ClientContext
.
- Specified by:
setPreservedState
in interface OAuth2ClientContext
- Parameters:
stateKey
- the key to use to save the statepreservedState
- the state to be saved
removePreservedState
public Object removePreservedState(String stateKey)
- Specified by:
removePreservedState
in interface OAuth2ClientContext
- Parameters:
stateKey
- the state key to lookup
- Returns:
- the state preserved with this key (if any)
Copyright © 2013. All rights reserved.