fix session lifespan
This commit is contained in:
parent
8629883f88
commit
6746a02398
1 changed files with 2 additions and 2 deletions
|
@ -4,8 +4,8 @@ namespace Femto.Modules.Auth.Models;
|
||||||
|
|
||||||
public class Session(Guid userId, bool isStrong)
|
public class Session(Guid userId, bool isStrong)
|
||||||
{
|
{
|
||||||
private static readonly TimeSpan ValidityPeriod = TimeSpan.FromSeconds(5);
|
private static readonly TimeSpan ValidityPeriod = TimeSpan.FromMinutes(15);
|
||||||
private static readonly TimeSpan RefreshBuffer = TimeSpan.FromMinutes(0);
|
private static readonly TimeSpan RefreshBuffer = TimeSpan.FromMinutes(5);
|
||||||
public string Id { get; } = Convert.ToBase64String(GetBytes(32));
|
public string Id { get; } = Convert.ToBase64String(GetBytes(32));
|
||||||
public Guid UserId { get; } = userId;
|
public Guid UserId { get; } = userId;
|
||||||
public DateTimeOffset Expires { get; } = DateTimeOffset.UtcNow + ValidityPeriod;
|
public DateTimeOffset Expires { get; } = DateTimeOffset.UtcNow + ValidityPeriod;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue