public class CertificateAuthSettings extends Object
given().auth().certificate("keystore.jks", "my_password", certAuthSettings().allowAllHostNames());
| Constructor and Description |
|---|
CertificateAuthSettings()
Create a new instance of the Certificate Authentication Options with the default settings of:
keystoreType =
KeyStore.getDefaultType()
port = 443
trustStore = null
x509HostnameVerifier = SSLSocketFactory.STRICT_HOSTNAME_VERIFIER
|
| Modifier and Type | Method and Description |
|---|---|
CertificateAuthSettings |
allowAllHostnames()
Configure the CertificateAuthSettings to allow all host names.
|
CertificateAuthSettings |
and()
Syntactic sugar.
|
static CertificateAuthSettings |
certAuthSettings()
Create a new instance of
CertificateAuthSettings with default values. |
String |
getKeystoreType() |
int |
getPort() |
KeyStore |
getTrustStore() |
org.apache.http.conn.ssl.X509HostnameVerifier |
getX509HostnameVerifier() |
CertificateAuthSettings |
keystoreType(String keystoreType) |
CertificateAuthSettings |
port(int port) |
CertificateAuthSettings |
strictHostnames()
Configure the CertificateAuthSettings to use strict host name verification (this is the default behavior).
|
CertificateAuthSettings |
trustStore(KeyStore trustStore) |
CertificateAuthSettings |
using()
Syntactic sugar.
|
CertificateAuthSettings |
with()
Syntactic sugar.
|
CertificateAuthSettings |
x509HostnameVerifier(org.apache.http.conn.ssl.X509HostnameVerifier x509HostnameVerifier)
Configure the CertificateAuthSettings to use the provided
X509HostnameVerifier instance. |
public CertificateAuthSettings()
KeyStore.getDefaultType()SSLSocketFactory.STRICT_HOSTNAME_VERIFIERcertAuthSettings()public String getKeystoreType()
public int getPort()
public KeyStore getTrustStore()
public CertificateAuthSettings strictHostnames()
SSLSocketFactory.STRICT_HOSTNAME_VERIFIERpublic CertificateAuthSettings allowAllHostnames()
SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIERpublic CertificateAuthSettings x509HostnameVerifier(org.apache.http.conn.ssl.X509HostnameVerifier x509HostnameVerifier)
X509HostnameVerifier instance.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER,
allowAllHostnames()public org.apache.http.conn.ssl.X509HostnameVerifier getX509HostnameVerifier()
public CertificateAuthSettings keystoreType(String keystoreType)
keystoreType - The keystore type, by default KeyStore.getDefaultType().CertificateAuthSettings with the updated setting.public CertificateAuthSettings port(int port)
port - The port, by default 443.CertificateAuthSettings with the updated setting.public CertificateAuthSettings trustStore(KeyStore trustStore)
trustStore - The trust store to use, by default no (null) trust store is used.CertificateAuthSettings with the updated setting.public CertificateAuthSettings and()
public CertificateAuthSettings with()
public CertificateAuthSettings using()
public static CertificateAuthSettings certAuthSettings()
CertificateAuthSettings with default values. Same as called CertificateAuthSettings() but a bit more "fluent".CertificateAuthSettings with default values.Copyright © 2010–2014. All rights reserved.