Class AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T extends OAuth2Token,B extends AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T,B>>
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T,B>
- Type Parameters:
B-
- All Implemented Interfaces:
Authentication.Builder<B>
- Direct Known Subclasses:
BearerTokenAuthentication.Builder,JwtAuthenticationToken.Builder
- Enclosing class:
- AbstractOAuth2TokenAuthenticationToken<T extends OAuth2Token>
public abstract static class AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T extends OAuth2Token,B extends AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<T,B>>
extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>
A builder for
AbstractOAuth2TokenAuthenticationToken implementations- Since:
- 7.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder
authenticated, authorities, detailsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.core.Authentication.Builder
build
-
Constructor Details
-
AbstractOAuth2TokenAuthenticationBuilder
-
-
Method Details
-
principal
Description copied from interface:Authentication.BuilderUse this principal.Note that in many cases, the principal is strongly-typed. Implementations may choose to do a type check and are not necessarily expected to allow any object as a principal.
Implementations may choose to use this
principalin combination with any principal from the pre-existingAuthenticationinstance.- Parameters:
principal- the principal to use- Returns:
- the
Authentication.Builderfor additional configuration - See Also:
-
credentials
Description copied from interface:Authentication.BuilderUse this credential.Note that since some credentials are insecure to store, this method is implemented as unsupported by default. Only implement or use this method if you support secure storage of the credential or if your implementation also implements
CredentialsContainerand the credentials are thereby erased.- Parameters:
credentials- the credentials to use- Returns:
- the
Authentication.Builderfor additional configuration - See Also:
-
token
The OAuth 2.0 Token to use- Parameters:
token- the token to use- Returns:
- the
Authentication.Builderfor further configurations
-