View Source Vault.Auth.Token (libvault v0.2.4)

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

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

examples

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})