Beispiel #1
0
        public async Task <IActionResult> UpdatePasswordAsync(string pre_password, string new_password)
        {
            string token = cookieHelper.GetCookies(HttpContext, "Token");

            if (token != null)
            {
                string url = GlobalVar.Author_url + "/JWT/UpdatePassword?token=" + token + "&pre_password="******"&new_password="******"", System.Net.Http.HttpMethod.Get);

                if (re)
                {
                    cookieHelper.DeleteCookies(HttpContext, "Token");
                    cookieHelper.DeleteCookies(HttpContext, "user_name");
                    cookieHelper.DeleteCookies(HttpContext, "user_role");
                }
                return(Json(re));
            }
            return(Json(false));
        }
Beispiel #2
0
 public ActionResult Logout()
 {
     CookieHelper.DeleteCookies("Context_UserInfo");
     return(RedirectToAction("Login"));
 }