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 Link icon

    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.
    com.couchbase.client.core.deps.io.grpc.CallCredentials
     
    default boolean
    If this authenticator supports non-encrypted connections.
    default boolean
    If this authenticator supports encrypted connections.
  • Method Details Link icon

    • authKeyValueConnection Link icon

      @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 Link icon

      @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 Link icon

      @Nullable @Internal com.couchbase.client.core.deps.io.grpc.CallCredentials protostellarCallCredentials()
    • applyTlsProperties Link icon

      @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 Link icon

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

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