Table of Contents

Interface IConnectorAuthProvider

Namespace
JD.AI.Connectors.Sdk
Assembly
JD.AI.Connectors.Sdk.dll

Provides authentication credentials or tokens for a connector. Implement this interface to support API key, OAuth, bearer token, or other auth schemes.

public interface IConnectorAuthProvider

Properties

Scheme

The authentication scheme name (e.g. "ApiKey", "OAuth2", "Bearer").

string Scheme { get; }

Property Value

string

Methods

GetAuthorizationHeaderAsync(CancellationToken)

Retrieves the authorization header value for an outbound request. Return null if no authorization header should be added.

Task<string?> GetAuthorizationHeaderAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<string>

IsAuthenticatedAsync(CancellationToken)

Checks whether credentials are currently available and valid.

Task<bool> IsAuthenticatedAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<bool>