Class SAMLHttpResponse
Provides a mechanism for sending a SAML protocol message through a non-standard HTTP response.
Inheritance
Implements
Inherited Members
Namespace: ComponentSpace.SAML2.Utility
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SAMLHttpResponse : HttpResponseBase, IDisposable
Constructors
SAMLHttpResponse()
Initializes a new instance of the SAMLHttpResponse
class.
Declaration
public SAMLHttpResponse()
SAMLHttpResponse(Stream, NameValueCollection, HttpCookieCollection)
Initializes a new instance of the SAMLHttpResponse
class.
Declaration
public SAMLHttpResponse(Stream outputStream, NameValueCollection headers, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | outputStream | The stream used to output the SAML message. |
System.Collections.Specialized.NameValueCollection | headers | The HTTP headers or |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpResponse(Stream, HttpCookieCollection)
Initializes a new instance of the SAMLHttpResponse
class.
Declaration
public SAMLHttpResponse(Stream outputStream, HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | outputStream | The stream used to output the SAML message. |
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
SAMLHttpResponse(HttpCookieCollection)
Initializes a new instance of the SAMLHttpResponse
class.
Declaration
public SAMLHttpResponse(HttpCookieCollection cookies)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpCookieCollection | cookies | The HTTP cookies or |
Properties
Cookies
Gets the collection of cookies.
Declaration
public override HttpCookieCollection Cookies { get; }
Property Value
Type | Description |
---|---|
System.Web.HttpCookieCollection | The collection of cookies. |
Overrides
Headers
Gets the collection of headers.
Declaration
public override NameValueCollection Headers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | The collection of headers. |
Overrides
OutputStream
Gets the output stream used to send the SAML message.
For the SAML HTTP-Post binding, the output stream contains the encoded SAML message wrapped in an HTML form.
Declaration
public override Stream OutputStream { get; }
Property Value
Type | Description |
---|---|
System.IO.Stream | The output stream used to send the SAML message. |
Overrides
URL
Gets the redirect URL.
For the SAML HTTP-Redirect binding, the URL includes the encoded SAML message.
Declaration
public string URL { get; }
Property Value
Type | Description |
---|---|
System.String | The redirect URL. |
Methods
AddHeader(String, String)
Adds an HTTP header.
Declaration
public override void AddHeader(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The header name. |
System.String | value | The header value. |
Overrides
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 |
|
GetOutputAsString()
Reads the output stream as a string.
Declaration
public string GetOutputAsString()
Returns
Type | Description |
---|---|
System.String | The output as a string. |
Redirect(String, Boolean)
Redirects to the specified URL.
Declaration
public override void Redirect(string url, bool endResponse)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The target location. |
System.Boolean | endResponse | The flag indicating whether to terminate the current process. |