Interface IHttpRedirectBinding
- Namespace
- ComponentSpace.Saml2.Bindings.Redirect
- Assembly
- ComponentSpace.Saml2.dll
Supports the HTTP Redirect binding.
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.
bool IsValid()
Returns
- bool
trueif the current HTTP request is valid for the binding; otherwisefalse.
ReceiveMessageAsync(AsymmetricAlgorithm)
Receives a SAML message.
Task<ReceiveResult> ReceiveMessageAsync(AsymmetricAlgorithm key = null)
Parameters
keyAsymmetricAlgorithmThe key to verify the signature or
nullif no signature is to be verified.
Returns
- Task<ReceiveResult>
A task that represents the operation and returns the HTTP Redirect result.
Exceptions
- SamlBindingException
Thrown if the SAML message cannot be received.
SendMessageAsync(string, string, bool, string, AsymmetricAlgorithm, string)
Sends a SAML message.
Task SendMessageAsync(string url, string message, bool isResponse, string relayState = null, AsymmetricAlgorithm key = null, string signatureAlgorithm = null)
Parameters
urlstringThe URL to receive the SAML message.
messagestringThe SAML message XML.
isResponseboolThe flag indicating whether a SAML request or response.
relayStatestringThe relay state or
nullif none.keyAsymmetricAlgorithmThe key to generate the signature or
nullif no signature is to be generated.signatureAlgorithmstringThe signature algorithm or
nullto default to http://www.w3.org/2001/04/xmldsig-more#rsa-sha256.
Returns
- Task
A task that represents the operation.
Exceptions
- SamlBindingException
Thrown if the SAML message cannot be sent.
VerifySignatureAsync(AsymmetricAlgorithm)
Verifies the signature.
Task<bool> VerifySignatureAsync(AsymmetricAlgorithm key)
Parameters
keyAsymmetricAlgorithmThe key to verify the signature.
Returns
- Task<bool>
A task that represents the operation and returns
trueif the signature verifies; otherwisefalse
Exceptions
- SamlSignatureException
Thrown if the signature verification fails.