Show / Hide Table of Contents

Class SAMLIdentityProvider

Provides Identity Provider (IdP) support for web browser single sign-on.

Inheritance
System.Object
SAMLIdentityProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ComponentSpace.SAML2
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class SAMLIdentityProvider

Methods

CanSLO()

Indicates whether the identity provider can single logout to one or more service providers.

To single logout, one or more service providers must have successfully completed SSO and also support SLO.

Declaration
public static bool CanSLO()
Returns
Type Description
System.Boolean

true if single logout can occur; otherwise false.

CanSLO(String)

Indicates whether the identity provider can single logout to a service provider.

To single logout, the service provider must have successfully completed SSO and also support SLO.

Declaration
public static bool CanSLO(string partnerSP)
Parameters
Type Name Description
System.String partnerSP

The partner service provider name.

Returns
Type Description
System.Boolean

true if single logout can occur; otherwise false.

GetPartnersPendingResponse()

Gets the names of the partner service providers to which a single sign-on or logout response is pending.

Declaration
public static string[] GetPartnersPendingResponse()
Returns
Type Description
System.String[]

The names of the partner service providers or null if none.

InitiateSLO(HttpResponse, String, String)

Initiates single logout from the identity provider to the service providers (ie. IdP-initiated SLO).

A logout request is sent to the service providers that are signed in.

Declaration
public static void InitiateSLO(HttpResponse httpResponse, string logoutReason, string relayState)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String logoutReason

The logout reason or null if none.

System.String relayState

The relay state or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single logout fails.

InitiateSLO(HttpResponseBase, String, String)

Initiates single logout from the identity provider to the service providers (ie. IdP-initiated SLO).

A logout request is sent to the service providers that are signed in.

Declaration
public static void InitiateSLO(HttpResponseBase httpResponse, string logoutReason, string relayState)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String logoutReason

The logout reason or null if none.

System.String relayState

The relay state or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single logout fails.

InitiateSSO(HttpResponse, String, SAMLAttribute[], String)

Initiates single sign-on from the identity provider to the service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, SAMLAttribute[] attributes, string relayState)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponse, String, SAMLAttribute[], String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, SAMLAttribute[] attributes, string relayState, string partnerSP)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponse, String, SAMLAttribute[], String, String, String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, SAMLAttribute[] attributes, string authnContext, string relayState, string partnerSP, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponse, String, IDictionary<String, String>, String)

Initiates single sign-on from the identity provider to the service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, IDictionary<string, string> attributes, string relayState)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponse, String, IDictionary<String, String>, String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, IDictionary<string, string> attributes, string relayState, string partnerSP)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponse, String, IDictionary<String, String>, String, String, String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, IDictionary<string, string> attributes, string authnContext, string relayState, string partnerSP, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponse, String, String)

Initiates single sign-on from the identity provider to the service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponse httpResponse, string userName, string relayState)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.String relayState

The relay state (eg target URL) or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, SAMLAttribute[], String)

Initiates single sign-on from the identity provider to the service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, SAMLAttribute[] attributes, string relayState)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, SAMLAttribute[], String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, SAMLAttribute[] attributes, string relayState, string partnerSP)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, SAMLAttribute[], String, String, String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, SAMLAttribute[] attributes, string authnContext, string relayState, string partnerSP, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, IDictionary<String, String>, String)

Initiates single sign-on from the identity provider to the service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, IDictionary<string, string> attributes, string relayState)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, IDictionary<String, String>, String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, IDictionary<string, string> attributes, string relayState, string partnerSP)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, IDictionary<String, String>, String, String, String, String)

Initiates single sign-on from the identity provider to the specified service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, IDictionary<string, string> attributes, string authnContext, string relayState, string partnerSP, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String relayState

The relay state (eg target URL) or null if none.

System.String partnerSP

The partner service provider name or null.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

InitiateSSO(HttpResponseBase, String, String)

Initiates single sign-on from the identity provider to the service provider (ie. IdP-initiated SSO).

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void InitiateSSO(HttpResponseBase httpResponse, string userName, string relayState)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String userName

The user name to include in the SAML assertion.

System.String relayState

The relay state (eg target URL) or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

IsSLOCompletionPending()

Indicates whether a single logout response to a service provider is pending.

