Table of Contents

Class HonuaOAuthAuthorizationCodeTokenProvider

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

OAuth/OIDC authorization-code provider with in-memory access-token refresh.

public sealed class HonuaOAuthAuthorizationCodeTokenProvider : IHonuaAccessTokenProvider
Inheritance
HonuaOAuthAuthorizationCodeTokenProvider
Implements
Inherited Members

Constructors

HonuaOAuthAuthorizationCodeTokenProvider(HttpClient, HonuaOAuthAuthorizationCodeTokenProviderOptions)

Initializes a new instance of the HonuaOAuthAuthorizationCodeTokenProvider class.

public HonuaOAuthAuthorizationCodeTokenProvider(HttpClient httpClient, HonuaOAuthAuthorizationCodeTokenProviderOptions options)

Parameters

httpClient HttpClient

HTTP client used to call the token endpoint.

options HonuaOAuthAuthorizationCodeTokenProviderOptions

Provider options.

Methods

GetAccessTokenAsync(HonuaAuthenticationRequest, CancellationToken)

Gets the current access token for the supplied SDK request context.

public ValueTask<HonuaAccessToken?> GetAccessTokenAsync(HonuaAuthenticationRequest request, CancellationToken cancellationToken = default)

Parameters

request HonuaAuthenticationRequest

Authentication request context.

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<HonuaAccessToken>

An access token, or null to omit the authorization credential.