23 lines
588 B
C#
23 lines
588 B
C#
namespace AutobusApi.Infrastructure.Identity;
|
|
|
|
public class RefreshToken
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
public string Value { get; set; } = null!;
|
|
|
|
public DateTime CreationDateTimeUtc { get; set; }
|
|
|
|
public DateTime ExpirationDateTimeUtc { get; set; }
|
|
|
|
public DateTime? RevokationDateTimeUtc { get; set; }
|
|
|
|
public bool IsExpired => DateTime.UtcNow >= ExpirationDateTimeUtc;
|
|
|
|
public bool IsActive => RevokationDateTimeUtc is null && !IsExpired;
|
|
|
|
public int ApplicationUserId { get; set; }
|
|
|
|
public ApplicationUser ApplicationUser { get; set; } = null!;
|
|
}
|