/// <summary> /// Crezione identity non autenticata /// </summary> public static void Logout() { Current = new RubricaPrincipal(RubricaIdentity.UnauthenticatedIdentity()); }
/// <summary> /// Impostazione oggetto Principal /// </summary> /// <param name="identity"></param> /// <returns></returns> private static bool SetPrincipal(RubricaIdentity identity) { RubricaPrincipal.Current = new RubricaPrincipal(identity); return(identity.IsAuthenticated); }
/// <summary> /// /// </summary> /// <param name="credentials"></param> /// <returns></returns> public static bool Login(SecurityCredentials credentials) { return(SetPrincipal(RubricaIdentity.GetIdentity(credentials))); }