public class DefaultOAuth2ClientContext extends Object implements OAuth2ClientContext, Serializable
Constructor and Description |
---|
DefaultOAuth2ClientContext() |
DefaultOAuth2ClientContext(AccessTokenRequest accessTokenRequest) |
DefaultOAuth2ClientContext(OAuth2AccessToken accessToken) |
Modifier and Type | Method and Description |
---|---|
OAuth2AccessToken |
getAccessToken() |
AccessTokenRequest |
getAccessTokenRequest() |
Object |
removePreservedState(String stateKey) |
void |
setAccessToken(OAuth2AccessToken accessToken) |
void |
setPreservedState(String stateKey,
Object preservedState)
Convenience method for saving state in the
OAuth2ClientContext . |
public DefaultOAuth2ClientContext()
public DefaultOAuth2ClientContext(AccessTokenRequest accessTokenRequest)
public DefaultOAuth2ClientContext(OAuth2AccessToken accessToken)
public OAuth2AccessToken getAccessToken()
getAccessToken
in interface OAuth2ClientContext
public void setAccessToken(OAuth2AccessToken accessToken)
setAccessToken
in interface OAuth2ClientContext
accessToken
- the current access tokenpublic AccessTokenRequest getAccessTokenRequest()
getAccessTokenRequest
in interface OAuth2ClientContext
public void setPreservedState(String stateKey, Object preservedState)
OAuth2ClientContext
OAuth2ClientContext
.setPreservedState
in interface OAuth2ClientContext
stateKey
- the key to use to save the statepreservedState
- the state to be savedpublic Object removePreservedState(String stateKey)
removePreservedState
in interface OAuth2ClientContext
stateKey
- the state key to lookupCopyright © 2019. All rights reserved.