HTTPVaultConnectorBuilder
with identical API.@Deprecated public final class HTTPVaultConnectorFactory extends VaultConnectorFactory
Constructor and Description |
---|
HTTPVaultConnectorFactory()
Deprecated.
Default empty constructor.
|
Modifier and Type | Method and Description |
---|---|
HTTPVaultConnector |
build()
Deprecated.
Build command, produces connector after initialization.
|
HTTPVaultConnector |
buildAndAuth()
Deprecated.
Build connector and authenticate with token set in factory or from environment.
|
HTTPVaultConnectorFactory |
fromEnv()
Deprecated.
Build connector based on the VAULT_ADDR} and
VAULT_CACERT (optional) environment variables. |
HTTPVaultConnectorFactory |
withHost(String host)
Deprecated.
Set hostname (default: 127.0.0.1).
|
HTTPVaultConnectorFactory |
withNumberOfRetries(int numberOfRetries)
Deprecated.
Define the number of retries to attempt on 5xx errors.
|
HTTPVaultConnectorFactory |
withoutTLS()
Deprecated.
Convenience Method for NOT using TLS.
|
HTTPVaultConnectorFactory |
withPort(Integer port)
Deprecated.
Set port (default: 8200).
|
HTTPVaultConnectorFactory |
withPrefix(String prefix)
Deprecated.
Set API prefix.
|
HTTPVaultConnectorFactory |
withSslContext(SSLContext sslContext)
Deprecated.
As of 0.8.0 this is no longer supported, please use
withTrustedCA(Path) or withTrustedCA(X509Certificate) . |
HTTPVaultConnectorFactory |
withTimeout(int milliseconds)
Deprecated.
Define a custom timeout for the HTTP connection.
|
HTTPVaultConnectorFactory |
withTLS()
Deprecated.
Convenience Method for TLS usage (enabled by default).
|
HTTPVaultConnectorFactory |
withTLS(boolean useTLS)
Deprecated.
Set TLS usage (default: TRUE).
|
HTTPVaultConnectorFactory |
withToken(String token)
Deprecated.
Set token for automatic authentication, using
buildAndAuth() . |
HTTPVaultConnectorFactory |
withTrustedCA(Path cert)
Deprecated.
Add a trusted CA certifiate for HTTPS connections.
|
HTTPVaultConnectorFactory |
withTrustedCA(X509Certificate cert)
Deprecated.
Add a trusted CA certifiate for HTTPS connections.
|
httpFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
http
public HTTPVaultConnectorFactory()
public HTTPVaultConnectorFactory withHost(String host)
host
- Hostname or IP addresspublic HTTPVaultConnectorFactory withPort(Integer port)
port
- Vault TCP portpublic HTTPVaultConnectorFactory withTLS(boolean useTLS)
useTLS
- use TLS or notpublic HTTPVaultConnectorFactory withTLS()
public HTTPVaultConnectorFactory withoutTLS()
public HTTPVaultConnectorFactory withPrefix(String prefix)
prefix
- Vault API prefix (default: "/v1/"public HTTPVaultConnectorFactory withTrustedCA(Path cert) throws VaultConnectorException
cert
- path to certificate fileVaultConnectorException
- on errorpublic HTTPVaultConnectorFactory withTrustedCA(X509Certificate cert)
cert
- path to certificate filepublic HTTPVaultConnectorFactory withSslContext(SSLContext sslContext)
withTrustedCA(Path)
or withTrustedCA(X509Certificate)
.withTrustedCA(java.nio.file.Path)
.sslContext
- the SSL contextpublic HTTPVaultConnectorFactory withToken(String token)
buildAndAuth()
.token
- Vault tokenpublic HTTPVaultConnectorFactory fromEnv() throws VaultConnectorException
VAULT_CACERT
(optional) environment variables.VaultConnectorException
- if Vault address from environment variables is malformedpublic HTTPVaultConnectorFactory withNumberOfRetries(int numberOfRetries)
numberOfRetries
- The number of retries to attempt on 5xx errors (default: 0)public HTTPVaultConnectorFactory withTimeout(int milliseconds)
milliseconds
- Timeout value in milliseconds.public HTTPVaultConnector build()
VaultConnectorBuilder
public HTTPVaultConnector buildAndAuth() throws VaultConnectorException
VaultConnectorBuilder
VaultConnectorException
- if authentication failedCopyright © 2016–2019. All rights reserved.