New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@azure/core-client

Package Overview
Dependencies
Maintainers
2
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-client - npm Package Compare versions

Comparing version 1.3.3-alpha.20211101.2 to 1.3.3

11

CHANGELOG.md
# Release History
## 1.3.3 (Unreleased)
## 1.3.3 (2021-12-02)
### Features Added
- 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).
- 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.
### Breaking Changes
### Bugs Fixed
### Other Changes
- 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.

@@ -16,0 +9,0 @@ ## 1.3.2 (2021-10-25)

@@ -33,9 +33,2 @@ // Copyright (c) Microsoft Corporation.

}
/**
* Decodes a base64 string into a string.
* @param value - the base64 string to decode
*/
export function decodeStringToString(value) {
return atob(value);
}
//# sourceMappingURL=base64.browser.js.map

@@ -30,9 +30,2 @@ // Copyright (c) Microsoft Corporation.

}
/**
* Decodes a base64 string into a string.
* @param value - the base64 string to decode
*/
export function decodeStringToString(value) {
return Buffer.from(value, "base64").toString();
}
//# sourceMappingURL=base64.js.map

@@ -9,4 +9,3 @@ // Copyright (c) Microsoft Corporation.

export { serializationPolicy, serializationPolicyName } from "./serializationPolicy";
export { authorizeRequestOnClaimChallenge } from "./authorizeRequestOnClaimChallenge";
import "@azure/core-asynciterator-polyfill";
//# sourceMappingURL=index.js.map

5

dist-esm/src/urlHelpers.js

@@ -213,3 +213,3 @@ import { getOperationArgumentValueFromParameter } from "./operationHelpers";

}
else {
else if (Array.isArray(value)) {
// QUIRK: If we get an array of values, include multiple key/value pairs

@@ -220,2 +220,5 @@ for (const subValue of value) {

}
else {
searchPieces.push(`${name}=${value}`);
}
}

@@ -222,0 +225,0 @@ // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't.

{
"name": "@azure/core-client",
"version": "1.3.3-alpha.20211101.2",
"version": "1.3.3",
"description": "Core library for interfacing with AutoRest generated code",

@@ -77,3 +77,2 @@ "sdk-type": "client",

"@azure/core-tracing": "1.0.0-preview.13",
"@azure/logger": "^1.0.0",
"tslib": "^2.2.0"

@@ -88,4 +87,4 @@ },

"@types/sinon": "^9.0.4",
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/dev-tool": "^1.0.0",
"chai": "^4.2.0",

@@ -92,0 +91,0 @@ "downlevel-dts": "~0.4.0",

@@ -1,2 +0,2 @@

# Azure Core Service client library for JavaScript (Experimental)
# Azure Core Service client library for JavaScript

@@ -3,0 +3,0 @@ This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript).

import { AbortSignalLike } from '@azure/abort-controller';
import { AuthorizeRequestOnChallengeOptions } from '@azure/core-rest-pipeline';
import { HttpClient } from '@azure/core-rest-pipeline';

@@ -14,29 +13,2 @@ import { HttpMethods } from '@azure/core-rest-pipeline';

import { TransferProgressEvent } from '@azure/core-rest-pipeline';
/**
* This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges:
* [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation).
*
* Call the `bearerTokenAuthenticationPolicy` with the following options:
*
* ```ts
* import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
* import { authorizeRequestOnClaimChallenge } from "@azure/core-client";
*
* const bearerTokenAuthenticationPolicy = 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.
*
* Example challenge with claims:
*
* ```
* Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token",
* error_description="User session has been revoked",
* claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0="
* ```
*/
export declare function authorizeRequestOnClaimChallenge(onChallengeOptions: AuthorizeRequestOnChallengeOptions): Promise<boolean>;
export declare interface BaseMapper {

@@ -43,0 +15,0 @@ /**

import { AbortSignalLike } from '@azure/abort-controller';
import { AuthorizeRequestOnChallengeOptions } from '@azure/core-rest-pipeline';
import { HttpClient } from '@azure/core-rest-pipeline';

@@ -15,30 +14,2 @@ import { HttpMethods } from '@azure/core-rest-pipeline';

/**
* This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges:
* [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation).
*
* Call the `bearerTokenAuthenticationPolicy` with the following options:
*
* ```ts
* import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
* import { authorizeRequestOnClaimChallenge } from "@azure/core-client";
*
* const bearerTokenAuthenticationPolicy = 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.
*
* Example challenge with claims:
*
* ```
* Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token",
* error_description="User session has been revoked",
* claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0="
* ```
*/
export declare function authorizeRequestOnClaimChallenge(onChallengeOptions: AuthorizeRequestOnChallengeOptions): Promise<boolean>;
export declare interface BaseMapper {

@@ -45,0 +16,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc