public static string Decrypt(string token)
        {
            string data = Encryptor.Decrypt(token);

            string[] segments = data.Split(new[] { "::" }, StringSplitOptions.RemoveEmptyEntries);
            string   url      = segments[0];
            string   username = segments[1];

            LoginPersister.SignIn(username);

            return(url);
        }
Exemplo n.º 2
0
        public static bool Login(string email, string password, bool rememberMe = false)
        {
            if (string.IsNullOrEmpty(email))
            {
                return(false);
            }
            User user = AuthenticationService.ValidateLogin(email, password);

            if (user != null)
            {
                LoginPersister.SignIn(email, rememberMe);
            }

            return(Identity != null);
        }
Exemplo n.º 3
0
 public static void Logout()
 {
     //PermissionCurrent.RemovePermissinUser();
     LoginPersister.SignOut();
 }