Reset expiresOn property for non-Azure connections (#21452)

This commit is contained in:
Cheena Malhotra
2022-12-19 13:04:39 -08:00
committed by GitHub
parent fb121f2564
commit 87f1d14357
2 changed files with 77 additions and 0 deletions

View File

@@ -873,6 +873,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
&& connection.authenticationType !== Constants.AuthenticationType.AzureMFAAndUser
&& connection.authenticationType !== Constants.AuthenticationType.DSTSAuth) {
connection.options['azureAccountToken'] = undefined;
connection.options['expiresOn'] = undefined;
return true;
}
@@ -883,6 +884,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
let dstsAccounts = accounts.filter(a => a.key.providerId.startsWith('dstsAuth'));
if (dstsAccounts.length <= 0) {
connection.options['azureAccountToken'] = undefined;
connection.options['expiresOn'] = undefined;
return false;
}