Package codes.grow.packages.vault
Class UserpassAuth
java.lang.Object
codes.grow.packages.vault.UserpassAuth
- All Implemented Interfaces:
AuthMethod
Username/password login:
POST auth/<mount>/login/<username> {password}.-
Constructor Summary
ConstructorsConstructorDescriptionUserpassAuth(String username, Secret password, String mount) Creates the method.UserpassAuth(String username, String password) Creates the method on mountuserpass. -
Method Summary
Modifier and TypeMethodDescriptionlogin(LoginContext context) Performs the login.method()Returns the method name, e.g.toString()
-
Constructor Details
-
UserpassAuth
Creates the method on mountuserpass.- Parameters:
username- user namepassword- password
-
UserpassAuth
Creates the method.- Parameters:
username- user namepassword- passwordmount- auth mount path- Throws:
ConfigException- when the password 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
-