@azure/identity 2.0.2-alpha.20211028.2 → 2.0.2-alpha.20211105.2

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/CHANGELOG.md CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  ### Bugs Fixed
10
10
 
11
+ - Challenge claims now are properly being passed through to the outgoing token requests.
12
+
11
13
  ### Other Changes
12
14
 
13
15
  ## 2.0.1 (2021-10-28)
package/dist/index.js CHANGED
@@ -938,7 +938,7 @@ class MsalNode extends MsalBaseUtilities {
938
938
  this.authorityHost = options.authorityHost || process.env.AZURE_AUTHORITY_HOST;
939
939
  const authority = getAuthority(tenantId, this.authorityHost);
940
940
  this.identityClient = new IdentityClient(Object.assign(Object.assign({}, options.tokenCredentialOptions), { authorityHost: authority }));
941
- let clientCapabilities = ["CP1"];
941
+ let clientCapabilities = ["cp1"];
942
942
  if (process.env.AZURE_IDENTITY_DISABLE_CP1) {
943
943
  clientCapabilities = [];
944
944
  }
@@ -1052,7 +1052,8 @@ To work with multiple accounts for the same Client ID and Tenant ID, please prov
1052
1052
  account: publicToMsal(this.account),
1053
1053
  correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
1054
1054
  scopes,
1055
- authority: options === null || options === void 0 ? void 0 : options.authority
1055
+ authority: options === null || options === void 0 ? void 0 : options.authority,
1056
+ claims: options === null || options === void 0 ? void 0 : options.claims
1056
1057
  };
1057
1058
  try {
1058
1059
  this.logger.info("Attempting to acquire token silently");
@@ -1750,7 +1751,8 @@ class MsalClientSecret extends MsalNode {
1750
1751
  scopes,
1751
1752
  correlationId: options.correlationId,
1752
1753
  azureRegion: this.azureRegion,
1753
- authority: options.authority
1754
+ authority: options.authority,
1755
+ claims: options.claims
1754
1756
  });
1755
1757
  // The Client Credential flow does not return an account,
1756
1758
  // so each time getToken gets called, we will have to acquire a new token through the service.
@@ -1877,7 +1879,8 @@ class MsalClientCertificate extends MsalNode {
1877
1879
  scopes,
1878
1880
  correlationId: options.correlationId,
1879
1881
  azureRegion: this.azureRegion,
1880
- authority: options.authority
1882
+ authority: options.authority,
1883
+ claims: options.claims
1881
1884
  });
1882
1885
  // Even though we're providing the same default in memory persistence cache that we use for DeviceCodeCredential,
1883
1886
  // The Client Credential flow does not return the account information from the authentication service,
@@ -1956,7 +1959,8 @@ class MsalUsernamePassword extends MsalNode {
1956
1959
  username: this.username,
1957
1960
  password: this.password,
1958
1961
  correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
1959
- authority: options === null || options === void 0 ? void 0 : options.authority
1962
+ authority: options === null || options === void 0 ? void 0 : options.authority,
1963
+ claims: options === null || options === void 0 ? void 0 : options.claims
1960
1964
  };
1961
1965
  const result = await this.publicApp.acquireTokenByUsernamePassword(requestOptions);
1962
1966
  return this.handleResult(scopes, this.clientId, result || undefined);
@@ -3002,8 +3006,10 @@ class MsalOpenBrowser extends MsalNode {
3002
3006
  this.pkceCodes = await cryptoProvider.generatePkceCodes();
3003
3007
  const authCodeUrlParameters = {
3004
3008
  scopes: scopeArray,
3009
+ correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
3005
3010
  redirectUri: this.redirectUri,
3006
3011
  authority: options === null || options === void 0 ? void 0 : options.authority,
3012
+ claims: options === null || options === void 0 ? void 0 : options.claims,
3007
3013
  loginHint: this.loginHint,
3008
3014
  codeChallenge: this.pkceCodes.challenge,
3009
3015
  codeChallengeMethod: "S256" // Use SHA256 Algorithm
@@ -3102,7 +3108,8 @@ class MsalDeviceCode extends MsalNode {
3102
3108
  scopes,
3103
3109
  cancel: false,
3104
3110
  correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
3105
- authority: options === null || options === void 0 ? void 0 : options.authority
3111
+ authority: options === null || options === void 0 ? void 0 : options.authority,
3112
+ claims: options === null || options === void 0 ? void 0 : options.claims
3106
3113
  };
3107
3114
  const promise = this.publicApp.acquireTokenByDeviceCode(requestOptions);
3108
3115
  // TODO:
@@ -3219,7 +3226,10 @@ class MsalAuthorizationCode extends MsalNode {
3219
3226
  const result = await ((_a = this.confidentialApp) === null || _a === void 0 ? void 0 : _a.acquireTokenByCode({
3220
3227
  scopes,
3221
3228
  redirectUri: this.redirectUri,
3222
- code: this.authorizationCode
3229
+ code: this.authorizationCode,
3230
+ correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
3231
+ authority: options === null || options === void 0 ? void 0 : options.authority,
3232
+ claims: options === null || options === void 0 ? void 0 : options.claims
3223
3233
  }));
3224
3234
  // The Client Credential flow does not return an account,
3225
3235
  // so each time getToken gets called, we will have to acquire a new token through the service.
@@ -3322,6 +3332,7 @@ class MsalOnBehalfOf extends MsalNode {
3322
3332
  scopes,
3323
3333
  correlationId: options.correlationId,
3324
3334
  authority: options.authority,
3335
+ claims: options.claims,
3325
3336
  oboAssertion: this.userAssertionToken
3326
3337
  });
3327
3338
  return this.handleResult(scopes, this.clientId, result || undefined);