Show / Hide Table of Contents

Class ServiceProvider

Provides Service Provider functionality in the SSO browser profile.

Inheritance
object
ServiceProvider
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
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 true the artifact is received in a form; otherwise it's received in a query string.

HTTPArtifact httpArtifact

The returned artifact.

string relayState

The returned relay state or null if none.

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 null if none.

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 null if none.

bool sendArtifactInForm

If true the artifact is sent in a form; otherwise it's sent in a query string.

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 null if none.

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 null if none.

AsymmetricAlgorithm key

The key to generate the signature or null if no signature is to be generated.

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 null if none.

AsymmetricAlgorithm key

The key to generate the signature or null if no signature is to be generated.

string signatureAlgorithm

The signature algorithm or null to default to http://www.w3.org/2001/04/xmldsig-more#rsa-sha256.

Exceptions
Type Condition
SAMLProfileException

Thrown when the send fails.

In this article
Back to top Copyright © ComponentSpace Pty Ltd 2004-2025. All rights reserved.