mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 11:38:36 -05:00
Add AuthenticationType enum to typings (#20699)
* Add AuthenticationType enum to typings * fix * const * Add comments * fix comment * remove unused
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user