using System.Collections.Generic; using System.Security.Principal; namespace MonNamespace_Security { public class UserIdentity : IIdentity { private bool _IsAuthenticated; private string _AuthenticationType; private int _userId; private string _login; public UserIdentity(int userid, string login, bool isAuthenticated, string authenticationType) { _userId = userid; _login = login; _IsAuthenticated = isAuthenticated; _AuthenticationType = authenticationType; } public string FirstName { get; set; } public string LastName { get; set; } public List Roles { get; set; } string IIdentity.AuthenticationType { get { return _AuthenticationType; } } bool IIdentity.IsAuthenticated { get { return _IsAuthenticated; } } string IIdentity.Name { get { return _login; } } } }