Class JwtAuthenticationToken.Builder<B extends JwtAuthenticationToken.Builder<B>>
java.lang.Object
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<org.springframework.security.oauth2.jwt.Jwt,B>
org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken.Builder<B>
- All Implemented Interfaces:
org.springframework.security.core.Authentication.Builder<B>
- Enclosing class:
- JwtAuthenticationToken
public static class JwtAuthenticationToken.Builder<B extends JwtAuthenticationToken.Builder<B>>
extends AbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<org.springframework.security.oauth2.jwt.Jwt,B>
A builder for
JwtAuthenticationToken instances- Since:
- 7.0
- See Also:
-
Authentication.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()credentials(@Nullable Object credentials) A synonym fortoken(Jwt)The name to use.A synonym fortoken(Jwt)token(org.springframework.security.oauth2.jwt.Jwt token) Use thistokenas the token, principal, and credentials.
-
Constructor Details
-
Builder
-
-
Method Details
-
principal
A synonym fortoken(Jwt)- Specified by:
principalin interfaceorg.springframework.security.core.Authentication.Builder<B extends JwtAuthenticationToken.Builder<B>>- Overrides:
principalin classAbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<org.springframework.security.oauth2.jwt.Jwt,B extends JwtAuthenticationToken.Builder<B>> - Returns:
- the
JwtAuthenticationToken.Builderfor further configurations
-
credentials
A synonym fortoken(Jwt)- Specified by:
credentialsin interfaceorg.springframework.security.core.Authentication.Builder<B extends JwtAuthenticationToken.Builder<B>>- Overrides:
credentialsin classAbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<org.springframework.security.oauth2.jwt.Jwt,B extends JwtAuthenticationToken.Builder<B>> - Returns:
- the
JwtAuthenticationToken.Builderfor further configurations
-
token
Use thistokenas the token, principal, and credentials. Also sets thenametoJwtClaimAccessor.getSubject().- Overrides:
tokenin classAbstractOAuth2TokenAuthenticationToken.AbstractOAuth2TokenAuthenticationBuilder<org.springframework.security.oauth2.jwt.Jwt,B extends JwtAuthenticationToken.Builder<B>> - Parameters:
token- the token to use- Returns:
- the
JwtAuthenticationToken.Builderfor further configurations
-
name
The name to use.- Parameters:
name- the name to use- Returns:
- the
JwtAuthenticationToken.Builderfor further configurations
-
build
-