Example #1
0
 /// <summary>
 /// Crezione identity non autenticata
 /// </summary>
 public static void Logout()
 {
     Current = new RubricaPrincipal(RubricaIdentity.UnauthenticatedIdentity());
 }
Example #2
0
        /// <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);
        }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="credentials"></param>
 /// <returns></returns>
 public static bool Login(SecurityCredentials credentials)
 {
     return(SetPrincipal(RubricaIdentity.GetIdentity(credentials)));
 }