Making a POST request to the Birst token generator
After generating your SSO password, perform these steps each time you want to use SSO with your space.
-
Make a POST request to the Birst token generator using the following URL:
https://<BirstURL>TokenGenerator.aspx.
These parameters are required:
- birst.username
- The account username that will be used for SSO authentication, typically a generic or admin user ID. The user represented by birst.username must already have access to the target space.
- birst.ssopassword
- The one generated for the space in Space Properties, as described in the previous instructions.
- birst.spaceId
- The ID of the space to be accessed via SSO.
Note: Most parameters start with "birst", but not always. -
The POST operation returns an opaque token specific to birst.username and
birst.SpaceId. The token generator servlet also returns, in the HTTP response
header, the base URL that should be used for the SSO servlet. This URL is based
upon the URL that the user should be redirected to when they log in (from their
release setting). This token has a limited lifetime (15 seconds) and is single
use. For example, here is a snippet from the PHP example code:
global $redirectURLBase; if (startsWith($header_line, "BirstURL: ")) # get the redirection URL { $redirectURLBase = rtrim(substr($header_line, strlen("BirstURL: "))); }
You then use the token to access Birst:https://<BirstURL>/SSO.aspx?birst.SSOToken=649...a8eb6
If your application has multiple pages that embed Birst, you can request the token only on the first time you want to bring up a dashboard and then just reuse it in the IFrame SSO request each additional time. Reusing the same token when a session already exists that was created with that token is allowed and does not cause any errors. Alternatively, use Birst dashboards for navigation.