Class SAMLHttpRequest
Provides a mechanism for receiving a SAML protocol message through a non-standard HTTP request.
Inheritance
Implements
Inherited Members
Namespace: ComponentSpace.SAML2.Utility
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SAMLHttpRequest : HttpRequestBase, IDisposable
Constructors
SAMLHttpRequest()
Initializes a new instance of the SAMLHttpRequest
class.
Declaration
public SAMLHttpRequest()
SAMLHttpRequest(String, String, Boolean, Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Post binding.
Declaration
public SAMLHttpRequest(string samlMessage, string relayState, bool isSAMLRequest, Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.String | samlMessage | The SAML message base-64 encoded string. |
System.String | relayState | The relay state or |
System.Boolean | isSAMLRequest | The flag indicating whether this is a SAML request or response. |
System.Uri | url | The URL used to receive the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpRequest(String, String, Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Post binding.
Declaration
public SAMLHttpRequest(string samlMessage, string relayState, Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.String | samlMessage | The SAML message base-64 encoded string. |
System.String | relayState | The relay state or |
System.Uri | url | The URL used to receive the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpRequest(Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Redirect binding.
Declaration
public SAMLHttpRequest(Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | url | The URL including the SAML query string parameters. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpRequest(XmlElement, String, Boolean, AsymmetricAlgorithm, String, Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Redirect binding.
Declaration
public SAMLHttpRequest(XmlElement samlMessage, string relayState, bool isSAMLRequest, AsymmetricAlgorithm key, string signatureAlgorithm, Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | samlMessage | The SAML message XML. |
System.String | relayState | The relay state or |
System.Boolean | isSAMLRequest | The flag indicating whether this is a SAML request or response. |
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to generate the signature or |
System.String | signatureAlgorithm | The signature algorithm or |
System.Uri | url | The URL used to receive the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpRequest(XmlElement, String, Boolean, Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Post binding.
Declaration
public SAMLHttpRequest(XmlElement samlMessage, string relayState, bool isSAMLRequest, Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | samlMessage | The SAML message XML. |
System.String | relayState | The relay state or |
System.Boolean | isSAMLRequest | The flag indicating whether this is a SAML request or response. |
System.Uri | url | The URL used to receive the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpRequest(XmlElement, String, AsymmetricAlgorithm, String, Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Redirect binding.
Declaration
public SAMLHttpRequest(XmlElement samlMessage, string relayState, AsymmetricAlgorithm key, string signatureAlgorithm, Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | samlMessage | The SAML message XML. |
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 |
System.Uri | url | The URL used to receive the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpRequest(XmlElement, String, Uri, HttpCookieCollection)
Initializes a new instance of the SAMLHttpRequest
class.
The SAML message is received using the HTTP-Post binding.
Declaration
public SAMLHttpRequest(XmlElement samlMessage, string relayState, Uri url, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | samlMessage | The SAML message XML. |
System.String | relayState | The relay state or |
System.Uri | url | The URL used to receive the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
Properties
ContentLength
Gets the content length of the HTTP request used to receive the SAML message.
Declaration
public override int ContentLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The content length of the HTTP request used to receive the SAML message. |
Overrides
Cookies
Gets the collection of cookies.
Declaration
public override HttpCookieCollection Cookies { get; }
Property Value
Type | Description |
---|---|
System.Web.HttpCookieCollection | The collection of cookies. |
Overrides
Form
Gets the form variables used to receive the SAML message.
Declaration
public override NameValueCollection Form { get; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | The form variables used to receive the SAML message. |
Overrides
Headers
Gets the headers used to receive the SAML message.
Declaration
public override NameValueCollection Headers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | The headers used to receive the SAML message. |
Overrides
HttpMethod
Gets the HTTP method (Get or Post) used to receive the SAML message.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
System.String | The HTTP method used to receive the SAML message. |
Overrides
InputStream
Gets the input stream used to receive the SAML message.
Declaration
public override Stream InputStream { get; }
Property Value
Type | Description |
---|---|
System.IO.Stream | The input stream used to receive the SAML message. |
Overrides
IsSecureConnection
Gets the flag indicating whether the connection is secure (ie HTTPS).
Declaration
public override bool IsSecureConnection { get; }
Property Value
Type | Description |
---|---|
System.Boolean | The the flag indicating whether the connection is secure (ie HTTPS). |
Overrides
Path
Gets the path used to receive the SAML message.
Declaration
public override string Path { get; }
Property Value
Type | Description |
---|---|
System.String | The path used to receive the SAML message. |
Overrides
QueryString
Gets the query string variables used to receive the SAML message.
Declaration
public override NameValueCollection QueryString { get; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | The query string variables used to receive the SAML message. |
Overrides
RawUrl
Gets the raw URL used to receive the SAML message.
Declaration
public override string RawUrl { get; }
Property Value
Type | Description |
---|---|
System.String | The raw URL used to receive the SAML message. |
Overrides
RequestType
Gets the request type (Get or Post) used to receive the SAML message.
Declaration
public override string RequestType { get; set; }
Property Value
Type | Description |
---|---|
System.String | The request type used to receive the SAML message. |
Overrides
ServerVariables
Gets the server variables used to receive the SAML message.
Declaration
public override NameValueCollection ServerVariables { get; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | The server variables used to receive the SAML message. |
Overrides
Url
Gets the URL used to receive the SAML message.
Declaration
public override Uri Url { get; }
Property Value
Type | Description |
---|---|
System.Uri | The URL used to receive the SAML message. |
Overrides
Methods
Dispose()
Dispose of any unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Dispose of any unmanaged resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|