private ActionResult ShowSignOutPage(string returnUrl) { // check for return url if (!string.IsNullOrWhiteSpace(returnUrl)) { ViewBag.ReturnUrl = returnUrl; } // check for existing sign in sessions var mgr = new SignInSessionsManager(HttpContext, _cookieName); var realms = mgr.GetEndpoints(); mgr.ClearEndpoints(); return(View("Signout", realms)); }
private ActionResult ProcessSignOut(SignOutRequestMessage message) { // check for return url if (!string.IsNullOrWhiteSpace(message.Reply)) { ViewBag.ReturnUrl = message.Reply; } // check for existing sign in sessions var mgr = new SignInSessionsManager(HttpContext, _cookieName); var realms = mgr.GetEndpoints(); mgr.ClearEndpoints(); return(View("Signout", realms)); }
private ActionResult ProcessWsFederationSignOutRedirect(SignOutRequestMessage message) { FederatedAuthentication.SessionAuthenticationModule.SignOut(); var mgr = new SignInSessionsManager(HttpContext, _cookieName); // check for return url if (!string.IsNullOrWhiteSpace(message.Reply)) //&& mgr.ContainsUrl(message.Reply)) { ViewBag.ReturnUrl = message.Reply; } // check for existing sign in sessions var realms = mgr.GetEndpoints(); mgr.ClearEndpoints(); return(Redirect(message.Reply)); }
private ActionResult ProcessSignOut(SignOutRequestMessage message) { // check for return url if (!string.IsNullOrWhiteSpace(message.Reply)) { ViewBag.ReturnUrl = message.Reply; } // check for existing sign in sessions var mgr = new SignInSessionsManager(HttpContext, _cookieName); var realms = mgr.GetEndpoints(); mgr.ClearEndpoints(); //System.IdentityModel.Services.FederatedAuthentication.SessionAuthenticationModule.SignOut(); //System.IdentityModel.Services.FederatedAuthentication.SessionAuthenticationModule.DeleteSessionTokenCookie(); //System.IdentityModel.Services.FederatedAuthentication.WSFederationAuthenticationModule.SignOut(); return(View("Signout", realms)); }
private ActionResult ProcessWSFederationSignOut(SignOutRequestMessage message) { FederatedAuthentication.SessionAuthenticationModule.SignOut(); var mgr = new SignInSessionsManager(HttpContext, _cookieName); // check for return url if (!string.IsNullOrWhiteSpace(message.Reply) && mgr.ContainsUrl(message.Reply)) { ViewBag.ReturnUrl = message.Reply; } // check for existing sign in sessions var realms = mgr.GetEndpoints(); mgr.ClearEndpoints(); return View("Signout", realms); }
private ActionResult ShowSignOutPage(string returnUrl) { var mgr = new SignInSessionsManager(HttpContext, _cookieName); // check for return url if (!string.IsNullOrWhiteSpace(returnUrl) && mgr.ContainsUrl(returnUrl)) { ViewBag.ReturnUrl = returnUrl; } // check for existing sign in sessions var realms = mgr.GetEndpoints(); mgr.ClearEndpoints(); return View("Signout", realms); }