Class JwtAuthentication
java.lang.Object
org.springframework.vault.authentication.JwtAuthentication
- All Implemented Interfaces:
AuthenticationStepsFactory,ClientAuthentication
public class JwtAuthentication
extends Object
implements ClientAuthentication, AuthenticationStepsFactory
JWT implementation of
ClientAuthentication. JwtAuthentication uses a
JSON Web Token to login into Vault. JWT and Role are sent in the login request to Vault
to obtain a VaultToken.- Since:
- 3.1
- Author:
- Nanne Baars
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJwtAuthentication(JwtAuthenticationOptions options, RestOperations restOperations) -
Method Summary
Modifier and TypeMethodDescriptionGet theAuthenticationStepsdescribing an authentication flow.login()Return aVaultToken.
-
Field Details
-
DEFAULT_JWT_AUTHENTICATION_PATH
- See Also:
-
-
Constructor Details
-
JwtAuthentication
- Parameters:
options- must not be null.restOperations- must not be null.
-
-
Method Details
-
getAuthenticationSteps
Description copied from interface:AuthenticationStepsFactoryGet theAuthenticationStepsdescribing an authentication flow.- Specified by:
getAuthenticationStepsin interfaceAuthenticationStepsFactory- Returns:
- the
AuthenticationStepsdescribing an authentication flow.
-
login
Description copied from interface:ClientAuthenticationReturn aVaultToken. This method can optionally log into Vault to obtain atoken.- Specified by:
loginin interfaceClientAuthentication- Returns:
- a
VaultToken. - Throws:
VaultException
-