[PM-3647] Change order of timeout set. (#6723)
This commit is contained in:
parent
4fe3d36f10
commit
1669f3593e
|
@ -26,8 +26,6 @@ export class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceA
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async setVaultTimeoutOptions(timeout: number, action: VaultTimeoutAction): Promise<void> {
|
async setVaultTimeoutOptions(timeout: number, action: VaultTimeoutAction): Promise<void> {
|
||||||
await this.stateService.setVaultTimeout(timeout);
|
|
||||||
|
|
||||||
// We swap these tokens from being on disk for lock actions, and in memory for logout actions
|
// We swap these tokens from being on disk for lock actions, and in memory for logout actions
|
||||||
// Get them here to set them to their new location after changing the timeout action and clearing if needed
|
// Get them here to set them to their new location after changing the timeout action and clearing if needed
|
||||||
const token = await this.tokenService.getToken();
|
const token = await this.tokenService.getToken();
|
||||||
|
@ -35,6 +33,8 @@ export class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceA
|
||||||
const clientId = await this.tokenService.getClientId();
|
const clientId = await this.tokenService.getClientId();
|
||||||
const clientSecret = await this.tokenService.getClientSecret();
|
const clientSecret = await this.tokenService.getClientSecret();
|
||||||
|
|
||||||
|
await this.stateService.setVaultTimeout(timeout);
|
||||||
|
|
||||||
const currentAction = await this.stateService.getVaultTimeoutAction();
|
const currentAction = await this.stateService.getVaultTimeoutAction();
|
||||||
if (
|
if (
|
||||||
(timeout != null || timeout === 0) &&
|
(timeout != null || timeout === 0) &&
|
||||||
|
|
Loading…
Reference in New Issue