This commit is contained in:
@@ -28,6 +28,7 @@ namespace AyaNova.Api.Controllers
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly ApiServerState serverState;
|
||||
private readonly IMetrics metrics;
|
||||
private const int JWT_LIFETIME_DAYS=7;
|
||||
|
||||
/// <summary>
|
||||
/// ctor
|
||||
@@ -71,7 +72,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
int nFailedAuthDelay = 10000;
|
||||
|
||||
|
||||
|
||||
#if (DEBUG)
|
||||
nFailedAuthDelay = 1;
|
||||
|
||||
@@ -185,7 +186,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//create a new datetime offset of now in utc time
|
||||
var iat = new DateTimeOffset(DateTime.Now.ToUniversalTime(), TimeSpan.Zero);//timespan zero means zero time off utc / specifying this is a UTC datetime
|
||||
var exp = new DateTimeOffset(DateTime.Now.AddDays(30).ToUniversalTime(), TimeSpan.Zero);
|
||||
var exp = new DateTimeOffset(DateTime.Now.AddDays(JWT_LIFETIME_DAYS).ToUniversalTime(), TimeSpan.Zero);
|
||||
|
||||
var payload = new Dictionary<string, object>()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user