コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        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);
        }
コード例 #6
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);
        }