2021-11-07 20:19:24 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace EFB.Models
|
|
|
|
{
|
|
|
|
public class TokenModel
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
Auto Router API Token Model
|
|
|
|
*/
|
2021-11-22 13:07:56 +00:00
|
|
|
public string TokenValue { get; init; }
|
2021-11-07 20:19:24 +00:00
|
|
|
public DateTime Expiration { get; init; }
|
|
|
|
|
2022-02-28 21:53:28 +00:00
|
|
|
public bool IsExpired()
|
|
|
|
{
|
2021-11-07 20:19:24 +00:00
|
|
|
//Check if the current time is beyond expiration
|
|
|
|
if (DateTime.UtcNow > Expiration)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2022-02-28 21:53:28 +00:00
|
|
|
|
2021-11-07 20:19:24 +00:00
|
|
|
}
|
|
|
|
}
|