/// <summary> /// 清空用户登录信息 /// </summary> private void ClearUserLoginInfo() { var cookie = Request.Cookies["token"]; if (cookie != null) { RedisCacheHelper.RemoveCache(cookie.Value); cookie.Expires = DateTime.Now.AddDays(-1); Response.Cookies["token"].Expires = cookie.Expires; } if (!string.IsNullOrEmpty(PageReq.GetSession("UserId"))) { Yinhe.ProcessingCenter.Permissions.AuthManage._().ReleaseCache(int.Parse(PageReq.GetSession("UserId"))); } #region //清除全局author GlobalBase.ReleaseAuthentication(); GlobalBase.ReleaseSysAuthentication(); //新权限缓存清楚 #endregion FormsAuthentication.SignOut(); PageReq.ClearSession(); #region 记录登出日志 dataOp.LogSysBehavior(SysLogType.Logout, HttpContext); #endregion }