I am using ACS 2.0 in my MVC 4 application.
It is already configured to log in and works for various vendors, including ADFS. I need to implement logout functions.
As this question is already outdated, I used the code for these samples :
Here's what it looks like:
FederationConfiguration config = FederatedAuthentication.FederationConfiguration;
string wtrealm = config.WsFederationConfiguration.Realm;
string wreply = wtrealm;
string wsFederationEndpoint = ConfigurationManager.AppSettings["ida:Issuer"];
SignOutRequestMessage signoutRequestMessage = new SignOutRequestMessage(new Uri(wsFederationEndpoint));
signoutRequestMessage.Parameters.Add("wreply", wreply);
signoutRequestMessage.Parameters.Add("wtrealm", wtrealm);
FederatedAuthentication.SessionAuthenticationModule.SignOut();
var signoutUrl = signoutRequestMessage.WriteQueryString();
As a result, I get the URL of the output to which I have to redirect, it will take out tokens and send me back. The URL is as follows:
https://myacsnamespace.accesscontrol.windows.net/v2/wsfederation?wa=wsignout1.0&wreply=http%3a%2f%2flocalhost%3a61192%2f&wtrealm=http%3a%2f%2flocalhost%3a61192%2f
, , Google, Yahoo Microsoft.
, , , .
ADFS, :
, , ACS , ADFS, .
- , ACS ?
!