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); }
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); }