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);
        }
 private bool IsValidReplyTo(string url)
 {
     // check to see if the URL is in the RPs we've logged into
     var mgr = new SignInSessionsManager(HttpContext, _cookieName, ConfigurationRepository.Global.MaximumTokenLifetime);
     return mgr.ContainsUrl(url);
 }