27 lines
676 B
C#
27 lines
676 B
C#
namespace adas_core.Domain.Models.Recording;
|
|
|
|
/// <summary>
|
|
/// Represents a grant of access, typically used to convey permissions or authorization rights within a system.
|
|
/// </summary>
|
|
public class AccessGrant
|
|
{
|
|
private int _expiresIn;
|
|
|
|
public string? AccessToken { get; set; }
|
|
|
|
public int ExpiresIn
|
|
{
|
|
get => _expiresIn;
|
|
set
|
|
{
|
|
_expiresIn = value;
|
|
Expires = DateTime.Now.AddSeconds(value);
|
|
}
|
|
}
|
|
|
|
public string? Scope { get; set; }
|
|
public string? TokenType { get; set; }
|
|
public DateTime Expires { get; private set; }
|
|
|
|
public bool IsExpired => DateTime.Now.CompareTo(Expires) >= 0;
|
|
} |