Class TokenAuthentication
java.lang.Object
org.springframework.vault.authentication.TokenAuthentication
- All Implemented Interfaces:
 AuthenticationStepsFactory,ClientAuthentication
public class TokenAuthentication
extends Object
implements ClientAuthentication, AuthenticationStepsFactory
Static Token-based 
ClientAuthentication method.- Author:
 - Mark Paluch
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionTokenAuthentication(String token) Create a newTokenAuthenticationwith a statictoken.TokenAuthentication(VaultToken token) Create a newTokenAuthenticationwith a statictoken. - 
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationStepscreateAuthenticationSteps(VaultToken token, boolean selfLookup) Creates aAuthenticationStepsfor token authentication givenVaultToken.Get theAuthenticationStepsdescribing an authentication flow.login()Return aVaultToken. 
- 
Constructor Details
- 
TokenAuthentication
Create a newTokenAuthenticationwith a statictoken.- Parameters:
 token- the Vault token, must not be empty or null.
 - 
TokenAuthentication
Create a newTokenAuthenticationwith a statictoken.- Parameters:
 token- the Vault token, must not be null.
 
 - 
 - 
Method Details
- 
createAuthenticationSteps
Creates aAuthenticationStepsfor token authentication givenVaultToken.- Parameters:
 token- must not be null.selfLookup- true to perform a self-lookup using the givenVaultToken. Self-lookup will create aLoginTokenand provide renewability and TTL.- Returns:
 AuthenticationStepsfor token 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. 
 
 -