Exemple #1
0
        protected void logoutButton_Click(object sender, EventArgs e)
        {
            // Logout locally.
            FormsAuthentication.SignOut();

            if (SAMLIdentityProvider.IsSSO())
            {
                // Request logout at the service providers.
                SAMLIdentityProvider.InitiateSLO(Response, null);
            }
            else
            {
                FormsAuthentication.RedirectToLoginPage();
            }
        }
Exemple #2
0
        public ActionResult Logout()
        {
            // Logout locally.
            FormsAuthentication.SignOut();

            if (SAMLIdentityProvider.IsSSO())
            {
                // Request logout at the service providers.
                SAMLIdentityProvider.InitiateSLO(Response, null);

                return(new EmptyResult());
            }

            return(RedirectToAction("Index", "Home"));
        }