Commit 77f2b23
azure: Use BearerChallengePolicy from auth instead of local duplicate (#2232)
* azure: Use BearerChallengePolicy from auth instead of local duplicate
Replace AzExtBearerChallengePolicy and getDefaultScopeFromEndpoint in the
azure package with imports from @microsoft/vscode-azext-azureauth. The
telemetry properties (challenge, challengeSuccess) are preserved by wrapping
the callback at the call site with try/catch for robustness.
This adds @microsoft/vscode-azext-azureauth as a dependency of the azure
package, consolidating the challenge policy logic in one place.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR feedback: rethrow errors, log details, extract helper
- Extract createBearerChallengePolicy() helper to deduplicate policy
creation between createAzureClient and createAzureSubscriptionClient
- Rethrow errors from challenge handler instead of swallowing them
- Log parseError(err).message to telemetry as challengeError on failure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* azure: Install @microsoft/vscode-azext-azureauth@6.0.0-alpha.6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 57d9862 commit 77f2b23
File tree
3 files changed
+366
-65
lines changed- azure
- src
3 files changed
+366
-65
lines changed
0 commit comments