public abstract class AbstractOAuth2TokenAuthenticationToken<T extends org.springframework.security.oauth2.core.AbstractOAuth2Token>
extends org.springframework.security.authentication.AbstractAuthenticationToken
AbstractAuthenticationToken implementations
that expose common attributes between different OAuth 2.0 Access Token Formats.
For example, a Jwt could expose its claims via
getTokenAttributes() or an "Introspected" OAuth 2.0 Access Token
could expose the attributes of the Introspection Response via getTokenAttributes().
OAuth2AccessToken,
Jwt,
2.2 Introspection Response,
Serialized Form| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOAuth2TokenAuthenticationToken(T token)
Sub-class constructor.
|
protected |
AbstractOAuth2TokenAuthenticationToken(T token,
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
Sub-class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getCredentials() |
java.lang.Object |
getPrincipal() |
T |
getToken()
Get the token bound to this
Authentication. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getTokenAttributes()
Returns the attributes of the access token.
|
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringprotected AbstractOAuth2TokenAuthenticationToken(T token)
protected AbstractOAuth2TokenAuthenticationToken(T token, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
authorities - the authorities assigned to the Access Tokenpublic java.lang.Object getPrincipal()
public java.lang.Object getCredentials()
public final T getToken()
Authentication.public abstract java.util.Map<java.lang.String,java.lang.Object> getTokenAttributes()
Map of the attributes in the access token.