public JsonResult StudentLogout() { var resultState = new ResultState(); _helper.DeleteCookie("token"); resultState.Success = true; resultState.Message = "注销成功"; return(new JsonResult(resultState)); }
public IActionResult Logout() { IActionResult response = Unauthorized(); string _cookieName = _cookieHelper.GetCookieName(); _cookieHelper.DeleteCookie(_cookieName); response = Ok(new { redirectUrl = _configuration["AppSettings:loginUrl"] }); return(response); }
public void DeleteCookie() { _helper.DeleteCookie("cookieHelperKey"); }