Example #1
0
        public CustomJsonResult Logout(string operater, string userId, string token)
        {
            var result = new CustomJsonResult();


            SSOUtil.Quit(token);

            result = new CustomJsonResult(ResultType.Success, ResultCode.Success, "ι€€ε‡ΊζˆεŠŸ");

            return(result);
        }
Example #2
0
        public static void Quit()
        {
            var userInfo = GetUserInfo();

            if (userInfo != null)
            {
                SSOUtil.Quit(userInfo.Token);

                var        context        = HttpContext.Current;
                var        request        = context.Request;
                var        response       = context.Response;
                HttpCookie cookie_session = request.Cookies[OwnRequest.SESSION_NAME];
                if (cookie_session != null)
                {
                    TimeSpan ts = new TimeSpan(-1, 0, 0, 0);
                    cookie_session.Expires = DateTime.Now.Add(ts);
                    response.AppendCookie(cookie_session);
                }
            }
        }