Initial commit for dSTS Auth (#13802)

* Initial commit for dSTS Auth

* Removed getDstsToken from accountManagementService. Renamed azureAccount to token.

* Renamed dstsToken to _token in connectionWidget

* Code Review Feedback. Renamed token to authToken in onFetchDatabases.

* Removed dsts options from Kusto package.json
This commit is contained in:
Justin M
2021-02-01 10:48:16 -08:00
committed by GitHub
parent 1c0259f4c5
commit 8f5dc1526a
6 changed files with 63 additions and 23 deletions

View File

@@ -47,8 +47,8 @@ export class ConnectionController implements IConnectionComponentController {
onCreateNewServerGroup: () => this.onCreateNewServerGroup(),
onAdvancedProperties: () => this.handleOnAdvancedProperties(),
onSetAzureTimeOut: () => this.handleonSetAzureTimeOut(),
onFetchDatabases: (serverName: string, authenticationType: string, userName?: string, password?: string, azureAccount?: string) => this.onFetchDatabases(
serverName, authenticationType, userName, password, azureAccount).then(result => {
onFetchDatabases: (serverName: string, authenticationType: string, userName?: string, password?: string, authToken?: string) => this.onFetchDatabases(
serverName, authenticationType, userName, password, authToken).then(result => {
return result;
}),
onAzureTenantSelection: (azureTenantId?: string) => this.onAzureTenantSelection(azureTenantId),
@@ -56,7 +56,7 @@ export class ConnectionController implements IConnectionComponentController {
this._providerName = providerName;
}
protected async onFetchDatabases(serverName: string, authenticationType: string, userName?: string, password?: string, azureAccount?: string): Promise<string[]> {
protected async onFetchDatabases(serverName: string, authenticationType: string, userName?: string, password?: string, authToken?: string): Promise<string[]> {
let tempProfile = this._model;
tempProfile.serverName = serverName;
tempProfile.authenticationType = authenticationType;
@@ -64,7 +64,7 @@ export class ConnectionController implements IConnectionComponentController {
tempProfile.password = password;
tempProfile.groupFullName = '';
tempProfile.saveProfile = false;
tempProfile.azureAccount = azureAccount;
tempProfile.azureAccount = authToken;
let uri = this._connectionManagementService.getConnectionUri(tempProfile);
if (this._databaseCache.has(uri)) {
let cachedDatabases: string[] = this._databaseCache.get(uri);