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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T extends org.springframework.security.oauth2.core.OAuth2Token, B extends AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T,B>> A builder forAbstractOAuth2TokenAuthenticationTokenimplementationsNested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
org.springframework.security.core.Authentication.Builder<B> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOAuth2TokenAuthenticationToken(AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T, ?> builder) protectedSub-class constructor.protectedAbstractOAuth2TokenAuthenticationToken(T token, Object principal, Object credentials, @Nullable Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) protectedAbstractOAuth2TokenAuthenticationToken(T token, @Nullable 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, toStringMethods inherited from interface org.springframework.security.core.Authentication
toBuilder
-
Constructor Details
-
AbstractOAuth2TokenAuthenticationToken
Sub-class constructor. -
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, @Nullable Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Sub-class constructor.- Parameters:
authorities- the authorities assigned to the Access Token, ornull
-
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(T token, Object principal, Object credentials, @Nullable Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) -
AbstractOAuth2TokenAuthenticationToken
protected AbstractOAuth2TokenAuthenticationToken(AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T, ?> builder)
-
-
Method Details
-
getPrincipal
-
getCredentials
-
getToken
Get the token bound to thisAuthentication. -
getTokenAttributes
-