Interface ISamlIdentityProvider
Provides Identity Provider (IdP) support for web browser single sign-on.
Inherited Members
Namespace: ComponentSpace.Saml2
Assembly: ComponentSpace.Saml2.dll
Syntax
public interface ISamlIdentityProvider : ISamlProvider, IArtifactResolver
Properties
Events
Gets or sets the optional events associated with SAML SSO and SLO.
Declaration
ISamlIdentityProviderEvents Events { get; set; }
Property Value
Type | Description |
---|---|
ISamlIdentityProviderEvents | The optional events associated with SAML SSO and SLO. |
Methods
InitiateSloAsync(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
Task InitiateSloAsync(string logoutReason = null, string relayState = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | logoutReason | The logout reason or |
System.String | relayState | The relay state or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the single logout fails. |
InitiateSsoAsync(String, String, IList<SamlAttribute>, 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
Task InitiateSsoAsync(string partnerName = null, string userID = null, IList<SamlAttribute> attributes = null, string relayState = null, string authnContext = null, string nameIDFormat = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | partnerName | The partner service provider name or |
System.String | userID | The user ID to include in the SAML assertion or |
System.Collections.Generic.IList<SamlAttribute> | attributes | The attributes to include in the SAML assertion or |
System.String | relayState | The relay state (eg target URL) or |
System.String | authnContext | The authentication context identifying how the user was authenticated or |
System.String | nameIDFormat | The name identifier format or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the single sign-on fails. |
See Also
ReceiveSloAsync()
Receives a single logout request (ie. SP-initiated SLO) or single logout response (ie. IdP-initiated SLO) from a service provider.
Declaration
Task<ISloResult> ReceiveSloAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 request from a service provider (ie. SP-initiated SSO).
An authn request is received from the service provider.
Declaration
Task<IIdpSsoResult> ReceiveSsoAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IIdpSsoResult> | A task that represents the operationand returns the SSO result. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the single sign-on fails. |
SendSloAsync(String, String)
Sends a single logout message to a service provider (ie. SP-initiated SLO).
Declaration
Task SendSloAsync(string errorMessage = null, string correlationID = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorMessage | The error message or |
System.String | correlationID | The correlation ID identifying the logout request to respond to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the single logout fails. |
SendSsoAsync(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
Task SendSsoAsync(Status status, string correlationID = null)
Parameters
Type | Name | Description |
---|---|---|
Status | status | The error status. |
System.String | correlationID | The correlation ID identifying the authentication request to respond to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the single sign-on fails. |
SendSsoAsync(String, IList<SamlAttribute>, 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
Task SendSsoAsync(string userID = null, IList<SamlAttribute> attributes = null, string authnContext = null, string nameIDFormat = null, string correlationID = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | The user ID to include in the SAML assertion or |
System.Collections.Generic.IList<SamlAttribute> | attributes | The attributes to include in the SAML assertion or |
System.String | authnContext | The authentication context identifying how the user was authenticated or |
System.String | nameIDFormat | The name identifier format or |
System.String | correlationID | The correlation ID identifying the authentication request to respond to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the single sign-on fails. |