decePubClient/Models/CustomPrincipal.cs

21 lines
574 B
C#
Raw Normal View History

2022-02-14 01:51:37 +01:00
using System.Security.Principal;
namespace decePubClient.Models
{
public class CustomPrincipal : CustomIPrincipal
{
public string UserId { get; set; }
public string UserName { get; set; }
public string DisplayName { get; set; }
public string PictureUrl { get; set; }
public string ProfileUrl { get; set; }
public bool IsAdmin { get; set; } = false;
public IIdentity Identity { get; }
public CustomPrincipal(string userName, string authType) =>
Identity = new GenericIdentity(userName, authType);
public bool IsInRole(string role) => false;
}
}