Files
2023-05-30 11:47:28 +02:00

32 lines
820 B
C#

using Microsoft.AspNetCore.Identity;
using Newtonsoft.Json;
using System.Security.Claims;
namespace WebDoorCreator.Data.User
{
/// <summary>
/// Classe generalizzaizone identity (user + roles + claims) x gestione semplificata in editing
/// </summary>
[Serializable]
public class UserData
{
#region Public Properties
public List<Claim> Claims { get; set; } = new List<Claim>();
public IdentityUser Identity { get; set; } = null!;
public bool isInactive
{
get
{
bool answ = Identity.LockoutEnd != null && Identity.LockoutEnd > DateTime.Now;
return answ;
}
}
public List<string> Roles { get; set; } = new List<string>();
#endregion Public Properties
}
}