Class JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
java.lang.Object
org.springframework.vault.authentication.JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder
- Enclosing class:
- JwtAuthenticationOptions
Builder for
JwtAuthenticationOptions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newJwtAuthenticationOptionsinstance.Configure the JWT authentication token.jwtSupplier(Supplier<String> jwtSupplier) Configure theSupplierto 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:
thisJwtAuthenticationOptions.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:
thisJwtAuthenticationOptions.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:
thisJwtAuthenticationOptions.JwtAuthenticationOptionsBuilder.
-
jwtSupplier
public JwtAuthenticationOptions.JwtAuthenticationOptionsBuilder jwtSupplier(Supplier<String> jwtSupplier) Configure theSupplierto obtain a JWT authentication token.- Parameters:
jwtSupplier- must not be null.- Returns:
thisJwtAuthenticationOptions.JwtAuthenticationOptionsBuilder.
-
build
Build a newJwtAuthenticationOptionsinstance.- Returns:
- a new
JwtAuthenticationOptions.
-