Remove ADAL Code (#23360)

* initial commit, removed all adal code

* remove all authLibrary references in extension/azurecore

* removed authLibrary references from src/sql

* remove MSAL/ADAL setting option

* wip fixing tests and removing Msal from method names

* fixed tests

* create accountInfo mock

* fix tests

* fix clientApplication mock

* remove clientapplication

* fix compile

* add typing

* wip

* wip

* wip

* fix tree provider

* remove SimpleTokenCache, FileDatabase & tests

* remove remaining adal / authentication library references:

* remove comma from package.nls.json

* fix error fetching subscriptions

* fix tests

* remove getAzureAuthenticationLibraryConfig

* remove adal check

* fix build

* remove test

* undo remove customProviderSettings

* fix bracket
This commit is contained in:
Christopher Suh
2023-07-20 10:37:38 -07:00
committed by GitHub
parent a2b1c2cfc5
commit 91359a32c9
36 changed files with 168 additions and 1849 deletions

View File

@@ -1062,9 +1062,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
const azureAccounts = accounts.filter(a => a.key.providerId.startsWith('azure'));
if (azureAccounts && azureAccounts.length > 0) {
let accountId = (connection.authenticationType === Constants.AuthenticationType.AzureMFA || connection.authenticationType === Constants.AuthenticationType.AzureMFAAndUser) ? connection.azureAccount : connection.userName;
// For backwards compatibility with ADAL, we need to check if the account ID matches with tenant Id or just the account ID
// The OR case can be removed once we no longer support ADAL
let account = azureAccounts.find(account => account.key.accountId === accountId || account.key.accountId.split('.')[0] === accountId);
let account = azureAccounts.find(account => account.key.accountId === accountId);
if (account) {
this._logService.debug(`Getting security token for Azure account ${account.key.accountId}`);
if (account.isStale) {