Interface IHttpRedirectBinding
Supports the HTTP Redirect binding.
Namespace: ComponentSpace.Saml2.Bindings.Redirect
Assembly: ComponentSpace.Saml2.dll
Syntax
public interface IHttpRedirectBinding
Remarks
Refer to the Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Methods
IsValid()
Indicates whether the current HTTP request is valid for the binding.
Declaration
bool IsValid()
Returns
Type | Description |
---|---|
System.Boolean |
|
ReceiveMessageAsync(AsymmetricAlgorithm)
Receives a SAML message.
Declaration
Task<ReceiveResult> ReceiveMessageAsync(AsymmetricAlgorithm key = null)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to verify the signature or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ReceiveResult> | A task that represents the operation and returns the HTTP Redirect result. |
Exceptions
Type | Condition |
---|---|
SamlBindingException | Thrown if the SAML message cannot be received. |
SendMessageAsync(String, String, Boolean, String, AsymmetricAlgorithm, String)
Sends a SAML message.
Declaration
Task SendMessageAsync(string url, string message, bool isResponse, string relayState = null, AsymmetricAlgorithm key = null, string signatureAlgorithm = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The URL to receive the SAML message. |
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 |
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to generate the signature or |
System.String | signatureAlgorithm | The signature algorithm or |
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. |
VerifySignatureAsync(AsymmetricAlgorithm)
Verifies the signature.
Declaration
Task<bool> VerifySignatureAsync(AsymmetricAlgorithm key)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Cryptography.AsymmetricAlgorithm | key | The key to verify the signature. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task that represents the operation and returns |
Exceptions
Type | Condition |
---|---|
SamlSignatureException | Thrown if the signature verification fails. |