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 Type Method Description
    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.
    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.
    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.
    default boolean supportsNonTls()
    If this authenticator supports non-encrypted connections.
    default boolean supportsTls()
    If 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.
    • 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

      @Internal default boolean supportsTls()
      If this authenticator supports encrypted connections.
    • supportsNonTls

      @Internal default boolean supportsNonTls()
      If this authenticator supports non-encrypted connections.