Page tree
Skip to end of metadata
Go to start of metadata

If you are embedding GoodData in your App, one of the task that you need do is align login sessions. What does it mean? Your user log in to your application and on the background he is also logged in to the GoodData via SSO. Perfect. What happens if you are active in your App window, but inactive in the GoodData embedded window? The session expired. You would need to refresh your GoodData TT Token.

Contents:

Once you are logged in (see the How to set up SSO Tutorial), There are two main Use cases:

  • Application keeps GD session alive all the time when there is an active window with my application with embedded GD
  • When I log out from my application, I log out also from GD

For your better developer experience, we’ve prepared a set of javascript events that will help you with seamless embedded dashboard integration.

App keeps GD Session alive

My application keeps GD session alive all the time when there is an active window with my application with embedded GD

What keeps your session alive? Simply send following event from the parent window using javascript code. Sending the event every 1 minute should be enough.

 {
    gdc: {
        name: 'auth.refresh'     
    }
}

 

And vice-versa, if you need to listen in your parent window (the window where GoodData is embedded) you can listen to following javascript event:

 {
    gdc: {
        name: 'ui.active',
        type: 'app.ok'
    }
}

 

Doing this, your application will be aware of the user activity inside the iFrame (embedded GoodData Analytics).

Login session expiration

Prior to release 100 a login session expired after 14 days (36 hours for Single Sign On) or with closing the browser window. Since release 100 the Organization administrator has better control over session expiration. Session expiration can be tight to user activity. The Organization administrator may choose the maximum user inactivity time after which login session expires.

EXAMPLE

Let’s say that the Organization Administrator decide to set the maximum inactivity time to 15 minutes. If a user doesn’t actively work with GoodData for 15 minutes its login session will expire and user will have to login again.

Please contact GoodData support to activate this feature. There will be special REST API resource for this in the future.

User Log Out

When I log out from my application, I log out also from GD.

You need to logout the current user from GoodData as during the logout from your Application. Use following API calls:

  1. GET the currently logged in user URI:

    https://secure.gooddata.com/gdc/account/profile/current
  2. Log out user by sending DELETE request to the following resource:

    https://secure.gooddata.com/gdc/account/login/{user-id}

Read also general article about our Dashboard Events API.