mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
api: add EnvVaultToken constant. (#2413)
This commit is contained in:
parent
a93f12ba4e
commit
aae23b1ea1
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ const EnvVaultInsecure = "VAULT_SKIP_VERIFY"
|
|||
const EnvVaultTLSServerName = "VAULT_TLS_SERVER_NAME"
|
||||
const EnvVaultWrapTTL = "VAULT_WRAP_TTL"
|
||||
const EnvVaultMaxRetries = "VAULT_MAX_RETRIES"
|
||||
const EnvVaultToken = "VAULT_TOKEN"
|
||||
|
||||
// WrappingLookupFunc is a function that, given an HTTP verb and a path,
|
||||
// returns an optional string duration to be used for response wrapping (e.g.
|
||||
|
|
@ -273,7 +274,7 @@ func NewClient(c *Config) (*Client, error) {
|
|||
config: c,
|
||||
}
|
||||
|
||||
if token := os.Getenv("VAULT_TOKEN"); token != "" {
|
||||
if token := os.Getenv(EnvVaultToken); token != "" {
|
||||
client.SetToken(token)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue