### Initiate SSO from SP (C#) Source: https://www.componentspace.com/documentation/saml-for-asp-net-core Demonstrates initiating a SAML Single Sign-On (SSO) process from the Service Provider (SP) side. This method is used to redirect the user to the Identity Provider (IdP) to authenticate. It requires the partner name and the return URL after successful authentication. ```csharp // SP-initiated SSO. await _samlServiceProvider.InitiateSsoAsync(partnerName, returnUrl); ``` -------------------------------- ### Initiate SSO from IdP (C#) Source: https://www.componentspace.com/documentation/saml-for-asp-net-core Demonstrates initiating a SAML Single Sign-On (SSO) process from the Identity Provider (IdP) side. This method is used to send a SAML assertion to the Service Provider (SP) after a user has been authenticated by the IdP. It requires the partner name, user name, attributes, and relay state. ```csharp // IdP-initiated SSO. await _samlIdentityProvider.InitiateSsoAsync(partnerName, userName, attributes, relayState); ``` -------------------------------- ### Receive SAML Response (C#) Source: https://www.componentspace.com/documentation/saml-for-asp-net-core Handles the reception and processing of a SAML response, whether initiated by the Service Provider (SP) or the Identity Provider (IdP). This is a crucial step for completing the SSO flow and establishing the user's authenticated session. It returns an SSO result object. ```csharp // SP or IdP-initiated SSO. var ssoResult = await _samlServiceProvider.ReceiveSsoAsync(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.