Class SingleLogoutService
Supports the single logout profile.
Inheritance
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, Boolean, 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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the artifact. |
System.Boolean | artifactInForm | If |
HTTPArtifact | httpArtifact | The returned artifact. |
System.String | relayState | The returned relay state or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutMessageByHTTPPost(HttpRequestBase, out XmlElement, out String, out Boolean)
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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
System.Xml.XmlElement | logoutMessage | The returned logout request or response. |
System.String | relayState | The returned relay state or |
System.Boolean | isRequest |
|
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutMessageByHTTPRedirect(HttpRequestBase, out XmlElement, out String, out Boolean, out Boolean, 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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the query string. |
System.Xml.XmlElement | logoutMessage | The returned logout request or response. |
System.String | relayState | The returned relay state or |
System.Boolean | isRequest |
|
System.Boolean | signed | Indicates whether the SAML message is signed. |
System.Security.Cryptography.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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
System.Xml.XmlElement | logoutRequest | The returned logout request. |
System.String | relayState | The returned relay state or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutRequestByHTTPRedirect(HttpRequestBase, out XmlElement, out String, out Boolean, 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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the query string. |
System.Xml.XmlElement | logoutRequest | The returned logout request. |
System.String | relayState | The returned relay state or |
System.Boolean | signed | Indicates whether the SAML message is signed. |
System.Security.Cryptography.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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the logout request. |
Returns
Type | Description |
---|---|
System.Xml.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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
System.Xml.XmlElement | logoutResponse | The returned logout response. |
System.String | relayState | The returned relay state or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
ReceiveLogoutResponseByHTTPRedirect(HttpRequestBase, out XmlElement, out String, out Boolean, 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 |
---|---|---|
System.Web.HttpRequestBase | httpRequest | The HTTP request containing the query string. |
System.Xml.XmlElement | logoutResponse | The returned logout response. |
System.String | relayState | The returned relay state or |
System.Boolean | signed | Indicates whether the SAML message is signed. |
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to verify the signature or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
SendArtifactByHTTPArtifact(HttpResponseBase, String, HTTPArtifact, String, Boolean)
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 |
---|---|---|
System.Web.HttpResponseBase | httpResponse | The HTTP response that will send the artifact. |
System.String | destinationURL | The destination URL. |
HTTPArtifact | httpArtifact | The artifact. |
System.String | relayState | The relay state or |
System.Boolean | 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 |
---|---|---|
System.Web.HttpResponseBase | httpResponse | The HTTP response that will return the form to post. |
System.String | destinationURL | The destination URL. |
System.Xml.XmlElement | logoutRequest | The logout request. |
System.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 |
---|---|---|
System.Web.HttpResponseBase | httpResponse | The HTTP response used to perform the redirect. |
System.String | destinationURL | The destination URL. |
System.Xml.XmlElement | logoutRequest | The logout request. |
System.String | relayState | The relay state or |
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to generate the signature or |
System.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 |
---|---|---|
System.String | destinationURL | The destination URL. |
System.Xml.XmlElement | logoutRequest | The logout request. |
Returns
Type | Description |
---|---|
System.Xml.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 |
---|---|---|
System.Web.HttpResponseBase | httpResponse | The HTTP response that will return the form to post. |
System.String | destinationURL | The destination URL. |
System.Xml.XmlElement | logoutResponse | The logout response. |
System.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 |
---|---|---|
System.Web.HttpResponseBase | httpResponse | The HTTP response used to perform the redirect. |
System.String | destinationURL | The destination URL. |
System.Xml.XmlElement | logoutResponse | The logout response. |
System.String | relayState | The relay state or |
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to generate the signature or |
System.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 |
---|---|---|
System.Web.HttpResponseBase | httpResponse | The HTTP response used to send the logout response. |
System.Xml.XmlElement | logoutResponse | The logout response. |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the send fails. |