Class AppRoleAuthentication
java.lang.Object
org.springframework.vault.authentication.AppRoleAuthentication
- All Implemented Interfaces:
AuthenticationStepsFactory,ClientAuthentication
public class AppRoleAuthentication
extends Object
implements ClientAuthentication, AuthenticationStepsFactory
AppRole implementation of
ClientAuthentication. RoleId and SecretId (optional)
are sent in the login request to Vault to obtain a VaultToken.
AppRoleAuthentication can be configured for push and pull mode by setting
AppRoleAuthenticationOptions.getSecretId().
- Author:
- Mark Paluch, Vincent Le Nair, Christophe Tafani-Dereeper
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAppRoleAuthentication(AppRoleAuthenticationOptions options, RestOperations restOperations) -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationStepsCreates aAuthenticationStepsfor AppRole authentication givenAppRoleAuthenticationOptions.Get theAuthenticationStepsdescribing an authentication flow.login()Return aVaultToken.
-
Constructor Details
-
AppRoleAuthentication
- Parameters:
options- must not be null.restOperations- must not be null.
-
-
Method Details
-
createAuthenticationSteps
Creates aAuthenticationStepsfor AppRole authentication givenAppRoleAuthenticationOptions.- Parameters:
options- must not be null.- Returns:
AuthenticationStepsfor AppRole authentication.- Since:
- 2.0
-
login
Description copied from interface:ClientAuthenticationReturn aVaultToken. This method can optionally log into Vault to obtain atoken.- Specified by:
loginin interfaceClientAuthentication- Returns:
- a
VaultToken.
-
getAuthenticationSteps
Description copied from interface:AuthenticationStepsFactoryGet theAuthenticationStepsdescribing an authentication flow.- Specified by:
getAuthenticationStepsin interfaceAuthenticationStepsFactory- Returns:
- the
AuthenticationStepsdescribing an authentication flow.
-