Class LoginTokenAdapter
java.lang.Object
org.springframework.vault.authentication.LoginTokenAdapter
- All Implemented Interfaces:
ClientAuthentication
Adapts tokens created by a
ClientAuthentication to a LoginToken. Allows
decoration of a ClientAuthentication object to perform a self-lookup after
token retrieval to obtain the remaining TTL, renewability, accessor and token type.
Using this adapter decrements the usage counter for the created token.
- Since:
- 1.1
- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLoginTokenAdapter(ClientAuthentication delegate, RestOperations restOperations) -
Method Summary
-
Constructor Details
-
LoginTokenAdapter
- Parameters:
delegate- must not be null.restOperations- must not be null.
-
-
Method Details
-
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
-