@azure/core-client 1.4.0-alpha.20211123.3 → 1.4.0-alpha.20211206.10

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.
package/CHANGELOG.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ### Features Added
6
6
 
7
7
  - Added a new function `authorizeRequestOnClaimChallenge`, that can be used with the `@azure/core-rest-pipeline`'s `bearerTokenAuthenticationPolicy` to support [Continuous Access Evaluation (CAE) challenges](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation).
8
- - Call the `bearerTokenAuthenticationPolicy` with the following options: `bearerTokenAuthenticationPolicy({ authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge })`. Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. When it can't complete a challenge it will return the 401 (unauthorized) response from ARM.
8
+ - Call the `bearerTokenAuthenticationPolicy` with the following options: `bearerTokenAuthenticationPolicy({ authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge })`. Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. When it can't complete a challenge it will return the 401 (unauthorized) response from ARM.
9
9
 
10
10
  ### Breaking Changes
11
11
 
@@ -13,6 +13,12 @@
13
13
 
14
14
  ### Other Changes
15
15
 
16
+ ## 1.3.3 (2021-12-02)
17
+
18
+ ### Bugs Fixed
19
+
20
+ - Added a check to handle undefined value during the parsing of query parameters. Please refer to [PR #18621](https://github.com/Azure/azure-sdk-for-js/pull/18621) for further details.
21
+
16
22
  ## 1.3.2 (2021-10-25)
17
23
 
18
24
  ### Bugs Fixed
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var coreRestPipeline = require('@azure/core-rest-pipeline');
6
- var logger$1 = require('@azure/logger');
6
+ var logger = require('@azure/logger');
7
7
  require('@azure/core-asynciterator-polyfill');
8
8
 
9
9
  // Copyright (c) Microsoft Corporation.
@@ -144,6 +144,7 @@ function decodeString(value) {
144
144
  /**
145
145
  * Decodes a base64 string into a string.
146
146
  * @param value - the base64 string to decode
147
+ * @internal
147
148
  */
148
149
  function decodeStringToString(value) {
149
150
  return Buffer.from(value, "base64").toString();
@@ -1895,7 +1896,7 @@ function getCredentialScopes(options) {
1895
1896
  }
1896
1897
 
1897
1898
  // Copyright (c) Microsoft Corporation.
1898
- const logger = logger$1.createClientLogger("authorizeRequestOnClaimChallenge");
1899
+ const defaultLogger = logger.createClientLogger("authorizeRequestOnClaimChallenge");
1899
1900
  /**
1900
1901
  * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`.
1901
1902
  * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`.
@@ -1939,6 +1940,7 @@ function parseCAEChallenge(challenges) {
1939
1940
  */
1940
1941
  async function authorizeRequestOnClaimChallenge(onChallengeOptions) {
1941
1942
  const { scopes, response } = onChallengeOptions;
1943
+ const logger = onChallengeOptions.logger || defaultLogger;
1942
1944
  const challenge = response.headers.get("WWW-Authenticate");
1943
1945
  if (!challenge) {
1944
1946
  logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`);