예제 #1
0
        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));
        }
예제 #2
0
        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 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 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);
        }
예제 #5
0
        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);
        }
예제 #6
0
 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);
 }