Class SoapBinding
- Namespace
- ComponentSpace.Saml2.Bindings.Soap
- Assembly
- ComponentSpace.Saml2.dll
Supports the SOAP binding.
public class SoapBinding : ISoapBinding
- Inheritance
-
SoapBinding
- Implements
- Inherited Members
Remarks
Refer to the Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
SoapBinding(IHttpRequest, IHttpResponse, SamlHttpClient, ILoggerFactory)
Initializes a new instance of the SoapBinding class.
public SoapBinding(IHttpRequest request, IHttpResponse response, SamlHttpClient samlHttpClient, ILoggerFactory loggerFactory)
Parameters
requestIHttpRequestThe HTTP request.
responseIHttpResponseThe HTTP response.
samlHttpClientSamlHttpClientThe SAML HTTP client.
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.
ReceiveRequestAsync()
Receives a SAML request.
public virtual Task<ReceiveResult> ReceiveRequestAsync()
Returns
- Task<ReceiveResult>
A task that represents the operation and returns the HTTP SOAP result.
Exceptions
- SamlBindingException
Thrown if the SAML request cannot be received.
SendRequestReceiveResponseAsync(string, string)
Sends a SAML request and receives a SAML response.
public virtual Task<ReceiveResult> SendRequestReceiveResponseAsync(string url, string message)
Parameters
Returns
- Task<ReceiveResult>
A task that represents the operation and returns the HTTP SOAP result.
Exceptions
- SamlBindingException
Thrown if the SAML request cannot be sent or the SAML response cannot be received.
SendResponseAsync(string)
Sends a SAML response.
public virtual Task SendResponseAsync(string message)
Parameters
messagestringThe SAML message XML.
Returns
- Task
A task that represents the operation.
Exceptions
- SamlBindingException
Thrown if the SAML message cannot be sent.