using System; using System.Collections.Generic; using System.Linq; using System.Security.Principal; using System.Text; using System.Threading.Tasks; namespace CAPI.Custom.Security { public interface ICustomPrincipal : IPrincipal { int Id { get; set; } } public class CustomPrincipal : ICustomPrincipal { public IIdentity Identity { get; private set; } public bool IsInRole(string role) => false; public CustomPrincipal(string name) { this.Identity = new GenericIdentity(name); } public int Id { get; set; } } }