Package codes.grow.packages.vault
Class AppRoleAuth
java.lang.Object
codes.grow.packages.vault.AppRoleAuth
- All Implemented Interfaces:
AuthMethod
AppRole login:
POST auth/<mount>/login {role_id, secret_id} (default mount
approle).-
Constructor Summary
ConstructorsConstructorDescriptionAppRoleAuth(String roleId, Secret secretId, String mount) Creates the method.AppRoleAuth(String roleId, String secretId) Creates the method on mountapprole. -
Method Summary
Modifier and TypeMethodDescriptionlogin(LoginContext context) Performs the login.method()Returns the method name, e.g.mount()Returns the mount.toString()
-
Constructor Details
-
AppRoleAuth
Creates the method on mountapprole.- Parameters:
roleId- role idsecretId- secret id, may be null for roles withoutbind_secret_id
-
AppRoleAuth
Creates the method.- Parameters:
roleId- role idsecretId- secret id, may be nullmount- auth mount path
-
-
Method Details
-
mount
Returns the mount.- Returns:
- the mount path
-
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
-