Edit

Share via


WSFederationAuthenticationModule.SignOut Method

Definition

Signs out of the current session.

Overloads

SignOut()

Signs out of the current session and requests a redirect back to the URL specified in the current HTTP request.

SignOut(Boolean)

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

SignOut(String)

Signs out of the current session and requests a redirect back to the specified URL.

SignOut(String, Boolean)

Signs out of the current session and requests a redirect back to the specified URL.

Remarks

Deletes the current session.

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.

SignOut()

Signs out of the current session and requests a redirect back to the URL specified in the current HTTP request.

public:
 virtual void SignOut();
public virtual void SignOut ();
abstract member SignOut : unit -> unit
override this.SignOut : unit -> unit
Public Overridable Sub SignOut ()

Remarks

Deletes the current session and redirects the browser back to the URL specified in the current HTTP request.

Invokes the WSFederationAuthenticationModule.SignOut(String) method with the redirectUrl parameter set to the URL of the current request.

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.

Applies to

SignOut(Boolean)

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

public:
 virtual void SignOut(bool isIPRequest);
public virtual void SignOut (bool isIPRequest);
abstract member SignOut : bool -> unit
override this.SignOut : bool -> unit
Public Overridable Sub SignOut (isIPRequest As Boolean)

Parameters

isIPRequest
Boolean

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

Remarks

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 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.

Applies to

SignOut(String)

Signs out of the current session and requests a redirect back to the specified URL.

public:
 virtual void SignOut(System::String ^ redirectUrl);
public virtual void SignOut (string redirectUrl);
abstract member SignOut : string -> unit
override this.SignOut : string -> unit
Public Overridable Sub SignOut (redirectUrl As String)

Parameters

redirectUrl
String

The URL to which the browser should be redirected after the session is deleted.

Exceptions

redirectUrl is not a valid URI.

Remarks

Deletes the current session and redirects the browser back to the specified URL.

Invokes the WSFederationAuthenticationModule.SignOut(String, Boolean) method with the redirectUrl parameter and with the initiateSignoutCleanup set false.

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.

Applies to

SignOut(String, Boolean)

Signs out of the current session and requests a redirect back to the specified URL.

public:
 virtual void SignOut(System::String ^ redirectUrl, bool initiateSignoutCleanup);
public virtual void SignOut (string redirectUrl, bool initiateSignoutCleanup);
abstract member SignOut : string * bool -> unit
override this.SignOut : string * bool -> unit
Public Overridable Sub SignOut (redirectUrl As String, initiateSignoutCleanup As Boolean)

Parameters

redirectUrl
String

The URL to which the browser should be redirected after sign-out.

initiateSignoutCleanup
Boolean

Always set false. Setting this parameter to true is not supported.

Exceptions

redirectUrl is not a valid URI.

The WSFederationAuthenticationModule class throws this exception if initiateSignoutCleanup is true. Do not set this parameter to true.

Remarks

Deletes the current session and redirects the browser back to the specified URL.

Invokes the WSFederationAuthenticationModule.SignOut(Boolean) method with the initiateSignoutCleanup parameter set false.

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.

Applies to