Package com.couchbase.client.core.env
Interface Authenticator
- All Known Implementing Classes:
CertificateAuthenticator,PasswordAuthenticator
public interface Authenticator
The
Authenticator encapsulates authentication strategies.
Please only use the implementations of this class, since the actual interfaces are unstable, internal and may change at any time!
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidapplyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder sslContextBuilder) The authenticator gets the chance to attach the client certificate to the ssl context if needed.default voidauthHttpRequest(ServiceType serviceType, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpRequest request) Allows to add authentication credentials to the http request for the given service.default voidauthKeyValueConnection(EndpointContext endpointContext, com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline) Allows the authenticator to add KV handlers during connection bootstrap to perform authentication.com.couchbase.client.core.deps.io.grpc.CallCredentialsdefault booleanIf this authenticator supports non-encrypted connections.default booleanIf this authenticator supports encrypted connections.
-
Method Details
-
authKeyValueConnection
@Internal default void authKeyValueConnection(EndpointContext endpointContext, com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline) Allows the authenticator to add KV handlers during connection bootstrap to perform authentication.- Parameters:
endpointContext- the endpoint context.pipeline- the pipeline when the endpoint is constructed.
-
authHttpRequest
@Internal default void authHttpRequest(ServiceType serviceType, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpRequest request) Allows to add authentication credentials to the http request for the given service.- Parameters:
serviceType- the service for this request.request- the http request.
-
protostellarCallCredentials
-
applyTlsProperties
@Internal default void applyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder sslContextBuilder) The authenticator gets the chance to attach the client certificate to the ssl context if needed.- Parameters:
sslContextBuilder- the netty context builder
-
supportsTls
If this authenticator supports encrypted connections. -
supportsNonTls
If this authenticator supports non-encrypted connections.
-