- Introduced AuthorityAdvisoryAiOptions and related classes for managing advisory AI configurations, including remote inference options and tenant-specific settings. - Added AuthorityApiLifecycleOptions to control API lifecycle settings, including legacy OAuth endpoint configurations. - Implemented validation and normalization methods for both advisory AI and API lifecycle options to ensure proper configuration. - Created AuthorityNotificationsOptions and its related classes for managing notification settings, including ack tokens, webhooks, and escalation options. - Developed IssuerDirectoryClient and related models for interacting with the issuer directory service, including caching mechanisms and HTTP client configurations. - Added support for dependency injection through ServiceCollectionExtensions for the Issuer Directory Client. - Updated project file to include necessary package references for the new Issuer Directory Client library.
29 lines
802 B
C#
29 lines
802 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace StellaOps.Auth.Client;
|
|
|
|
/// <summary>
|
|
/// Represents an issued token with metadata.
|
|
/// </summary>
|
|
public sealed record StellaOpsTokenResult(
|
|
string AccessToken,
|
|
string TokenType,
|
|
DateTimeOffset ExpiresAtUtc,
|
|
IReadOnlyList<string> Scopes,
|
|
string? RefreshToken = null,
|
|
string? IdToken = null,
|
|
string? RawResponse = null)
|
|
{
|
|
/// <summary>
|
|
/// Temporary shim for callers expecting the legacy <c>ExpiresAt</c> member.
|
|
/// </summary>
|
|
public DateTimeOffset ExpiresAt => ExpiresAtUtc;
|
|
|
|
/// <summary>
|
|
/// Converts the result to a cache entry.
|
|
/// </summary>
|
|
public StellaOpsTokenCacheEntry ToCacheEntry()
|
|
=> new(AccessToken, TokenType, ExpiresAtUtc, Scopes, RefreshToken, IdToken);
|
|
}
|