Package com.couchbase.client.core.env
Class CertificateAuthenticator
- java.lang.Object
-
- com.couchbase.client.core.env.CertificateAuthenticator
-
- All Implemented Interfaces:
Authenticator
public class CertificateAuthenticator extends Object implements Authenticator
Performs authentication through a client certificate.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder context)
The authenticator gets the chance to attach the client certificate to the ssl context if needed.static CertificateAuthenticator
fromKey(PrivateKey key, String keyPassword, List<X509Certificate> keyCertChain)
static CertificateAuthenticator
fromKeyManagerFactory(Supplier<KeyManagerFactory> keyManagerFactory)
boolean
supportsNonTls()
If this authenticator supports non-encrypted connections.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.core.env.Authenticator
authHttpRequest, authKeyValueConnection, supportsTls
-
-
-
-
Method Detail
-
fromKeyManagerFactory
public static CertificateAuthenticator fromKeyManagerFactory(Supplier<KeyManagerFactory> keyManagerFactory)
-
fromKey
public static CertificateAuthenticator fromKey(PrivateKey key, String keyPassword, List<X509Certificate> keyCertChain)
-
applyTlsProperties
public void applyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder context)
Description copied from interface:Authenticator
The authenticator gets the chance to attach the client certificate to the ssl context if needed.- Specified by:
applyTlsProperties
in interfaceAuthenticator
- Parameters:
context
- the netty context builder
-
supportsNonTls
public boolean supportsNonTls()
Description copied from interface:Authenticator
If this authenticator supports non-encrypted connections.- Specified by:
supportsNonTls
in interfaceAuthenticator
-
-