Class HttpArtifactBinding
- Namespace
- ComponentSpace.Saml2.Bindings.Artifact
- Assembly
- ComponentSpace.Saml2.dll
Supports the HTTP artifact binding.
public class HttpArtifactBinding : IHttpArtifactBinding
- Inheritance
-
HttpArtifactBinding
- Implements
- Inherited Members
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.
public HttpArtifactBinding(IHttpRequest request, IHttpResponse response, IHttpPostForm httpPostForm, ILoggerFactory loggerFactory)
Parameters
requestIHttpRequestThe HTTP request.
responseIHttpResponseThe HTTP response.
httpPostFormIHttpPostFormThe HTTP Post form generator.
loggerFactoryILoggerFactoryThe logger factory.
Methods
IsValid()
Indicates whether the current HTTP request is valid for the binding.
public virtual bool IsValid()
Returns
- bool
trueif the current HTTP request is valid for the binding; otherwisefalse.
ReceiveArtifactAsync()
Receives an HTTP artifact.
public virtual Task<ReceiveResult> ReceiveArtifactAsync()
Returns
- Task<ReceiveResult>
A task that represents the operation and returns the HTTP artifact result.
Exceptions
- SamlBindingException
Thrown if the HTTP artifact cannot be received.
SendArtifactAsync(string, ArtifactEncoding, HttpArtifact, string)
Sends an HTTP artifact.
public virtual Task SendArtifactAsync(string url, ArtifactEncoding encoding, HttpArtifact artifact, string relayState = null)
Parameters
urlstringThe URL to receive the artifact.
encodingArtifactEncodingThe HTTP artifact encoding used to transport the artifact.
artifactHttpArtifactThe HTTP artifact.
relayStatestringThe relay state or
nullif none.
Returns
- Task
A task that represents the operation.
Exceptions
- SamlBindingException
Thrown if the HTTP artifact cannot be sent.