confluent-kafka-dotnet
Show / Hide Table of Contents

Class AbstractBearerAuthenticationHeaderValueProvider

Abstract base class for providers that supply Bearer authentication header values.

Inheritance
object
AbstractBearerAuthenticationHeaderValueProvider
AzureIMDSBearerAuthenticationHeaderValueProvider
BearerAuthenticationHeaderValueProvider
Implements
IAuthenticationBearerHeaderValueProvider
IAuthenticationHeaderValueProvider
IDisposable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Confluent.SchemaRegistry
Assembly: Confluent.SchemaRegistry.dll
Syntax
public abstract class AbstractBearerAuthenticationHeaderValueProvider : IAuthenticationBearerHeaderValueProvider, IAuthenticationHeaderValueProvider, IDisposable

Constructors

AbstractBearerAuthenticationHeaderValueProvider(string, string, int, int, int)

Initializes a new instance of the AbstractBearerAuthenticationHeaderValueProvider class.

Declaration
protected AbstractBearerAuthenticationHeaderValueProvider(string logicalCluster, string identityPool, int maxRetries, int retriesWaitMs, int retriesMaxWaitMs)
Parameters
TypeNameDescription
stringlogicalCluster

The logical cluster name.

stringidentityPool

The identity pool.

intmaxRetries

The maximum number of retries for token generation.

intretriesWaitMs

The base wait time in milliseconds between retries.

intretriesMaxWaitMs

The maximum wait time in milliseconds between retries.

Methods

CreateTokenRequest()

Creates an HTTP request message for token acquisition.

Declaration
protected abstract HttpRequestMessage CreateTokenRequest()
Returns
TypeDescription
HttpRequestMessage

An HTTP request message configured for token acquisition.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

DisposeSecrets()

Disposes of any sensitive information held by this provider.

Declaration
protected virtual void DisposeSecrets()

FetchToken(HttpRequestMessage)

Fetches a token using the provided reusable HTTP request message. Can also generate a new request if needed.

Declaration
protected abstract Task<string> FetchToken(HttpRequestMessage request)
Parameters
TypeNameDescription
HttpRequestMessagerequest

The HTTP request message to use for fetching the token.

Returns
TypeDescription
Task<string>

A task that represents the asynchronous operation. The task result contains the fetched token as a string.

GetAuthenticationHeader()

Get the authentication header for HTTP requests

Declaration
public AuthenticationHeaderValue GetAuthenticationHeader()
Returns
TypeDescription
AuthenticationHeaderValue

The authentication header for HTTP request messages

GetIdentityPool()

Get the identity pool for HTTP requests

Declaration
public string GetIdentityPool()
Returns
TypeDescription
string

The identity pool for HTTP request messages

GetLogicalCluster()

Get the logical cluster for HTTP requests

Declaration
public string GetLogicalCluster()
Returns
TypeDescription
string

The logical cluster for HTTP request messages

InitOrRefreshAsync()

Initializes or refreshes the authentication credentials.

Declaration
public Task InitOrRefreshAsync()
Returns
TypeDescription
Task

A task representing the asynchronous initialization or refresh operation.

NeedsInitOrRefresh()

Declaration
public abstract bool NeedsInitOrRefresh()
Returns
TypeDescription
bool

Implements

IAuthenticationBearerHeaderValueProvider
IAuthenticationHeaderValueProvider
IDisposable
In this article