using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CPRNIMS.Infrastructure.Models.Account { public class TokenInfo { public string? AccessToken { get; set; } public string? RefreshToken { get; set; } public DateTime ExpiresAt { get; set; } public DateTime IssuedAt { get; set; } public Dictionary? Claims { get; set; } public bool IsExpiringSoon(int minutesThreshold = 5) { return DateTime.UtcNow.AddMinutes(minutesThreshold) >= ExpiresAt; } public bool IsExpired() { return DateTime.UtcNow >= ExpiresAt; } } }