Couchbase .NET SDK | 3.9.0
Search Results for

    Show / Hide Table of Contents

    Class JwtAuthenticator

    Authenticator using JSON Web Tokens (JWT). Uses SASL OAUTHBEARER for KV connections and Bearer token for HTTP requests.

    Inheritance
    object
    BaseAuthenticator
    JwtAuthenticator
    Implements
    IAuthenticator
    Inherited Members
    BaseAuthenticator.GetClientCertificates(ILogger<object>)
    BaseAuthenticator.AuthenticateHttpHandler(HttpMessageHandler, ClusterOptions, ICertificateValidationCallbackFactory, ILogger<object>)
    BaseAuthenticator.AuthenticateSslStream(SslStream, string, ClusterOptions, ICertificateValidationCallbackFactory, CancellationToken, ILogger<object>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Couchbase.Core.IO.Authentication.Authenticators
    Assembly: Couchbase.NetClient.dll
    Syntax
    [InterfaceStability(Level.Uncommitted)]
    public sealed class JwtAuthenticator : BaseAuthenticator, IAuthenticator

    Constructors

    | Edit this page View Source

    JwtAuthenticator(string)

    Creates a new JwtAuthenticator with the specified token.

    Declaration
    public JwtAuthenticator(string token)
    Parameters
    Type Name Description
    string token

    The JSON Web Token.

    Fields

    | Edit this page View Source

    Token

    Declaration
    public readonly string Token
    Field Value
    Type Description
    string

    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 override AuthenticatorType AuthenticatorType { get; }
    Property Value
    Type Description
    AuthenticatorType
    Overrides
    BaseAuthenticator.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 override bool CanReauthenticateKv { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseAuthenticator.CanReauthenticateKv
    | Edit this page View Source

    SupportsNonTls

    Indicates whether this authenticator supports non-TLS connections.

    Declaration
    public override bool SupportsNonTls { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseAuthenticator.SupportsNonTls
    | Edit this page View Source

    SupportsTls

    Indicates whether this authenticator supports TLS connections.

    Declaration
    public override bool SupportsTls { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseAuthenticator.SupportsTls

    Methods

    | Edit this page View Source

    AuthenticateClientWebSocket(ClientWebSocket)

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

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

    A ClientWebSocket object.

    Overrides
    BaseAuthenticator.AuthenticateClientWebSocket(ClientWebSocket)
    | Edit this page View Source

    AuthenticateHttpRequest(HttpRequestMessage)

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

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

    The HTTP request to authenticate.

    Overrides
    BaseAuthenticator.AuthenticateHttpRequest(HttpRequestMessage)

    Implements

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