Fix access token refresh design (ADS only) (#21206)

This commit is contained in:
Cheena Malhotra
2022-11-21 19:35:00 -08:00
committed by GitHub
parent 8db40ab55f
commit 3b6ce47acc
5 changed files with 67 additions and 39 deletions

View File

@@ -48,6 +48,7 @@ export class RefreshAction extends Action {
if (this.element instanceof ConnectionProfile) {
let connection: ConnectionProfile = this.element;
if (this._connectionManagementService.isConnected(undefined, connection)) {
await this._connectionManagementService.refreshAzureAccountTokenIfNecessary(connection);
treeNode = this._objectExplorerService.getObjectExplorerNode(connection);
if (treeNode === undefined) {
await this._objectExplorerService.updateObjectExplorerNodes(connection.toIConnectionProfile());
@@ -55,6 +56,8 @@ export class RefreshAction extends Action {
}
}
} else if (this.element instanceof TreeNode) {
let connection: ConnectionProfile = this.element.getConnectionProfile();
this._connectionManagementService.refreshAzureAccountTokenIfNecessary(connection);
treeNode = this.element;
}