using System;
using System.Collections.Generic;
namespace StellaOps.Auth.Client;
///
/// Represents an issued token with metadata.
///
public sealed record StellaOpsTokenResult(
string AccessToken,
string TokenType,
DateTimeOffset ExpiresAtUtc,
IReadOnlyList Scopes,
string? RefreshToken = null,
string? IdToken = null,
string? RawResponse = null)
{
///
/// Temporary shim for callers expecting the legacy ExpiresAt member.
///
public DateTimeOffset ExpiresAt => ExpiresAtUtc;
///
/// Converts the result to a cache entry.
///
public StellaOpsTokenCacheEntry ToCacheEntry()
=> new(AccessToken, TokenType, ExpiresAtUtc, Scopes, RefreshToken, IdToken);
}