Table of Contents

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

request IHttpRequest

The HTTP request.

response IHttpResponse

The HTTP response.

samlHttpClient SamlHttpClient

The SAML HTTP client.

loggerFactory ILoggerFactory

The logger factory.

Methods

IsValid()

Indicates whether the current HTTP request is valid for the binding.

public virtual bool IsValid()

Returns

bool

true if the current HTTP request is valid for the binding; otherwise false.

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

url string

The URL to receive the SAML message.

message string

The SAML message XML.

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

message string

The SAML message XML.

Returns

Task

A task that represents the operation.

Exceptions

SamlBindingException

Thrown if the SAML message cannot be sent.