Class VaultHttpHeaders

java.lang.Object
org.springframework.vault.client.VaultHttpHeaders

public abstract class VaultHttpHeaders extends Object
Class providing utility methods to create Vault HTTP headers.
Author:
Mark Paluch
  • Field Details

    • VAULT_NAMESPACE

      public static final String VAULT_NAMESPACE
      The HTTP X-Vault-Namespace header field name.
      Since:
      2.2
      See Also:
    • VAULT_MFA_TOKEN

      public static final String VAULT_MFA_TOKEN
      The HTTP X-Vault-MFA MFA credentials header.
      Since:
      4.1
      See Also:
    • VAULT_TOKEN

      public static final String VAULT_TOKEN
      The HTTP X-Vault-Token header field name.
      See Also:
    • VAULT_WRAP_TTL

      public static final String VAULT_WRAP_TTL
      The HTTP X-Vault-Wrap-TTL header to wrap a response and return a unwrapping token instead of the actual response.
      Since:
      4.1
      See Also:
  • Method Details

    • from

      public static HttpHeaders from(VaultToken vaultToken)
      Create HttpHeaders given VaultToken. The resulting object can be used to authenticate HTTP requests.
      Parameters:
      vaultToken - must not be null.
      Returns:
      HttpHeaders containing the VaultToken.
    • singleton

      public static HttpHeaders singleton(String header, String... values)
      Create HttpHeaders containing only the specified header key with its values.
      Parameters:
      header - the header name.
      values - the header values.
      Returns:
      HttpHeaders containing the given header along with its values.