The December 2012 ACS update includes support for a single one-shot release:
Using the WS-Federation Protocol. Web applications that use ACS to enable single sign-on (SSO) with identity providers using the WS-Federation protocol can now use single sign-on capabilities. When a user signs up a web application, ACS can automatically subscribe a user from an identity provider and from other applications that use the same identity provider.
This feature is enabled for WS-Federation identity providers, including Active Directory Federation Service 2.0 and the Windows Live ID (Microsoft Account). To enable single sign-on, ACS performs the following tasks for WS-Federation protocol endpoints:
ACS recognizes wsignoutcleanup1.0 messages from identity providers and responds by sending wsignoutcleanup1.0 messages to the relying party of the application.
ACS recognizes wsignout1.0 and requests messages from the relying party of applications and responses by sending wsignout1.0 messages to the identity of providers and wsignoutcleanup1.0 messages to the relying party of the application.
From Code Example: ASP.NET MVC 4 with federated output , perform an action similar to this to exit ACS:
(Note that the Windows Identity Foundation is now included in the .NET 4.5 Framework, so the new namespaces are lower)
using System.IdentityModel.Services; using System.IdentityModel.Services.Configuration; public ActionResult Logout() { // Load Identity Configuration FederationConfiguration config = FederatedAuthentication.FederationConfiguration; // Get wtrealm from WsFederationConfiguation Section string wtrealm = config.WsFederationConfiguration.Realm; string wreply; // Construct wreply value from wtrealm (This will be the return URL to your app) if (wtrealm.Last().Equals('/')) { wreply = wtrealm + "Logout"; } else { wreply = wtrealm + "/Logout"; } // Read the ACS Ws-Federation endpoint from web.Config // something like "https://<your-namespace>.accesscontrol.windows.net/v2/wsfederation" 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(); string signoutUrl = signoutRequestMessage.WriteQueryString(); return this.Redirect(signoutUrl); }
source share