From 0042e346177479f4a4cb1a328a369cc8d83c09b1 Mon Sep 17 00:00:00 2001 From: Christopher Suh Date: Mon, 26 Jun 2023 02:07:24 -0700 Subject: [PATCH] Add adal deprecated warning upon ADS startup (#23462) * initial commit, add adal deprecated warning upon ADS startup * change our to the * Update extensions/azurecore/src/extension.ts Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> --------- Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> --- extensions/azurecore/src/extension.ts | 7 +++++++ extensions/azurecore/src/localizedConstants.ts | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/azurecore/src/extension.ts b/extensions/azurecore/src/extension.ts index 40460fff2b..38b09ebe93 100644 --- a/extensions/azurecore/src/extension.ts +++ b/extensions/azurecore/src/extension.ts @@ -76,6 +76,13 @@ export async function activate(context: vscode.ExtensionContext): Promise { + if (value === loc.switchMsal) { + await vscode.workspace.getConfiguration(Constants.AzureSection).update(Constants.AuthenticationLibrarySection, Constants.DefaultAuthLibrary, vscode.ConfigurationTarget.Global); + } + }); + } const piiLogging = vscode.workspace.getConfiguration(Constants.AzureSection).get(Constants.piiLogging, false) if (piiLogging) { void vscode.window.showWarningMessage(loc.piiWarning, loc.disable, loc.dismiss).then(async (value) => { diff --git a/extensions/azurecore/src/localizedConstants.ts b/extensions/azurecore/src/localizedConstants.ts index f660d62fec..b9ea7f8a9d 100644 --- a/extensions/azurecore/src/localizedConstants.ts +++ b/extensions/azurecore/src/localizedConstants.ts @@ -66,10 +66,11 @@ export const typeIcon = localize('azurecore.typeIcon', "Type Icon"); export const reloadPrompt = localize('azurecore.reloadPrompt', "Authentication Library has changed, please reload Azure Data Studio."); export const reloadChoice = localize('azurecore.reloadChoice', "Reload Azure Data Studio"); -export const deprecatedOption = localize('azurecore.deprecated', "Warning: ADAL has been deprecated, and is scheduled to be removed in a future release. Please use MSAL instead."); +export const deprecatedOption = localize('azurecore.deprecated', "Warning: ADAL has been deprecated, and is scheduled to be removed in the next release. Please use MSAL instead."); export const piiWarning = localize('azurecore.piiLogging.warning', "Warning: Azure PII Logging is enabled. Enabling this option allows personally identifiable information to be logged and should only be used for debugging purposes."); export const disable = localize('azurecore.disable', 'Disable'); export const dismiss = localize('azurecore.dismiss', 'Dismiss'); +export const switchMsal = localize('azurecore.switchMsal', 'Switch to MSAL'); // Azure Resource Types export const sqlServer = localize('azurecore.sqlServer', "SQL server");