Show / Hide Table of Contents

Class SoapBinding

Supports the SOAP binding.

Inheritance
System.Object
SoapBinding
Implements
ISoapBinding
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ComponentSpace.Saml2.Bindings.Soap
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SoapBinding : ISoapBinding
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.

Declaration
public SoapBinding(IHttpRequest request, IHttpResponse response, SamlHttpClient samlHttpClient, ILoggerFactory loggerFactory)
Parameters
Type Name Description
IHttpRequest request

The HTTP request.

IHttpResponse response

The HTTP response.

SamlHttpClient samlHttpClient

The SAML HTTP client.

Microsoft.Extensions.Logging.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
System.Boolean

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

ReceiveRequestAsync()

Receives a SAML request.

Declaration
public virtual async Task<ReceiveResult> ReceiveRequestAsync()
Returns
Type Description
System.Threading.Tasks.Task<ReceiveResult>

A task that represents the operation and returns the HTTP SOAP result.

Exceptions
Type Condition
SamlBindingException

Thrown if the SAML request cannot be received.

SendRequestReceiveResponseAsync(String, String)

Sends a SAML request and receives a SAML response.

Declaration
public virtual async Task<ReceiveResult> SendRequestReceiveResponseAsync(string url, string message)
Parameters
Type Name Description
System.String url

The URL to receive the SAML message.

System.String message

The SAML message XML.

Returns
Type Description
System.Threading.Tasks.Task<ReceiveResult>

A task that represents the operation and returns the HTTP SOAP result.

Exceptions
Type Condition
SamlBindingException

Thrown if the SAML request cannot be sent or the SAML response cannot be received.

SendResponseAsync(String)

Sends a SAML response.

Declaration
public virtual async Task SendResponseAsync(string message)
Parameters
Type Name Description
System.String message

The SAML message XML.

Returns
Type Description
System.Threading.Tasks.Task

A task that represents the operation.

Exceptions
Type Condition
SamlBindingException

Thrown if the SAML message cannot be sent.

Implements

ISoapBinding
In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2022. All rights reserved.