Class SingleLogoutService
Supports the single logout profile.
Inherited Members
Namespace: ComponentSpace.SAML2.Profiles.SingleLogout
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class SingleLogoutService
Remarks
Refer to the Profiles for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Methods
ReceiveArtifactByHTTPArtifact(HttpRequestBase, bool, out HTTPArtifact, out string)
Receives the artifact using HTTP artifact with the artifact being in a form or query string.
Declaration
public static void ReceiveArtifactByHTTPArtifact(HttpRequestBase httpRequest, bool artifactInForm, out HTTPArtifact httpArtifact, out string relayState)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the artifact. |
| bool | artifactInForm | If |
| HTTPArtifact | httpArtifact | The returned artifact. |
| string | relayState | The returned relay state or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutMessageByHTTPPost(HttpRequestBase, out XmlElement, out string, out bool)
Receives the logout request or response using HTTP post.
Declaration
public static void ReceiveLogoutMessageByHTTPPost(HttpRequestBase httpRequest, out XmlElement logoutMessage, out string relayState, out bool isRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
| XmlElement | logoutMessage | The returned logout request or response. |
| string | relayState | The returned relay state or |
| bool | isRequest |
|
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutMessageByHTTPRedirect(HttpRequestBase, out XmlElement, out string, out bool, out bool, AsymmetricAlgorithm)
Receives the logout request or response using HTTP redirect.
Declaration
public static void ReceiveLogoutMessageByHTTPRedirect(HttpRequestBase httpRequest, out XmlElement logoutMessage, out string relayState, out bool isRequest, out bool signed, AsymmetricAlgorithm key)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the query string. |
| XmlElement | logoutMessage | The returned logout request or response. |
| string | relayState | The returned relay state or |
| bool | isRequest |
|
| bool | signed | Indicates whether the SAML message is signed. |
| AsymmetricAlgorithm | key | The key to verify the signature or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutRequestByHTTPPost(HttpRequestBase, out XmlElement, out string)
Receives the logout request using HTTP post.
Declaration
public static void ReceiveLogoutRequestByHTTPPost(HttpRequestBase httpRequest, out XmlElement logoutRequest, out string relayState)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
| XmlElement | logoutRequest | The returned logout request. |
| string | relayState | The returned relay state or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutRequestByHTTPRedirect(HttpRequestBase, out XmlElement, out string, out bool, AsymmetricAlgorithm)
Receives the logout request using HTTP redirect.
Declaration
public static void ReceiveLogoutRequestByHTTPRedirect(HttpRequestBase httpRequest, out XmlElement logoutRequest, out string relayState, out bool signed, AsymmetricAlgorithm key)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the query string. |
| XmlElement | logoutRequest | The returned logout request. |
| string | relayState | The returned relay state or |
| bool | signed | Indicates whether the SAML message is signed. |
| AsymmetricAlgorithm | key | The key to verify the signature or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutRequestBySOAP(HttpRequestBase)
Receives the logout request over SOAP.
Declaration
public static XmlElement ReceiveLogoutRequestBySOAP(HttpRequestBase httpRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the logout request. |
Returns
| Type | Description |
|---|---|
| XmlElement | The logout request. |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutResponseByHTTPPost(HttpRequestBase, out XmlElement, out string)
Receives the logout response using HTTP post.
Declaration
public static void ReceiveLogoutResponseByHTTPPost(HttpRequestBase httpRequest, out XmlElement logoutResponse, out string relayState)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
| XmlElement | logoutResponse | The returned logout response. |
| string | relayState | The returned relay state or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutResponseByHTTPRedirect(HttpRequestBase, out XmlElement, out string, out bool, AsymmetricAlgorithm)
Receives the logout response using HTTP redirect.
Declaration
public static void ReceiveLogoutResponseByHTTPRedirect(HttpRequestBase httpRequest, out XmlElement logoutResponse, out string relayState, out bool signed, AsymmetricAlgorithm key)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestBase | httpRequest | The HTTP request containing the query string. |
| XmlElement | logoutResponse | The returned logout response. |
| string | relayState | The returned relay state or |
| bool | signed | Indicates whether the SAML message is signed. |
| AsymmetricAlgorithm | key | The key to verify the signature or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the receive fails. |
SendArtifactByHTTPArtifact(HttpResponseBase, string, HTTPArtifact, string, bool)
Sends an artifact using the HTTP artifact binding.
Declaration
public static void SendArtifactByHTTPArtifact(HttpResponseBase httpResponse, string destinationURL, HTTPArtifact httpArtifact, string relayState, bool sendArtifactInForm)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpResponseBase | httpResponse | The HTTP response that will send the artifact. |
| string | destinationURL | The destination URL. |
| HTTPArtifact | httpArtifact | The artifact. |
| string | relayState | The relay state or |
| bool | sendArtifactInForm | If |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send fails. |
SendLogoutRequestByHTTPPost(HttpResponseBase, string, XmlElement, string)
Sends the logout request using HTTP post.
Declaration
public static void SendLogoutRequestByHTTPPost(HttpResponseBase httpResponse, string destinationURL, XmlElement logoutRequest, string relayState)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpResponseBase | httpResponse | The HTTP response that will return the form to post. |
| string | destinationURL | The destination URL. |
| XmlElement | logoutRequest | The logout request. |
| string | relayState | The relay state or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send fails. |
SendLogoutRequestByHTTPRedirect(HttpResponseBase, string, XmlElement, string, AsymmetricAlgorithm, string)
Sends the logout request using HTTP redirect.
Declaration
public static void SendLogoutRequestByHTTPRedirect(HttpResponseBase httpResponse, string destinationURL, XmlElement logoutRequest, string relayState, AsymmetricAlgorithm key, string signatureAlgorithm)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpResponseBase | httpResponse | The HTTP response used to perform the redirect. |
| string | destinationURL | The destination URL. |
| XmlElement | logoutRequest | The logout request. |
| string | relayState | The relay state or |
| AsymmetricAlgorithm | key | The key to generate the signature or |
| string | signatureAlgorithm | The signature algorithm or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send fails. |
SendLogoutRequestReceiveLogoutResponseBySOAP(string, XmlElement)
Sends the logout request and receives a logout response over SOAP.
Declaration
public static XmlElement SendLogoutRequestReceiveLogoutResponseBySOAP(string destinationURL, XmlElement logoutRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| string | destinationURL | The destination URL. |
| XmlElement | logoutRequest | The logout request. |
Returns
| Type | Description |
|---|---|
| XmlElement | The logout response. |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send/receive fails. |
SendLogoutResponseByHTTPPost(HttpResponseBase, string, XmlElement, string)
Sends the logout response using HTTP post.
Declaration
public static void SendLogoutResponseByHTTPPost(HttpResponseBase httpResponse, string destinationURL, XmlElement logoutResponse, string relayState)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpResponseBase | httpResponse | The HTTP response that will return the form to post. |
| string | destinationURL | The destination URL. |
| XmlElement | logoutResponse | The logout response. |
| string | relayState | The relay state or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send fails. |
SendLogoutResponseByHTTPRedirect(HttpResponseBase, string, XmlElement, string, AsymmetricAlgorithm, string)
Sends the logout response using HTTP redirect.
Declaration
public static void SendLogoutResponseByHTTPRedirect(HttpResponseBase httpResponse, string destinationURL, XmlElement logoutResponse, string relayState, AsymmetricAlgorithm key, string signatureAlgorithm)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpResponseBase | httpResponse | The HTTP response used to perform the redirect. |
| string | destinationURL | The destination URL. |
| XmlElement | logoutResponse | The logout response. |
| string | relayState | The relay state or |
| AsymmetricAlgorithm | key | The key to generate the signature or |
| string | signatureAlgorithm | The signature algorithm or |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send fails. |
SendLogoutResponseBySOAP(HttpResponseBase, XmlElement)
Sends the logout response over SOAP.
Declaration
public static void SendLogoutResponseBySOAP(HttpResponseBase httpResponse, XmlElement logoutResponse)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpResponseBase | httpResponse | The HTTP response used to send the logout response. |
| XmlElement | logoutResponse | The logout response. |
Exceptions
| Type | Condition |
|---|---|
| SAMLProfileException | Thrown when the send fails. |