Interface ISamlServiceProvider
Provides Service Provider (SP) support for web browser single sign-on.
Inherited Members
Namespace: ComponentSpace.Saml2
Assembly: ComponentSpace.Saml2.dll
Syntax
public interface ISamlServiceProvider : ISamlProvider, IArtifactResolver
  Properties
Events
Gets or sets the optional events associated with SAML SSO and SLO.
Declaration
ISamlServiceProviderEvents Events { get; set; }
  Property Value
| Type | Description | 
|---|---|
| ISamlServiceProviderEvents | The optional events associated with SAML SSO and SLO.  | 
      
Methods
InitiateSloAsync(string, string, string)
Initiates single logout from the service provider to the identity provider (ie. SP-initiated SLO).
An logout request is sent to the identity provider.
Declaration
Task InitiateSloAsync(string partnerName = null, string logoutReason = null, string relayState = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | partnerName | The partner identity provider name or   | 
      
| string | logoutReason | The logout reason or   | 
      
| string | relayState | The relay state or   | 
      
Returns
| Type | Description | 
|---|---|
| Task | A task that represents the operation.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SamlException | Thrown when the single logout fails.  | 
      
InitiateSsoAsync(string, string, ISsoOptions)
Initiates single sign-on from the service provider to the identity provider (ie. SP-initiated SSO).
An authn request is sent to the identity provider.
Declaration
Task InitiateSsoAsync(string partnerName = null, string relayState = null, ISsoOptions ssoOptions = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | partnerName | The partner identity provider name or   | 
      
| string | relayState | The relay state or   | 
      
| ISsoOptions | ssoOptions | The SSO options or   | 
      
Returns
| Type | Description | 
|---|---|
| Task | A task that represents the operation.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SamlException | Thrown when the single sign-on fails.  | 
      
ReceiveSloAsync()
Receives a single logout request (ie. IdP-initiated SLO) or single logout response (ie. SP-initiated SLO) from an identity provider.
Declaration
Task<ISloResult> ReceiveSloAsync()
  Returns
| Type | Description | 
|---|---|
| Task<ISloResult> | A task that represents the operation and returns the SLO result.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SamlException | Thrown when the single logout fails.  | 
      
ReceiveSsoAsync()
Receives a single sign-on response from the identity provider (ie. IdP-initiated or SP-initiated SSO).
Declaration
Task<ISpSsoResult> ReceiveSsoAsync()
  Returns
| Type | Description | 
|---|---|
| Task<ISpSsoResult> | A task that represents the operation and returns the SSO result.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SamlException | Thrown when the single sign-on fails.  | 
      
SendSloAsync(string, string)
Sends a single logout response to the identity provider (ie IdP-initiated SLO).
Declaration
Task SendSloAsync(string errorMessage = null, string correlationID = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | errorMessage | The error message or   | 
      
| string | correlationID | The correlation ID identifying the logout request to respond to.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | A task that represents the operation.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SamlException | Thrown when the single logout fails.  |