public class AppRoleAuthentication extends Object implements ClientAuthentication, AuthenticationStepsFactory
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()
.
AppRoleAuthenticationOptions
,
RestOperations
,
Auth Backend:
AppRoleConstructor and Description |
---|
AppRoleAuthentication(AppRoleAuthenticationOptions options,
RestOperations restOperations)
|
Modifier and Type | Method and Description |
---|---|
static AuthenticationSteps |
createAuthenticationSteps(AppRoleAuthenticationOptions options)
Creates a
AuthenticationSteps for AppRole authentication given
AppRoleAuthenticationOptions . |
AuthenticationSteps |
getAuthenticationSteps()
Get the
AuthenticationSteps describing an authentication flow. |
VaultToken |
login()
Return a
VaultToken . |
public AppRoleAuthentication(AppRoleAuthenticationOptions options, RestOperations restOperations)
options
- must not be null.restOperations
- must not be null.public static AuthenticationSteps createAuthenticationSteps(AppRoleAuthenticationOptions options)
AuthenticationSteps
for AppRole authentication given
AppRoleAuthenticationOptions
.options
- must not be null.AuthenticationSteps
for AppRole authentication.public VaultToken login()
ClientAuthentication
VaultToken
. This method can optionally log into Vault to obtain a
token
.login
in interface ClientAuthentication
VaultToken
.public AuthenticationSteps getAuthenticationSteps()
AuthenticationStepsFactory
AuthenticationSteps
describing an authentication flow.getAuthenticationSteps
in interface AuthenticationStepsFactory
AuthenticationSteps
describing an authentication flow.Copyright © 2016–2018 Pivotal Software, Inc.. All rights reserved.