Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions extensions/mssql/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@
"message": "Fabric long-running API error with error code '{0}': {1}",
"comment": ["{0} is the error code", "{1} is the error message"]
},
"Fabric long-running operation response did not include a location header.": "Fabric long-running operation response did not include a location header.",
"Fabric Account": "Fabric Account",
"Fabric Account is required": "Fabric Account is required",
"Workspace": "Workspace",
Expand Down Expand Up @@ -1999,15 +2000,12 @@
"Are you sure you want to close the current session? All captured events will be lost. You can export events to CSV from the toolbar before closing.": "Are you sure you want to close the current session? All captured events will be lost. You can export events to CSV from the toolbar before closing.",
"Select a database for profiling (Azure SQL requires a specific database)": "Select a database for profiling (Azure SQL requires a specific database)",
"No databases found on the server. Please check your connection.": "No databases found on the server. Please check your connection.",
"Unable to read proxy agent options.": "Unable to read proxy agent options.",
"Proxy settings found, but without a protocol (e.g. http://): '{0}'. You may encounter connection issues while using the MSSQL extension./{0} is the proxy URL": {
"message": "Proxy settings found, but without a protocol (e.g. http://): '{0}'. You may encounter connection issues while using the MSSQL extension.",
"comment": ["{0} is the proxy URL"]
},
"Proxy settings found, but encountered an error while parsing the URL: '{0}'. You may encounter connection issues while using the MSSQL extension. Error: {1}/{0} is the proxy URL{1} is the error message": {
"message": "Proxy settings found, but encountered an error while parsing the URL: '{0}'. You may encounter connection issues while using the MSSQL extension. Error: {1}",
"comment": ["{0} is the proxy URL", "{1} is the error message"]
"Proxy settings found, but without a protocol (e.g. http://). You may encounter connection issues while using the MSSQL extension.": "Proxy settings found, but without a protocol (e.g. http://). You may encounter connection issues while using the MSSQL extension.",
"Proxy settings found, but the protocol '{0}' is not supported; only http and https proxies can be used. You may encounter connection issues while using the MSSQL extension./{0} is the proxy protocol": {
"message": "Proxy settings found, but the protocol '{0}' is not supported; only http and https proxies can be used. You may encounter connection issues while using the MSSQL extension.",
"comment": ["{0} is the proxy protocol"]
},
"Proxy settings found, but the URL could not be parsed. You may encounter connection issues while using the MSSQL extension.": "Proxy settings found, but the URL could not be parsed. You may encounter connection issues while using the MSSQL extension.",
"Backup Database - {0}/{0} is the database name": {
"message": "Backup Database - {0}",
"comment": ["{0} is the database name"]
Expand Down
98 changes: 21 additions & 77 deletions extensions/mssql/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions extensions/mssql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"@types/sinon": "^10.0.12",
"@types/sinon-chai": "^4.0.0",
"@types/tmp": "0.0.28",
"@types/tunnel": "0.0.1",
"@types/vscode": "1.101.0",
"@types/vscode-webview": "^1.57.5",
"@types/xmldom": "^0.1.34",
Expand Down Expand Up @@ -158,7 +157,6 @@
"@microsoft/vscode-azext-azureauth": "^5.1.1",
"@microsoft/vscode-azureresources-api": "^3.1.1",
"@xmldom/xmldom": "^0.9.10",
"axios": "^1.18.0",
"dockerode": "^4.0.9",
"dotenv": "^16.4.5",
"error-ex": "^1.3.0",
Expand All @@ -178,7 +176,6 @@
"strip-json-comments": "^5.0.1",
"tar": "^7.5.20",
"tmp": "^0.2.7",
"tunnel": "0.0.6",
"vscode-jsonrpc": "^9.0.0",
"vscode-languageclient": "10.0.0",
"xml-formatter": "^3.6.7",
Expand Down
13 changes: 6 additions & 7 deletions extensions/mssql/src/azure/msal/msalAzureAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { ILogger } from "../../sharedInterfaces/logger";
import { AzureAuthError } from "../azureAuthError";
import * as Constants from "../constants";
import { ErrorResponseBody } from "@azure/arm-subscriptions";
import { HttpClient } from "../../http/httpClient";
import { VscodeHttpClient } from "extension-toolkit/vscode";
import { getErrorMessage } from "../../utils/utils";

export type GetTenantsResponseData = {
Expand All @@ -43,7 +43,7 @@ export abstract class MsalAzureAuth {
protected readonly scopesString: string;
protected readonly clientId: string;
protected readonly resources: Resource[];
private readonly _httpHelper: HttpClient;
private readonly _httpHelper: VscodeHttpClient;

constructor(
protected readonly providerSettings: IProviderSettings,
Expand All @@ -59,7 +59,7 @@ export abstract class MsalAzureAuth {
this.scopes = [...this.providerSettings.scopes];
this.scopesString = this.scopes.join(" ");

this._httpHelper = new HttpClient(logger);
this._httpHelper = new VscodeHttpClient({ logger });
}

public async startLogin(): Promise<LoginResult> {
Expand Down Expand Up @@ -307,10 +307,9 @@ export abstract class MsalAzureAuth {
try {
this.logger.debug("Fetching tenants with uri {0}", tenantUri);
let tenantList: string[] = [];
const tenantResponse = await this._httpHelper.makeGetRequest<GetTenantsResponseData>(
tenantUri,
token,
);
const tenantResponse = await this._httpHelper.get<GetTenantsResponseData>(tenantUri, {
headers: { Authorization: `Bearer ${token}` },
});
const data = tenantResponse.data;
if (this.isErrorResponseBodyWithError(data)) {
this.logger.error(
Expand Down
Loading
Loading