vertx / io.vertx.config.vault.client / SlimVaultClient

# SlimVaultClient

`open class SlimVaultClient`

A very simple Vault client - does not intend to be complete.

Author
Clement Escoffier

### Constructors

<init> | `SlimVaultClient(vertx: Vertx, configuration: JsonObject)` Creates an instance of SlimVaultClient.

### Properties

TOKEN_HEADER | `static val TOKEN_HEADER: String`

### Functions

close | `open fun close(): Unit` Closes the client.
createToken | `open fun createToken(tokenRequest: TokenRequest, resultHandler: Handler<AsyncResult<Auth>>): Unit` Creates a new token.
delete | `open fun delete(path: String, resultHandler: Handler<AsyncResult<Void>>): Unit` Deletes a secret from `path`.
getToken | `open fun getToken(): String`
list | `open fun list(path: String, resultHandler: Handler<AsyncResult<MutableList<String>>>): Unit` Lists secrets from path (children).
loginWithAppRole | `open fun loginWithAppRole(roleId: String, secretId: String, resultHandler: Handler<AsyncResult<Auth>>): Unit` Logs in against the `AppRole` backend.
loginWithCert | `open fun loginWithCert(resultHandler: Handler<AsyncResult<Auth>>): Unit` Logs in against the `Cert` backend. Certificates are configured directly on the client instance.
loginWithUserCredentials | `open fun loginWithUserCredentials(username: String, password: String, resultHandler: Handler<AsyncResult<Auth>>): Unit` Logs in against the `userpass` backend.
lookupSelf | `open fun lookupSelf(resultHandler: Handler<AsyncResult<Lookup>>): Unit` Looks up for the current token metadata.
read | `open fun read(path: String, responseHandler: Handler<AsyncResult<Secret>>): Unit` Reads a secret from `path`.
renewSelf | `open fun renewSelf(leaseDurationInSecond: Long, resultHandler: Handler<AsyncResult<Auth>>): Unit` Renews the current token.
setToken | `open fun setToken(token: String): SlimVaultClient` Sets the token.
write | `open fun write(path: String, secrets: JsonObject, resultHandler: Handler<AsyncResult<Secret>>): Unit` Write a secret to `path`.