2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00
esiur-dotnet/Esiur/Security/Membership/AuthorizationResults.cs
2024-06-21 16:37:48 +03:00

23 lines
714 B
C#

using Esiur.Net.Packets;
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Security.Membership
{
public class AuthorizationResults
{
public AuthorizationResultsResponse Response { get; set; }
public IIPAuthPacketIAuthDestination Destination { get; set; }
public IIPAuthPacketIAuthFormat RequiredFormat { get; set; }
public string Clue { get; set; }
public ushort Timeout { get; set; } // 0 means no timeout
public uint Reference { get; set; }
public DateTime Issue { get; set; } = DateTime.UtcNow;
public bool Expired => Timeout == 0 ? false : (DateTime.UtcNow - Issue).TotalSeconds > Timeout;
}
}