Couchbase .NET SDK | 3.9.0
Search Results for

    Show / Hide Table of Contents

    Class BaseAuthenticator

    Base class for authenticators that provides shared configuration logic.

    Inheritance
    object
    BaseAuthenticator
    CertificateAuthenticator
    JwtAuthenticator
    PasswordAuthenticator
    Implements
    IAuthenticator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Couchbase.Core.IO.Authentication.Authenticators
    Assembly: Couchbase.NetClient.dll
    Syntax
    public abstract class BaseAuthenticator : IAuthenticator

    Properties

    | Edit this page View Source

    AuthenticatorType

    Allows for easier type checking of authenticators without incurring the overhead of type checking against its concrete class.

    Declaration
    public abstract AuthenticatorType AuthenticatorType { get; }
    Property Value
    Type Description
    AuthenticatorType
    | Edit this page View Source

    CanReauthenticateKv

    Determines whether this authenticator can be used to re-authenticate existing KV connections. E.g. JWT authenticator should re-authenticate existing KV connections when the token is refreshed, while the password and certificate authenticators leave existing connections untouched.

    Declaration
    public abstract bool CanReauthenticateKv { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SupportsNonTls

    Indicates whether this authenticator supports non-TLS connections.

    Declaration
    public abstract bool SupportsNonTls { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SupportsTls

    Indicates whether this authenticator supports TLS connections.

    Declaration
    public abstract bool SupportsTls { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    AuthenticateClientWebSocket(ClientWebSocket)

    Takes a ClientWebSocket and applies authentication (e.g., setting headers).

    Declaration
    public abstract void AuthenticateClientWebSocket(ClientWebSocket clientWebSocket)
    Parameters
    Type Name Description
    ClientWebSocket clientWebSocket

    A ClientWebSocket object.

    | Edit this page View Source

    AuthenticateHttpHandler(HttpMessageHandler, ClusterOptions, ICertificateValidationCallbackFactory, ILogger<object>?)

    The base implementation configures the RemoteCertificateValidationCallback on the HttpMessageHandler. Derived classes can override to provide client certificates or other settings.

    Declaration
    public virtual void AuthenticateHttpHandler(HttpMessageHandler handler, ClusterOptions clusterOptions, ICertificateValidationCallbackFactory callbackFactory, ILogger<object>? logger = null)
    Parameters
    Type Name Description
    HttpMessageHandler handler
    ClusterOptions clusterOptions
    ICertificateValidationCallbackFactory callbackFactory
    ILogger<object> logger
    | Edit this page View Source

    AuthenticateHttpRequest(HttpRequestMessage)

    Adds authentication to an HTTP request (e.g., Authorization header).

    Declaration
    public abstract void AuthenticateHttpRequest(HttpRequestMessage request)
    Parameters
    Type Name Description
    HttpRequestMessage request

    The HTTP request to authenticate.

    | Edit this page View Source

    AuthenticateSslStream(SslStream, string, ClusterOptions, ICertificateValidationCallbackFactory, CancellationToken, ILogger<object>?)

    Takes an SSL stream, applies authentication (e.g. client certificates) and connects.

    Declaration
    public virtual Task AuthenticateSslStream(SslStream sslStream, string targetHost, ClusterOptions clusterOptions, ICertificateValidationCallbackFactory callbackFactory, CancellationToken cancellationToken, ILogger<object>? logger = null)
    Parameters
    Type Name Description
    SslStream sslStream

    The SslStream to authenticate

    string targetHost

    The target host to connect to

    ClusterOptions clusterOptions

    The ClusterOptions

    ICertificateValidationCallbackFactory callbackFactory

    An ICertificateValidationCallbackFactory implementation

    CancellationToken cancellationToken

    A CancellationToken

    ILogger<object> logger

    An optional logger

    Returns
    Type Description
    Task
    | Edit this page View Source

    GetClientCertificates(ILogger<object>?)

    Gets client certificates for mTLS authentication, if applicable.

    Declaration
    public virtual X509Certificate2Collection? GetClientCertificates(ILogger<object>? logger = null)
    Parameters
    Type Name Description
    ILogger<object> logger
    Returns
    Type Description
    X509Certificate2Collection

    Client certificates, or null if not using certificate authentication.

    Implements

    IAuthenticator
    • Edit this page
    • View Source
    In this article
    Back to top © 2026 Couchbase, Inc.