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, VaultClient client) AppRoleAuthentication(AppRoleAuthenticationOptions options, RestClient client) AppRoleAuthentication(AppRoleAuthenticationOptions options, RestOperations restOperations) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationStepsCreate aAuthenticationStepsfor AppRole authentication givenAppRoleAuthenticationOptions.Get theAuthenticationStepsdescribing an authentication flow.login()Obtain aVaultTokenfor authenticated Vault access.
-
Constructor Details
-
AppRoleAuthentication
@Deprecated(since="4.1") public AppRoleAuthentication(AppRoleAuthenticationOptions options, RestOperations restOperations) Deprecated.- Parameters:
options- must not be null.restOperations- must not be null.
-
AppRoleAuthentication
- Parameters:
options- must not be null.client- must not be null.- Since:
- 4.0
-
AppRoleAuthentication
- Parameters:
options- must not be null.client- must not be null.- Since:
- 4.1
-
-
Method Details
-
createAuthenticationSteps
Create aAuthenticationStepsfor AppRole authentication givenAppRoleAuthenticationOptions.- Parameters:
options- must not be null.- Returns:
AuthenticationStepsfor AppRole authentication.- Since:
- 2.0
-
login
Description copied from interface:ClientAuthenticationObtain aVaultTokenfor authenticated Vault access.This method may perform an authentication request to Vault or return a cached or pre-configured token.
- Specified by:
loginin interfaceClientAuthentication- Returns:
- the Vault token for subsequent authenticated requests
- See Also:
-
getAuthenticationSteps
Description copied from interface:AuthenticationStepsFactoryGet theAuthenticationStepsdescribing an authentication flow.- Specified by:
getAuthenticationStepsin interfaceAuthenticationStepsFactory- Returns:
- the
AuthenticationStepsdescribing an authentication flow.
-
AppRoleAuthentication(AppRoleAuthenticationOptions, VaultClient)instead.