public static void ReloadPrincipal() { string loggedUser = User.UserName; var identity = new ConcentratorIdentity(loggedUser); var principal = new ConcentratorPrincipal(identity); Session[SessionPrincipalKey] = principal; }
public static bool Login(string username, string password) { if (String.IsNullOrEmpty(username) || String.IsNullOrEmpty(password)) { return(false); } ConcentratorIdentity identity = new ConcentratorIdentity(username, password); if (identity.IsAuthenticated) { ConcentratorPrincipal principal = new ConcentratorPrincipal(identity); Client.User = principal; } return(identity.IsAuthenticated); }
public ConcentratorPrincipal(ConcentratorIdentity identity) { _identity = identity; }