Beispiel #1
0
        public static void Logout()
        {
            PTIdentity  identity  = PTIdentity.UnauthenticatedIdentity();
            PTPrincipal principal = new PTPrincipal(identity);

            Dothan.ApplicationContext.User = principal;
        }
Beispiel #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);
        }
Beispiel #3
0
        public override bool IsInRole(string role)
        {
            PTIdentity identity = (PTIdentity)this.Identity;

            return(identity.IsInRole(role));
        }