Exemplo n.º 1
0
        public ActionResult Logout()
        {
            var httpCookie = this.Request.Cookies.Get("sessionId");

            if (httpCookie == null || !AuthenticatedManager.IsAuthenticated(httpCookie.Value))
            {
                return(this.RedirectToAction("Login"));
            }
            AuthenticatedManager.Logout(Request.Cookies.Get("sessionId").Value);
            return(this.RedirectToAction("All", "Cars"));
        }
Exemplo n.º 2
0
 public void Logout(HttpResponse response, HttpSession session)
 {
     AuthenticatedManager.Logout(response, session.Id);
     this.Redirect(response, "/home/topics");
 }