Class HttpPostBinding
- Namespace
- ComponentSpace.Saml2.Bindings.Post
- Assembly
- ComponentSpace.Saml2.dll
Supports the HTTP POST binding.
public class HttpPostBinding : IHttpPostBinding
- Inheritance
-
HttpPostBinding
- Implements
- Inherited Members
Remarks
Refer to the Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
HttpPostBinding(IHttpRequest, IHttpResponse, IHttpPostForm, ILoggerFactory)
Initializes a new instance of the HttpPostBinding class.
public HttpPostBinding(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.
ReceiveMessageAsync()
Receives a SAML message.
public virtual Task<ReceiveResult> ReceiveMessageAsync()
Returns
- Task<ReceiveResult>
A task that represents the operation and returns the HTTP Post result.
Exceptions
- SamlBindingException
Thrown if the SAML message cannot be received.
SendMessageAsync(string, string, bool, string)
Sends a SAML message.
public virtual Task SendMessageAsync(string url, string message, bool isResponse, string relayState)
Parameters
urlstringThe URL to receive the HTML form.
messagestringThe SAML message XML.
isResponseboolThe flag indicating whether a SAML request or response.
relayStatestringThe relay state or
nullif none.
Returns
- Task
A task that represents the operation.
Exceptions
- SamlBindingException
Thrown if the SAML message cannot be sent.