Class AuthenticatorWrapper

java.lang.Object
com.couchbase.client.core.env.AuthenticatorWrapper
All Implemented Interfaces:
Authenticator
Direct Known Subclasses:
DelegatingAuthenticator

@NullMarked @Internal public abstract class AuthenticatorWrapper extends Object implements Authenticator
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    @Nullable String
    Returns the value of the Authorization header to apply to HTTP requests, or null if no header should be applied.
    boolean
     
    protected abstract Authenticator
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AuthenticatorWrapper

      public AuthenticatorWrapper()
  • Method Details

    • wrapped

      protected abstract Authenticator wrapped()
    • authKeyValueConnection

      public void authKeyValueConnection(EndpointContext endpointContext, com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline)
      Description copied from interface: Authenticator
      Allows the authenticator to add KV handlers during connection bootstrap to perform authentication.
      Specified by:
      authKeyValueConnection in interface Authenticator
      Parameters:
      endpointContext - the endpoint context.
      pipeline - the pipeline when the endpoint is constructed.
    • authHttpRequest

      public void authHttpRequest(ServiceType serviceType, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpRequest request)
      Description copied from interface: Authenticator
      Allows to add authentication credentials to the http request for the given service.
      Specified by:
      authHttpRequest in interface Authenticator
      Parameters:
      serviceType - the service for this request.
      request - the http request.
    • getAuthHeaderValue

      public @Nullable String getAuthHeaderValue()
      Description copied from interface: Authenticator
      Returns the value of the Authorization header to apply to HTTP requests, or null if no header should be applied.
      Specified by:
      getAuthHeaderValue in interface Authenticator
    • applyTlsProperties

      public void applyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder sslContextBuilder)
      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 interface Authenticator
      Parameters:
      sslContextBuilder - the netty context builder
    • requiresTls

      public boolean requiresTls()
      Specified by:
      requiresTls in interface Authenticator