libvault v0.2.3 Vault.Auth.Token

Token Auth Adapter. Checks a provided token for validity, and saves if valid. Useful for local dev, or writing a CLI that uses the .vault-token file in the home directory.

Vault Docs

Link to this section Summary

Functions

Log in with an existing vault token. Auth path not required.

Link to this section Functions

Link to this function

login(vault, params)

Log in with an existing vault token. Auth path not required.

Examples

# Atom map
{:ok, token, ttl} = Vault.Auth.Token.login(vault, %{token: local_token})

# String map
{:ok, token, ttl} = Vault.Auth.Token.login(vault, %{"token" => local_token})