Class ServiceProvider
Provides Service Provider functionality in the SSO browser profile.
Inherited Members
Namespace: ComponentSpace.SAML2.Profiles.SSOBrowser
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class ServiceProvider
Remarks
Refer to the Profiles for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Methods
ReceiveArtifactByHTTPArtifact(HttpRequestBase, bool, out HTTPArtifact, out string)
Receives the artifact from the IdP using HTTP artifact with the artifact being in a form or query string.
Declaration
public static void ReceiveArtifactByHTTPArtifact(HttpRequestBase httpRequest, bool artifactInForm, out HTTPArtifact httpArtifact, out string relayState)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestBase | httpRequest | The HTTP request containing the artifact. |
bool | artifactInForm | If |
HTTPArtifact | httpArtifact | The returned artifact. |
string | relayState | The returned relay state or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
ReceiveSAMLResponseByHTTPPost(HttpRequestBase, out XmlElement, out string)
Receives the SAML response from the IdP using HTTP post.
Declaration
public static void ReceiveSAMLResponseByHTTPPost(HttpRequestBase httpRequest, out XmlElement samlResponse, out string relayState)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestBase | httpRequest | The HTTP request containing the posted form. |
XmlElement | samlResponse | The returned SAML response message |
string | relayState | The returned relay state or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the receive fails. |
SendArtifactByHTTPArtifact(HttpResponseBase, string, HTTPArtifact, string, bool)
Sends an artifact to the IdP using the HTTP artifact binding.
Declaration
public static void SendArtifactByHTTPArtifact(HttpResponseBase httpResponse, string idpURL, HTTPArtifact httpArtifact, string relayState, bool sendArtifactInForm)
Parameters
Type | Name | Description |
---|---|---|
HttpResponseBase | httpResponse | The HTTP response that will send the artifact. |
string | idpURL | The IdP URL. |
HTTPArtifact | httpArtifact | The artifact. |
string | relayState | The relay state or |
bool | sendArtifactInForm | If |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the send fails. |
SendAuthnRequestByHTTPPost(HttpResponseBase, string, XmlElement, string)
Sends the authentication request to the IdP using HTTP post.
Declaration
public static void SendAuthnRequestByHTTPPost(HttpResponseBase httpResponse, string idpURL, XmlElement authnRequest, string relayState)
Parameters
Type | Name | Description |
---|---|---|
HttpResponseBase | httpResponse | The HTTP response that will return the form to post. |
string | idpURL | The IdP URL. |
XmlElement | authnRequest | The authentication request. |
string | relayState | The relay state or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the send fails. |
SendAuthnRequestByHTTPRedirect(HttpResponseBase, string, XmlElement, string, AsymmetricAlgorithm)
Sends the authentication request to the IdP using HTTP redirect.
Declaration
public static void SendAuthnRequestByHTTPRedirect(HttpResponseBase httpResponse, string idpURL, XmlElement authnRequest, string relayState, AsymmetricAlgorithm key)
Parameters
Type | Name | Description |
---|---|---|
HttpResponseBase | httpResponse | The HTTP response used to perform the redirect. |
string | idpURL | The IdP URL. |
XmlElement | authnRequest | The authentication request. |
string | relayState | The relay state or |
AsymmetricAlgorithm | key | The key to generate the signature or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the send fails. |
SendAuthnRequestByHTTPRedirect(HttpResponseBase, string, XmlElement, string, AsymmetricAlgorithm, string)
Sends the authentication request to the IdP using HTTP redirect.
Declaration
public static void SendAuthnRequestByHTTPRedirect(HttpResponseBase httpResponse, string idpURL, XmlElement authnRequest, string relayState, AsymmetricAlgorithm key, string signatureAlgorithm)
Parameters
Type | Name | Description |
---|---|---|
HttpResponseBase | httpResponse | The HTTP response used to perform the redirect. |
string | idpURL | The IdP URL. |
XmlElement | authnRequest | The authentication request. |
string | relayState | The relay state or |
AsymmetricAlgorithm | key | The key to generate the signature or |
string | signatureAlgorithm | The signature algorithm or |
Exceptions
Type | Condition |
---|---|
SAMLProfileException | Thrown when the send fails. |