Skip to content

Commit

Permalink
add new feature flag to enable faster refresh of WTS token
Browse files Browse the repository at this point in the history
This is based on the assumption that workspace and WTS are not always bundled
together in data portal installations. I.e. one could have a workspace without
a WTS.
  • Loading branch information
pieterlukasse committed Oct 11, 2022
1 parent 19e5516 commit 1456267
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/portal_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Below is an example, with inline comments describing what each JSON block config
"explorerFilterValuesToHide": ["array of strings"], // optional, Values set in array will be hidden in guppy filters. Intended use is to hide missing data category from filters, for this it should be set to the same as `missing_data_alias` in Guppy server config
"studyRegistration": true, // optional, whether to enable the study registration feature
"workspaceRegistration": true, // optional, whether to enable the workspace registration feature
"workspaceTokenServiceRefreshTokenAtLogin": true, // optional, whether to refresh the WTS token directly at portal login (recommended mode). If not set, this refresh happens only when the user enters the workspace section of the portal (default/old/previous mode).
},
"dataExplorerConfig": { // required only if featureFlags.explorer is true; configuration for the Data Explorer (/explorer); can be replaced by explorerConfig, see Multi Tab Explorer doc
"charts": { // optional; indicates which charts to display in the Data Explorer
Expand Down
6 changes: 4 additions & 2 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ import NotFound from './components/NotFound';
import ErrorPage403 from './components/ErrorPage403';
import { initWorkspaceRefreshToken } from './Workspace/WorkspaceRefreshToken';

// start workspace session for WTS
initWorkspaceRefreshToken();
if (isEnabled('workspaceTokenServiceRefreshTokenAtLogin')) {
// start workspace session for WTS
initWorkspaceRefreshToken();
}

// monitor user's session
sessionMonitor.start();
Expand Down

0 comments on commit 1456267

Please sign in to comment.