Table of Contents

Class HonuaAuthHandler<TOptions>

Namespace
Honua.Sdk.Abstractions.Authentication
Assembly
Honua.Sdk.Abstractions.dll

Shared authentication handler for Honua REST clients; rejects credentials over plain HTTP to non-loopback hosts.

public abstract class HonuaAuthHandler<TOptions> : DelegatingHandler, IDisposable where TOptions : class, IHonuaClientOptions, IHonuaAuthenticationOptions

Type Parameters

TOptions
Inheritance
HonuaAuthHandler<TOptions>
Implements
Inherited Members

Constructors

HonuaAuthHandler(TOptions, string, Action<Uri?>)

Initializes a new instance of the HonuaAuthHandler<TOptions> class.

protected HonuaAuthHandler(TOptions options, string serviceName, Action<Uri?> validateBaseAddress)

Parameters

options TOptions

The resolved client options carrying credentials and base address.

serviceName string

The logical Honua service name used in authentication diagnostics (for example "stac" or "admin").

validateBaseAddress Action<Uri>

The owning package's base-address validation callback, invoked once at construction so the failure carries the client-specific display name.

Methods

SendAsync(HttpRequestMessage, CancellationToken)

Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.

protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage

The HTTP request message to send to the server.

cancellationToken CancellationToken

A cancellation token to cancel operation.

Returns

Task<HttpResponseMessage>

The task object representing the asynchronous operation.

Exceptions

ArgumentNullException

The request was null.

OperationCanceledException

The cancellation token was canceled. This exception is stored into the returned task.