How to make the STS request the User PIN after LogOut

1

I'm having trouble logging out of the application using STS.

After clicking the Logout button, I expire all the cookies I have, until I give the FederationAuthentication signout command, but it does not request the PIN again

Follow the logout code

 protected void BtnLogoutClick(object sender, EventArgs e)
        {
            WSFederationAuthenticationModule fam = FederatedAuthentication.WSFederationAuthenticationModule;
            try
            {
                FormsAuthentication.SignOut();
                Session.Abandon();
            }
            finally
            {
                fam.SignOut(true);
            }
            SignOutRequestMessage signOutRequest = new SignOutRequestMessage(new Uri(System.Configuration.ConfigurationManager.AppSettings["CORP.STS.Certificado"]), System.Configuration.ConfigurationManager.AppSettings["CORP.STS.UrlCliente"]);
            FormsAuthentication.RedirectToLoginPage();
        }

Is there something wrong?

    
asked by anonymous 11.03.2014 / 19:59

1 answer

1

I came to the following conclusion:

 protected void BtnLogoutClick(object sender, EventArgs e)
        {
            WSFederationAuthenticationModule fam = FederatedAuthentication.WSFederationAuthenticationModule;
            try
            {
                FormsAuthentication.SignOut();
                Session.Abandon();
            }
            finally
            {
                fam.SignOut(true);
            }
            var signOutRequest = new SignOutRequestMessage(new Uri(System.Configuration.ConfigurationManager.AppSettings["Corp.STS.Certificado"]), System.Configuration.ConfigurationManager.AppSettings["Corp.STS.UrlCliente"]);
            FormsAuthentication.RedirectToLoginPage();

        }

With the above code it is possible to expire the logged in user. The reason he did not ask for the PIN again is because the PIN was previously checked in the same browser session. So, as long as your opinion is verified in the browser (it is no use clearing cache or cookies) it will not ask for a PIN again.

    
24.03.2014 / 15:53