Add AuthenticationType enum to typings (#20699)

* Add AuthenticationType enum to typings

* fix

* const

* Add comments

* fix comment

* remove unused
This commit is contained in:
Charles Gagnon
2022-09-30 16:49:36 -07:00
committed by GitHub
parent d6d75d8817
commit 85dc506a3c
49 changed files with 236 additions and 164 deletions

View File

@@ -136,11 +136,11 @@ export class SummaryPage extends ImportPage {
let err;
const currentServer = this.model.server;
const includePasswordInConnectionString = (currentServer.options.authenticationType === 'Integrated') ? false : true;
const includePasswordInConnectionString = (currentServer.options.authenticationType === azdata.connection.AuthenticationType.Integrated) ? false : true;
const connectionString = await azdata.connection.getConnectionString(currentServer.connectionId, includePasswordInConnectionString);
let accessToken = undefined;
if (currentServer.options.authenticationType === 'AzureMFA') {
if (currentServer.options.authenticationType === azdata.connection.AuthenticationType.AzureMFA) {
const azureAccount = (await azdata.accounts.getAllAccounts()).filter(v => v.key.accountId === currentServer.options.azureAccount)[0];
accessToken = (await azdata.accounts.getAccountSecurityToken(azureAccount, currentServer.options.azureTenantId, azdata.AzureResource.Sql)).token;
}