private void DoLogout(HttpContext context, bool IdPInitiated) { try { foreach (IAction action in Actions.Actions.GetActions()) { Trace.TraceMethodCalled(action.GetType(), "LogoutAction()"); action.LogoutAction(this, context, IdPInitiated); Trace.TraceMethodDone(action.GetType(), "LogoutAction()"); } } finally { if (SessionStore.CurrentSession != null) { // Always end with abandoning the session. Trace.TraceData(TraceEventType.Information, "Clearing session for userId: " + Saml20Identity.Current.Name); SessionStore.AbandonAllSessions(Saml20Identity.Current.Name); Trace.TraceData(TraceEventType.Verbose, "Session cleared."); } else { Trace.TraceData(TraceEventType.Warning, "The user was logged out but the session had already expired. Distributed session could therefore not be abandonded½"); } } }
private void DoSoapLogout(HttpContext context, string userId) { try { foreach (IAction action in Actions.Actions.GetActions()) { Trace.TraceMethodCalled(action.GetType(), "SoapLogoutAction()"); action.SoapLogoutAction(this, context, userId); Trace.TraceMethodDone(action.GetType(), "SoapLogoutAction()"); } } finally { // Always end with abandoning the session. Trace.TraceData(TraceEventType.Information, "Clearing all sessions related to user with id: " + userId); SessionStore.AbandonAllSessions(userId); Trace.TraceData(TraceEventType.Verbose, "Sessions cleared."); } }