Table of Contents

Interface IAuthProvider

Namespace
OpenShell
Assembly
OpenShell.Sdk.dll

Supplies per-request authentication headers.

public interface IAuthProvider

Properties

SendsCredentials

True when the provider attaches credentials, so transport safety checks apply.

bool SendsCredentials { get; }

Property Value

bool

Methods

ApplyAsync(HttpRequestMessage, CancellationToken)

Adds authentication headers to an outgoing request.

ValueTask ApplyAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage
cancellationToken CancellationToken

Returns

ValueTask

TryRecoverAsync(CancellationToken)

Called after the gateway answered Unauthenticated. Returns true when credentials were renewed and the call is worth retrying once.

ValueTask<bool> TryRecoverAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

ValueTask<bool>