Class AbstractOAuth2TokenAuthenticationToken<T extends org.springframework.security.oauth2.core.OAuth2Token>
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<T>
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
- Direct Known Subclasses:
BearerTokenAuthentication,JwtAuthenticationToken
public abstract class AbstractOAuth2TokenAuthenticationToken<T extends org.springframework.security.oauth2.core.OAuth2Token>
extends org.springframework.security.authentication.AbstractAuthenticationToken
Base class for
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().
- Since:
- 5.1
- See Also:
-
OAuth2AccessTokenJwt- 2.2 Introspection Response
- Serialized Form
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSub-class constructor.protectedAbstractOAuth2TokenAuthenticationToken(T token, Object principal, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) protectedAbstractOAuth2TokenAuthenticationToken(T token, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Sub-class constructor. -
Method Summary
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
AbstractOAuth2TokenAuthenticationToken
Sub-class constructor. -
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Sub-class constructor.- Parameters:
authorities- the authorities assigned to the Access Token
-
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, Object principal, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
-
Method Details
-
getPrincipal
-
getCredentials
-
getToken
Get the token bound to thisAuthentication. -
getTokenAttributes
Returns the attributes of the access token.- Returns:
- a
Mapof the attributes in the access token.
-