Class JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
java.lang.Object
org.springframework.vault.authentication.JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
- Enclosing class:
- JwtAuthenticationOptions
Builder for
JwtAuthenticationOptions
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a newJwtAuthenticationOptions
instance.Configure the JWT authentication token.jwtSupplier
(Supplier<String> jwtSupplier) Configure theSupplier
to obtain a JWT authentication token.Configure the mount path.Configure the role.
-
Constructor Details
-
JwtAuthenticationOptionsBuilder
public JwtAuthenticationOptionsBuilder()
-
-
Method Details
-
path
Configure the mount path.- Parameters:
path
- must not be null or empty.- Returns:
this
JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
.
-
role
Configure the role.- Parameters:
role
- name of the role against which the login is being attempted, must not be null or empty.- Returns:
this
JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
.
-
jwt
Configure the JWT authentication token. Vault authentication will use this token as singleton. If you want to provide a dynamic token that can change over time, seejwtSupplier(Supplier)
.- Parameters:
jwt
- must not be null.- Returns:
this
JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
.
-
jwtSupplier
public JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder jwtSupplier(Supplier<String> jwtSupplier) Configure theSupplier
to obtain a JWT authentication token.- Parameters:
jwtSupplier
- must not be null.- Returns:
this
JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
.
-
build
Build a newJwtAuthenticationOptions
instance.- Returns:
- a new
JwtAuthenticationOptions
.
-