Ejemplo n.º 1
0
        /// <summary>
        /// Clear the current user session.
        /// </summary>
        public ActionResult SWILogout()
        {
            writeDebug("SWILogout");

            try
            {
                if (WebUser != null)
                {
                    WebUser.Logout();
                }
                //Audit
                Audit.LogAudit(AuditType.Logout, WebUser);
                Audit.LogEventAudit(AuditType.EventLoggedUsers, SealSecurity.LoggedUsers.Count(i => i.IsAuthenticated).ToString());
                //Clear session
                NavigationContext.Navigations.Clear();
                setSessionValue(SessionUser, null);
                setSessionValue(SessionNavigationContext, null);
                setSessionValue(SessionUploadedFiles, null);
                CreateWebUser();

                return(Json(new { }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(HandleSWIException(ex));
            }
        }
Ejemplo n.º 2
0
 public ActionResult SWILogout()
 {
     try
     {
         if (WebUser != null)
         {
             WebUser.Logout();
         }
         CreateWebUser();
         return(Json(new { }));
     }
     catch (Exception ex)
     {
         return(HandleSWIException(ex));
     }
 }
Ejemplo n.º 3
0
        public ActionResult SWILogout()
        {
            writeDebug("SWILogout");

            try
            {
                if (WebUser != null)
                {
                    WebUser.Logout();
                }
                //Audit
                Audit.LogAudit(AuditType.Logout, WebUser);
                Audit.LogEventAudit(AuditType.EventLoggedUsers, SealSecurity.LoggedUsers.Count(i => i.IsAuthenticated).ToString());
                return(Json(new { }));
            }
            catch (Exception ex)
            {
                return(HandleSWIException(ex));
            }
        }
Ejemplo n.º 4
0
        public ActionResult SWILogout()
        {
            writeDebug("SWILogout");

            //Audit
            Audit.LogAudit(AuditType.Logout, WebUser, null, null, null);

            try
            {
                if (WebUser != null)
                {
                    WebUser.Logout();
                }
                return(Json(new { }));
            }
            catch (Exception ex)
            {
                return(HandleSWIException(ex));
            }
        }