Exemplo n.º 1
0
        public static void Logout()
        {
            PTIdentity  identity  = PTIdentity.UnauthenticatedIdentity();
            PTPrincipal principal = new PTPrincipal(identity);

            Dothan.ApplicationContext.User = principal;
        }
Exemplo n.º 2
0
        public static bool Login(string username, string password)
        {
            PTIdentity identity = PTIdentity.GetIdentity(username, password);

            if (identity.IsAuthenticated)
            {
                PTPrincipal principal = new PTPrincipal(identity);
                Dothan.ApplicationContext.User = principal;
            }
            return(identity.IsAuthenticated);
        }