2024-04-18 01:44:37 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
|
2024-07-21 05:45:02 +02:00
|
|
|
|
namespace Wino.Domain.Models.Authentication
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
|
|
|
|
|
public class TokenInformationBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public string AccessToken { get; set; }
|
|
|
|
|
|
public string RefreshToken { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// UTC date for token expiration.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public DateTime ExpiresAt { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the value indicating whether the token is expired or not.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsExpired => DateTime.UtcNow >= ExpiresAt;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|