2024-02-24 15:27:03 +00:00
|
|
|
using System.Net;
|
|
|
|
|
2024-03-02 00:43:56 +00:00
|
|
|
namespace OliverBooth.Common.Data.Web.Users;
|
2024-02-24 15:27:03 +00:00
|
|
|
|
|
|
|
internal sealed class Session : ISession
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DateTimeOffset Created { get; set; }
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DateTimeOffset Expires { get; set; }
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public Guid Id { get; private set; } = Guid.NewGuid();
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public IPAddress IpAddress { get; set; } = IPAddress.None;
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DateTimeOffset LastAccessed { get; set; }
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public bool RequiresTotp { get; set; }
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DateTimeOffset Updated { get; set; }
|
|
|
|
|
2024-02-25 17:18:43 +00:00
|
|
|
/// <inheritdoc />
|
|
|
|
public string UserAgent { get; set; } = string.Empty;
|
|
|
|
|
2024-02-24 15:27:03 +00:00
|
|
|
/// <inheritdoc />
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
}
|