Question

I see that the FedMetadata document can provide signout notification and subscription endpoints, and web.config defines the issuer url for sign in requests, but I can't find where WIF knows to send sign out requests. If the STS I'm using defines different endpoints for sign in and sign out requests, how could I access that in code or set that up in web.config?

Was it helpful?

Solution

By default, WIF will redirect to the same STS endpoint for sign-out as was used for sign-in. To direct to a different endpoint, you'll need to override the sign-out action using FederatedSignOut:

WSFederationAuthenticationModule authModule = FederatedAuthentication.WSFederationAuthenticationModule;

string signoutEndpoint = "http://STS/yourendpoint/";  // This can be stored in your configuration app settings
string signoutUrl = WSFederationAuthenticationModule.GetFederationPassiveSignOutUrl(signoutEndpoint, authModule.Realm, null);

WSFederationAuthenticationModule.FederatedSignOut(new Uri(signoutUrl), new Uri(currentPage));

Hopefully this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top