The main embed client. This object manages the life cycle of the embed content on the host page.
- Use this to create an instance of the embed client object,
- Host is the URL of the Pyramid instance. Required.
- Optionally injecting the username and password values can also authenticate the user at the same time. .
- The optional customdata argument allows developers to inject custom data elements into the user's session.
- The constructor cannot be called until the library has been loaded
Once instantiated, use the methods and properties below to create and manipulate embedded content or the embedded hub.
- init - initialize the embed client
- login - authenticate the user (username and password) against the host and automatically set the embed cookie
- loginWinAuth - authenticate the user with Windows Kerberos tokens against the host and automatically set the embed cookie
- loginSAMLAuth - authenticate the user with SAML tokens against the host and automatically set the embed cookie
- loginOpenIdAuth - authenticate the user with OpenID OAuth tokens against the host and automatically set the embed cookie
- setAuthToken - manually set the authentication token into the embed cookie
- getAuthToken - get the authentication token from the embed cookie
- SetAuthFailureCallback - set a functional call back when authentication fails
- embed - embed content into the target HTML5 container
- quickEmbed - simplified function to embed content together with embed client initialization and login
- hub - embed the hub object into the target HTML5 container. Returns the 'Hub' object.
- host - get the host address of the current embed client
- isClientLoaded - gets the status of the embed client
- isLoggedIn - gets whether the authentication cookie has been set
The following instantiates a new embed client for the target instance of Pyramid
var client = new PyramidEmbedClient("https://analytics.pyramid.com");