Class HttpArtifactBinding
Supports the HTTP artifact binding.
Implements
Inherited Members
Namespace: ComponentSpace.Saml2.Bindings.Artifact
Assembly: ComponentSpace.Saml2.dll
Syntax
public class HttpArtifactBinding : IHttpArtifactBinding
Remarks
Refer to the Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
HttpArtifactBinding(IHttpRequest, IHttpResponse, IHttpPostForm, ILoggerFactory)
Initializes a new instance of the HttpArtifactBinding class.
Declaration
public HttpArtifactBinding(IHttpRequest request, IHttpResponse response, IHttpPostForm httpPostForm, ILoggerFactory loggerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IHttpRequest | request | The HTTP request. |
| IHttpResponse | response | The HTTP response. |
| IHttpPostForm | httpPostForm | The HTTP Post form generator. |
| ILoggerFactory | loggerFactory | The logger factory. |
Methods
IsValid()
Indicates whether the current HTTP request is valid for the binding.
Declaration
public virtual bool IsValid()
Returns
| Type | Description |
|---|---|
| bool |
|
ReceiveArtifactAsync()
Receives an HTTP artifact.
Declaration
public virtual Task<ReceiveResult> ReceiveArtifactAsync()
Returns
| Type | Description |
|---|---|
| Task<ReceiveResult> | A task that represents the operation and returns the HTTP artifact result. |
Exceptions
| Type | Condition |
|---|---|
| SamlBindingException | Thrown if the HTTP artifact cannot be received. |
SendArtifactAsync(string, ArtifactEncoding, HttpArtifact, string)
Sends an HTTP artifact.
Declaration
public virtual Task SendArtifactAsync(string url, ArtifactEncoding encoding, HttpArtifact artifact, string relayState = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | url | The URL to receive the artifact. |
| ArtifactEncoding | encoding | The HTTP artifact encoding used to transport the artifact. |
| HttpArtifact | artifact | The HTTP artifact. |
| string | relayState | The relay state or |
Returns
| Type | Description |
|---|---|
| Task | A task that represents the operation. |
Exceptions
| Type | Condition |
|---|---|
| SamlBindingException | Thrown if the HTTP artifact cannot be sent. |