Single logout is pending if a logout request has been received from a service provider and a logout response is pending or a logout request has been sent to a service provider and a logout response is pending.

Declaration
public static bool IsSLOCompletionPending()
Returns
Type Description
System.Boolean

true if single logout is pending; otherwise false.

IsSLOCompletionPending(String)

Indicates whether a single logout response to a service provider is pending.

Single logout is pending if a logout request has been received from a service provider and a logout response is pending or a logout request has been sent to a service provider and a logout response is pending.

Declaration
public static bool IsSLOCompletionPending(string partnerSP)
Parameters
Type Name Description
System.String partnerSP

The partner service provider name.

Returns
Type Description
System.Boolean

true if single logout is pending; otherwise false.

IsSSO()

Indicates whether the identity provider is currently single signed-on to a service provider.

Declaration
public static bool IsSSO()
Returns
Type Description
System.Boolean

true if currently single signed-on; otherwise false.

IsSSO(String)

Indicates whether the identity provider is currently single signed-on to a service provider.

Declaration
public static bool IsSSO(string partnerSP)
Parameters
Type Name Description
System.String partnerSP

The partner service provider name.

Returns
Type Description
System.Boolean

true if currently single signed-on; otherwise false.

IsSSOCompletionPending()

Indicates whether single sign-on to a service provider is pending.

Single sign-on is pending if an authn request has been received from a service provider and a SAML response is pending.

Declaration
public static bool IsSSOCompletionPending()
Returns
Type Description
System.Boolean

true if single sign-on is pending; otherwise false.

IsSSOCompletionPending(String)

Indicates whether single sign-on to a service provider is pending.

Single sign-on is pending if an authn request has been received from the service provider and a SAML response is pending.

Declaration
public static bool IsSSOCompletionPending(string partnerSP)
Parameters
Type Name Description
System.String partnerSP

The partner service provider name.

Returns
Type Description
System.Boolean

true if single sign-on is pending; otherwise false.

ReceiveSLO(HttpRequest, HttpResponse, out Boolean, out Boolean, out String, out String, out String)

Receives a single logout request (ie. SP-initiated SLO) or single logout response (ie. IdP-initiated SLO) from a service provider.

Declaration
public static void ReceiveSLO(HttpRequest httpRequest, HttpResponse httpResponse, out bool isRequest, out bool hasCompleted, out string logoutReason, out string partnerSP, out string relayState)
Parameters
Type Name Description
System.Web.HttpRequest httpRequest

The HTTP request.

System.Web.HttpResponse httpResponse

The HTTP response.

System.Boolean isRequest

true if a logout request has been received; otherwise false if a logout response has been received.

System.Boolean hasCompleted

true if IdP-initiated SLO has completed; otherwise false.

System.String logoutReason

The reason associated with the logout request or null if none.

System.String partnerSP

The partner service provider name.

System.String relayState

The relay state or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single logout fails.

ReceiveSLO(HttpRequestBase, HttpResponseBase, out Boolean, out Boolean, out String, out String, out String)

Receives a single logout request (ie. SP-initiated SLO) or single logout response (ie. IdP-initiated SLO) from a service provider.

Declaration
public static void ReceiveSLO(HttpRequestBase httpRequest, HttpResponseBase httpResponse, out bool isRequest, out bool hasCompleted, out string logoutReason, out string partnerSP, out string relayState)
Parameters
Type Name Description
System.Web.HttpRequestBase httpRequest

The HTTP request.

System.Web.HttpResponseBase httpResponse

The HTTP response.

System.Boolean isRequest

true if a logout request has been received; otherwise false if a logout response has been received.

System.Boolean hasCompleted

true if IdP-initiated SLO has completed; otherwise false.

System.String logoutReason

The reason associated with the logout request or null if none.

System.String partnerSP

The partner service provider name.

System.String relayState

The relay state or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single logout fails.

ReceiveSSO(HttpRequest, out String)

Receives a single sign-on request from a service provider (ie. SP-initiated SSO).

An authn request is received from the service provider.

Declaration
public static void ReceiveSSO(HttpRequest httpRequest, out string partnerSP)
Parameters
Type Name Description
System.Web.HttpRequest httpRequest

The HTTP request.

System.String partnerSP

The partner service provider name.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

ReceiveSSO(HttpRequest, out String, out SSOOptions)

Receives a single sign-on request from a service provider (ie. SP-initiated SSO).

