LoginSamlAuth

Authenticates the end user using an existing SAML token to perform embedding operations.

loginSamlAuth(samlToken: string): string
  • The login function, like initialize, authenticates the user and stores the result into the embed cookie.
  • The function has one argument - SAML token.

  • The function returns the authentication token string.

Example

The following initializes a new embed client for the target instance of Pyramid and authenticates a new user using the SAML token. The token needs to be derived from the SAML authentication into the host site and injected into the API as per the example below. Alternatively, the same process can be resolved using server-side code using the REST API's directly.

var client = new pyramidEmbedClient("https://analytics.pyramid.com"); client.loginSamlAuth("SAMLTOKEN").then(token => { client.init(); });