Package codes.grow.packages.vault
Class TokenAuth
java.lang.Object
codes.grow.packages.vault.TokenAuth
- All Implemented Interfaces:
AuthMethod
Uses an existing token (
X-Vault-Token); login checks it with lookup-self.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlogin(LoginContext context) Performs the login.method()Returns the method name, e.g.toString()
-
Constructor Details
-
TokenAuth
Creates the method.- Parameters:
token- the token- Throws:
ConfigException- when the token is empty
-
TokenAuth
Creates the method.- Parameters:
token- the token- Throws:
ConfigException- when the token is empty
-
-
Method Details
-
method
Description copied from interface:AuthMethodReturns the method name, e.g.approle.- Specified by:
methodin interfaceAuthMethod- Returns:
- the name
-
login
Description copied from interface:AuthMethodPerforms the login.- Specified by:
loginin interfaceAuthMethod- Parameters:
context- login helpers of the client- Returns:
- a future with the auth info
-
toString
-