An authn request is received from the service provider.

Declaration
public static void ReceiveSSO(HttpRequest httpRequest, out string partnerSP, out SSOOptions ssoOptions)
Parameters
Type Name Description
System.Web.HttpRequest httpRequest

The HTTP request.

System.String partnerSP

The partner service provider name.

SSOOptions ssoOptions

The SSO options.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

ReceiveSSO(HttpRequestBase, out String)

Receives a single sign-on request from a service provider (ie. SP-initiated SSO).

An authn request is received from the service provider.

Declaration
public static void ReceiveSSO(HttpRequestBase httpRequest, out string partnerSP)
Parameters
Type Name Description
System.Web.HttpRequestBase httpRequest

The HTTP request.

System.String partnerSP

The partner service provider name.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

ReceiveSSO(HttpRequestBase, out String, out SSOOptions)

Receives a single sign-on request from a service provider (ie. SP-initiated SSO).

An authn request is received from the service provider.

Declaration
public static void ReceiveSSO(HttpRequestBase httpRequest, out string partnerSP, out SSOOptions ssoOptions)
Parameters
Type Name Description
System.Web.HttpRequestBase httpRequest

The HTTP request.

System.String partnerSP

The partner service provider name.

SSOOptions ssoOptions

The SSO options.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSLO(HttpResponse, String)

Sends a single logout message to a service provider (ie. SP-initiated SLO).

Declaration
public static void SendSLO(HttpResponse httpResponse, string errorMessage)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response.

System.String errorMessage

The error message or null if logout was successful.

SendSLO(HttpResponseBase, String)

Sends a single logout message to a service provider (ie. SP-initiated SLO).

Declaration
public static void SendSLO(HttpResponseBase httpResponse, string errorMessage)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response.

System.String errorMessage

The error message or null if logout was successful.

SendSSO(HttpResponse, Status)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, Status status)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

Status status

The error status.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, Status, String)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, Status status, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

Status status

The error status.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string userName)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String, SAMLAttribute[])

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string userName, SAMLAttribute[] attributes)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String, SAMLAttribute[], String, String)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string userName, SAMLAttribute[] attributes, string authnContext, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String, IDictionary<String, String>)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string userName, IDictionary<string, string> attributes)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String, IDictionary<String, String>, String, String)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string userName, IDictionary<string, string> attributes, string authnContext, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String, String)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string statusCode, string statusMessage)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String statusCode

The error status code.

System.String statusMessage

The status message or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponse, String, String, String)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponse httpResponse, string statusCode, string statusMessage, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponse httpResponse

The HTTP response

System.String statusCode

The error status code.

System.String statusMessage

The status message or null if none.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, Status)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, Status status)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

Status status

The error status.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, Status, String)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, Status status, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

Status status

The error status.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string userName)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String, SAMLAttribute[])

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string userName, SAMLAttribute[] attributes)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String, SAMLAttribute[], String, String)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string userName, SAMLAttribute[] attributes, string authnContext, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

SAMLAttribute[] attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String, IDictionary<String, String>)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string userName, IDictionary<string, string> attributes)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String, IDictionary<String, String>, String, String)

Sends a single sign-on response as part of SP-initiated SSO.

A SAML response containing a SAML assertion is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string userName, IDictionary<string, string> attributes, string authnContext, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String userName

The user name to include in the SAML assertion.

System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attributes to include in the SAML assertion or null if none.

System.String authnContext

The authentication context identifying how the user was authenticated or null if the configured value is to be used.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String, String)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string statusCode, string statusMessage)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String statusCode

The error status code.

System.String statusMessage

The status message or null if none.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

SendSSO(HttpResponseBase, String, String, String)

Sends a single sign-on error response as part of SP-initiated SSO.

A SAML error response is sent to the service provider.

Declaration
public static void SendSSO(HttpResponseBase httpResponse, string statusCode, string statusMessage, string assertionConsumerServiceUrl)
Parameters
Type Name Description
System.Web.HttpResponseBase httpResponse

The HTTP response

System.String statusCode

The error status code.

System.String statusMessage

The status message or null if none.

System.String assertionConsumerServiceUrl

The assertion consumer service URL or null if the configured URL is to be used.

Exceptions
Type Condition
SAMLException

Thrown when the single sign-on fails.

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