Show / Hide Table of Contents

Class HttpPostBinding

Supports the HTTP POST binding.

Inheritance
System.Object
HttpPostBinding
Implements
IHttpPostBinding
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.Post
Assembly: ComponentSpace.Saml2.dll
Syntax
public class HttpPostBinding : IHttpPostBinding
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.

Declaration
public HttpPostBinding(IHttpRequest request, IHttpResponse response, IHttpPostForm httpPostForm, ILoggerFactory loggerFactory)
Parameters
Type Name Description
IHttpRequest request

The HTTP request.

IHttpResponse response

The HTTP response.

IHttpPostForm httpPostForm

The HTTP Post form generator.

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.

ReceiveMessageAsync()

Receives a SAML message.

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

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

Exceptions
Type Condition
SamlBindingException

Thrown if the SAML message cannot be received.

SendMessageAsync(String, String, Boolean, String)

Sends a SAML message.

Declaration
public virtual async Task SendMessageAsync(string url, string message, bool isResponse, string relayState)
Parameters
Type Name Description
System.String url

The URL to receive the HTML form.

System.String message

The SAML message XML.

System.Boolean isResponse

The flag indicating whether a SAML request or response.

System.String relayState

The relay state or null if none.

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

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