Пример #1
0
        public JsonResult StudentLogout()
        {
            var resultState = new ResultState();

            _helper.DeleteCookie("token");
            resultState.Success = true;
            resultState.Message = "注销成功";
            return(new JsonResult(resultState));
        }
Пример #2
0
        public IActionResult Logout()
        {
            IActionResult response = Unauthorized();

            string _cookieName = _cookieHelper.GetCookieName();

            _cookieHelper.DeleteCookie(_cookieName);

            response = Ok(new { redirectUrl = _configuration["AppSettings:loginUrl"] });

            return(response);
        }
Пример #3
0
 public void DeleteCookie()
 {
     _helper.DeleteCookie("cookieHelperKey");
 }