@azure/core-client
Advanced tools
Comparing version 1.3.3-alpha.20211026.1 to 1.3.3-alpha.20211101.2
@@ -7,2 +7,5 @@ # Release History | ||
- 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 | ||
@@ -9,0 +12,0 @@ |
@@ -33,2 +33,9 @@ // 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,2 +30,9 @@ // 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,3 +9,4 @@ // Copyright (c) Microsoft Corporation. | ||
export { serializationPolicy, serializationPolicyName } from "./serializationPolicy"; | ||
export { authorizeRequestOnClaimChallenge } from "./authorizeRequestOnClaimChallenge"; | ||
import "@azure/core-asynciterator-polyfill"; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@azure/core-client", | ||
"version": "1.3.3-alpha.20211026.1", | ||
"version": "1.3.3-alpha.20211101.2", | ||
"description": "Core library for interfacing with AutoRest generated code", | ||
@@ -77,2 +77,3 @@ "sdk-type": "client", | ||
"@azure/core-tracing": "1.0.0-preview.13", | ||
"@azure/logger": "^1.0.0", | ||
"tslib": "^2.2.0" | ||
@@ -79,0 +80,0 @@ }, |
import { AbortSignalLike } from '@azure/abort-controller'; | ||
import { AuthorizeRequestOnChallengeOptions } from '@azure/core-rest-pipeline'; | ||
import { HttpClient } from '@azure/core-rest-pipeline'; | ||
@@ -13,2 +14,29 @@ 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 { | ||
@@ -15,0 +43,0 @@ /** |
import { AbortSignalLike } from '@azure/abort-controller'; | ||
import { AuthorizeRequestOnChallengeOptions } from '@azure/core-rest-pipeline'; | ||
import { HttpClient } from '@azure/core-rest-pipeline'; | ||
@@ -14,2 +15,30 @@ 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 { | ||
@@ -16,0 +45,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 too big to display
Sorry, the diff of this file is not supported yet
590124
38
5350
7
+ Added@azure/logger@^1.0.0