abstract class OAuth2SpringToken extends AbstractAuthenticationToken
This is a Spring Security authentication token for OAuth providers. It will be saved in SecurityContextHolder.context.authentication when user complete the authentication process. It must be initialised with a com.github.scribejava.core.model.OAuth2AccessToken access token from which dedicated provider. Tokens can extract extra information such as the principal.
| Modifiers | Name | Description |
|---|---|---|
protected OAuth2AccessToken |
accessToken |
|
protected java.util.Map |
tokenParams |
| Type | Name and description |
|---|---|
java.util.Collection<GrantedAuthority> |
authorities |
java.lang.Object |
principal |
| Constructor and description |
|---|
OAuth2SpringToken(OAuth2AccessToken accessToken, boolean forceJsonExtractor)Initialises the token from an access token. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.Object |
getCredentials()Returns the raw response from the OAuth provider as a string. |
|
protected final java.util.Map |
getParameters()Returns the parameters in the OAuth access token as a map. |
|
java.lang.Object |
getPrincipal() |
|
abstract java.lang.String |
getProviderName()Returns the name of the OAuth provider for this token. |
|
abstract java.lang.String |
getScreenName() |
|
abstract java.lang.String |
getSocialId() |
Initialises the token from an access token.
Returns the raw response from the OAuth provider as a string.
Returns the parameters in the OAuth access token as a map.
Returns the name of the OAuth provider for this token.