SignOut Method (Boolean)

WSFederationAuthenticationModule.SignOut Method (Boolean)

.NET Framework (current version)

Signs out of the current session and raises the appropriate events.

Namespace:   System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public virtual void SignOut(
	bool isIPRequest


Type: System.Boolean

true if the request was initiated by the IP-STS via a WS-Federation sign-out cleanup request message (“wsignoutcleanup1.0”); otherwise, false.

This method performs the actual work of deleting the current session and raising the appropriate sign-out events. The method does the following:

  1. Invokes the OnSigningOut method to raise the SigningOut event. An event handler can provide any necessary processing before the session is deleted. The P:System.IdentityModel.Services.SigningOutEventArgs.IsIpInitiated property is set according to the isIPRequest parameter.

  2. Calls the SessionAuthenticationModule.DeleteSessionTokenCookie method on the current session authentication manager to delete the session cookie.

    Invokes the OnSignedOut method to raise the SignedOut event.

  3. If an error occurs during sign-out processing, invokes the OnSignOutError method to raise the SignOutError event. An event handler can cancel the processing and prevent an exception from being returned to the caller of SignOut

You can call the WSFederationAuthenticationModule.SignOut method with the isIPRequest parameter set false to sign out of a session without performing a redirect. The method is ultimately called by all of the other overloaded SignOut methods (with the isIPRequest parameter set to false) to perform the sign out handling. The method is called from the WSFederationAuthenticationModule.CanReadSignInResponse(HttpRequestBase, Boolean) method with the isIPRequest parameter set true to sign out of the session when it is processing a WS-Federation sign-out clean-up message (“wsignoutcleanup1.0”).

No sign-out request message (“wsignout1.0”) is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the FederatedSignOut method.

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft