16679: Drops TokeLifetime in favor of IdleTimeout on token storage decision. 16679-token-security-enhancements
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 8 Sep 2020 21:21:38 +0000 (18:21 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 8 Sep 2020 21:21:38 +0000 (18:21 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

src/common/config.ts
src/services/services.ts

index 96152248f783dd79a299d43b7775299037941f27..0f935602917e0829b8416aa8794aa2d8453b0277 100644 (file)
@@ -62,7 +62,6 @@ export interface ClusterConfigJSON {
     };
     Login: {
         LoginCluster: string;
-        TokenLifetime: string;
         Google: {
             Enable: boolean;
         }
@@ -222,7 +221,6 @@ export const mockClusterConfigJSON = (config: Partial<ClusterConfigJSON>): Clust
     },
     Login: {
         LoginCluster: "",
-        TokenLifetime: "0s",
         Google: {
             Enable: false,
         },
index 9a7b1e040a11254e9564251d2b2ced03cba4bb1f..6434075cab86024534fa553d7bcfc5be4a667058 100644 (file)
@@ -80,9 +80,9 @@ export const createServices = (config: Config, actions: ApiActions, useApiClient
 
     const ancestorsService = new AncestorService(groupsService, userService);
 
-    const tokenLifetime = config && config.clusterConfig && config.clusterConfig.Login.TokenLifetime || '0s';
+    const idleTimeout = config && config.clusterConfig && config.clusterConfig.Workbench.IdleTimeout || '0s';
     const authService = new AuthService(apiClient, config.rootUrl, actions,
-        (parse(tokenLifetime, 's') || 0) > 0);
+        (parse(idleTimeout, 's') || 0) > 0);
 
     const collectionService = new CollectionService(apiClient, webdavClient, authService, actions);
     const favoriteService = new FavoriteService(linkService, groupsService);