Spotfire® Cobranding

The Custom Login Page API

The Custom Login Page API is a JavaScript module called custom-login-api.js, which exports the CustomLoginApi class. Instantiate this class to use the available functions.

login

/**
* Logs a user in the Spotfire Server by taking the username, password and any optional parameters supplied
* and posts them to the Spotfire Server along with remember me value if that
* setting is specified.
*
* @param  {string} username The username
* @param  {string} password The password
* @param  {boolean} saveLoginInformation The actual value of
* remember me
* @param {function} [successCallback] Optional callback function called when the user has been logged in successfully.
* @param {function} [errorCallback] Optional callback function called when the login request failed. If not provided, in case the request fails, it will throw an error.
* @param  {object} [optionalPayload] Optional payload that is encoded and passed
* along in the request body. All keys must be prefixed with sf_custom_login_.
* These parameters will be available to PostAuthenticationFilter
* implementations as a map attribute through the AuthenticationContext
* (details can be found in the Javadoc for AuthenticationContext).
*
* @since 11.4.0
*/

redirectToWebAuthProvider

/**
* Redirects to the web authentication (e.g. OpenID Connect) provider. Will check targetUrl
* query parameter and pass that along to the web auth provider.
*
* @param  {string} providerName The name of the provider.
* @param {function} [errorCallback] Optional error callback that executes if the call to
* getting the authentication endpoint would fail.
*
* @since 11.4.0
*/

getServerManifest

/**
* Fetches the Spotfire Server manifest information
* @param {function} [errorCallback] Optional error callback that executes if the call getting the Spotfire Server manifest information fails. If not provided, in this case, it will throw an error.
*
* @since 11.4.0
*/