Table of Contents

Class HonuaAccessToken

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

Access token returned by a request-aware token provider.

public sealed class HonuaAccessToken
Inheritance
HonuaAccessToken
Inherited Members

Properties

Audience

Audience or resource granted by the identity provider, when returned.

public string? Audience { get; init; }

Property Value

string

ExpiresAtUtc

Optional UTC expiration instant for cache and refresh decisions.

public DateTimeOffset? ExpiresAtUtc { get; init; }

Property Value

DateTimeOffset?

Scopes

Scopes granted by the identity provider, when returned.

public IReadOnlyList<string> Scopes { get; init; }

Property Value

IReadOnlyList<string>

Token

Raw access token value. The SDK never emits this value through diagnostics.

public string Token { get; init; }

Property Value

string

TokenType

Authorization scheme for the token. Defaults to Bearer.

public string TokenType { get; init; }

Property Value

string

Methods

IsUsable(DateTimeOffset, TimeSpan)

Determines whether the token is usable after applying a refresh skew.

public bool IsUsable(DateTimeOffset utcNow, TimeSpan refreshSkew)

Parameters

utcNow DateTimeOffset

Current UTC time.

refreshSkew TimeSpan

Refresh skew to subtract from the expiration.

Returns

bool

true when the token is non-empty and not close to expiration.