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
ExpiresAtUtc
Optional UTC expiration instant for cache and refresh decisions.
public DateTimeOffset? ExpiresAtUtc { get; init; }
Property Value
Scopes
Scopes granted by the identity provider, when returned.
public IReadOnlyList<string> Scopes { get; init; }
Property Value
Token
Raw access token value. The SDK never emits this value through diagnostics.
public string Token { get; init; }
Property Value
TokenType
Authorization scheme for the token. Defaults to Bearer.
public string TokenType { get; init; }
Property Value
Methods
IsUsable(DateTimeOffset, TimeSpan)
Determines whether the token is usable after applying a refresh skew.
public bool IsUsable(DateTimeOffset utcNow, TimeSpan refreshSkew)
Parameters
utcNowDateTimeOffsetCurrent UTC time.
refreshSkewTimeSpanRefresh skew to subtract from the expiration.
Returns
- bool
truewhen the token is non-empty and not close to expiration.