@azure/identity 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @azure/identity might be problematic. Click here for more details.

package/dist/index.js CHANGED
@@ -2,12 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var msalNode = require('@azure/msal-node');
5
+ var msalCommon = require('@azure/msal-node');
6
6
  var logger$o = require('@azure/logger');
7
- var msalCommon = require('@azure/msal-common');
8
7
  var abortController = require('@azure/abort-controller');
9
8
  var coreUtil = require('@azure/core-util');
10
- var uuid = require('uuid');
11
9
  var coreClient = require('@azure/core-client');
12
10
  var coreRestPipeline = require('@azure/core-rest-pipeline');
13
11
  var coreTracing = require('@azure/core-tracing');
@@ -43,7 +41,6 @@ function _interopNamespace(e) {
43
41
  return Object.freeze(n);
44
42
  }
45
43
 
46
- var msalNode__namespace = /*#__PURE__*/_interopNamespace(msalNode);
47
44
  var msalCommon__namespace = /*#__PURE__*/_interopNamespace(msalCommon);
48
45
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
49
46
  var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
@@ -257,7 +254,7 @@ function credentialLogger(title, log = logger$n) {
257
254
  /**
258
255
  * Current version of the `@azure/identity` package.
259
256
  */
260
- const SDK_VERSION = `3.4.0`;
257
+ const SDK_VERSION = `3.4.1`;
261
258
  /**
262
259
  * The default client ID for authentication
263
260
  * @internal
@@ -423,7 +420,7 @@ class MsalBaseUtilities {
423
420
  * Generates a UUID
424
421
  */
425
422
  generateUuid() {
426
- return uuid.v4();
423
+ return coreUtil.randomUUID();
427
424
  }
428
425
  /**
429
426
  * Handles the MSAL authentication result.
@@ -1166,10 +1163,10 @@ class MsalNode extends MsalBaseUtilities {
1166
1163
  };
1167
1164
  }
1168
1165
  if (options === null || options === void 0 ? void 0 : options.enableCae) {
1169
- this.caeApp.public = new msalNode__namespace.PublicClientApplication(this.msalConfig);
1166
+ this.caeApp.public = new msalCommon__namespace.PublicClientApplication(this.msalConfig);
1170
1167
  }
1171
1168
  else {
1172
- this.app.public = new msalNode__namespace.PublicClientApplication(this.msalConfig);
1169
+ this.app.public = new msalCommon__namespace.PublicClientApplication(this.msalConfig);
1173
1170
  }
1174
1171
  if (this.getAssertion) {
1175
1172
  this.msalConfig.auth.clientAssertion = await this.getAssertion();
@@ -1179,10 +1176,10 @@ class MsalNode extends MsalBaseUtilities {
1179
1176
  this.msalConfig.auth.clientAssertion ||
1180
1177
  this.msalConfig.auth.clientCertificate) {
1181
1178
  if (options === null || options === void 0 ? void 0 : options.enableCae) {
1182
- this.caeApp.confidential = new msalNode__namespace.ConfidentialClientApplication(this.msalConfig);
1179
+ this.caeApp.confidential = new msalCommon__namespace.ConfidentialClientApplication(this.msalConfig);
1183
1180
  }
1184
1181
  else {
1185
- this.app.confidential = new msalNode__namespace.ConfidentialClientApplication(this.msalConfig);
1182
+ this.app.confidential = new msalCommon__namespace.ConfidentialClientApplication(this.msalConfig);
1186
1183
  }
1187
1184
  }
1188
1185
  else {
@@ -2328,8 +2325,9 @@ class ManagedIdentityCredential {
2328
2325
  /** authority host validation and metadata discovery to be skipped in managed identity
2329
2326
  * since this wasn't done previously before adding token cache support
2330
2327
  */
2331
- this.confidentialApp = new msalNode.ConfidentialClientApplication({
2328
+ this.confidentialApp = new msalCommon.ConfidentialClientApplication({
2332
2329
  auth: {
2330
+ authority: "https://login.microsoftonline.com/managed_identity",
2333
2331
  clientId: (_a = this.clientId) !== null && _a !== void 0 ? _a : DeveloperSignOnClientId,
2334
2332
  clientSecret: "dummy-secret",
2335
2333
  cloudDiscoveryMetadata: '{"tenant_discovery_endpoint":"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}',
@@ -3853,7 +3851,7 @@ class MsalOpenBrowser extends MsalNode {
3853
3851
  }
3854
3852
  async openAuthCodeUrl(scopeArray, options) {
3855
3853
  // Initialize CryptoProvider instance
3856
- const cryptoProvider = new msalNode__namespace.CryptoProvider();
3854
+ const cryptoProvider = new msalCommon__namespace.CryptoProvider();
3857
3855
  // Generate PKCE Codes before starting the authorization flow
3858
3856
  this.pkceCodes = await cryptoProvider.generatePkceCodes();
3859
3857
  const authCodeUrlParameters = {