@@ -244,13 +244,7 @@ describe('JWT Expiry Tests', () => {
244
244
} ) ;
245
245
246
246
test ( 'JWT auth type sets expiryTime of cookie JWT exp less than ttl' , async ( ) => {
247
- const keepAliveConfig = {
248
- multitenancy : {
249
- enabled : false ,
250
- } ,
251
- auth : {
252
- unauthenticated_routes : [ ] as string [ ] ,
253
- } ,
247
+ const infiniteTTLConfig = {
254
248
session : {
255
249
keepalive : true ,
256
250
ttl : Infinity ,
@@ -266,7 +260,7 @@ describe('JWT Expiry Tests', () => {
266
260
} as SecurityPluginConfigType ;
267
261
268
262
const jwtAuth = new JwtAuthentication (
269
- keepAliveConfig ,
263
+ infiniteTTLConfig ,
270
264
sessionStorageFactory ,
271
265
router ,
272
266
esClient ,
@@ -294,13 +288,7 @@ describe('JWT Expiry Tests', () => {
294
288
} ) ;
295
289
296
290
test ( 'JWT auth type sets expiryTime of cookie ttl less than JWT exp' , async ( ) => {
297
- const keepAliveConfig = {
298
- multitenancy : {
299
- enabled : false ,
300
- } ,
301
- auth : {
302
- unauthenticated_routes : [ ] as string [ ] ,
303
- } ,
291
+ const lowTTLConfig = {
304
292
session : {
305
293
keepalive : true ,
306
294
ttl : 1000 ,
@@ -316,7 +304,7 @@ describe('JWT Expiry Tests', () => {
316
304
} as SecurityPluginConfigType ;
317
305
318
306
const jwtAuth = new JwtAuthentication (
319
- keepAliveConfig ,
307
+ lowTTLConfig ,
320
308
sessionStorageFactory ,
321
309
router ,
322
310
esClient ,
@@ -344,13 +332,7 @@ describe('JWT Expiry Tests', () => {
344
332
} ) ;
345
333
346
334
test ( 'getKeepAliveExpiry' , ( ) => {
347
- const keepAliveConfig = {
348
- multitenancy : {
349
- enabled : false ,
350
- } ,
351
- auth : {
352
- unauthenticated_routes : [ ] as string [ ] ,
353
- } ,
335
+ const jwtConfig = {
354
336
session : {
355
337
keepalive : true ,
356
338
ttl : 100000 ,
@@ -366,7 +348,7 @@ describe('JWT Expiry Tests', () => {
366
348
} as SecurityPluginConfigType ;
367
349
368
350
const jwtAuth = new JwtAuthentication (
369
- keepAliveConfig ,
351
+ jwtConfig ,
370
352
sessionStorageFactory ,
371
353
router ,
372
354
esClient ,
0 commit comments