@azure/msal-node 2.14.0 → 2.15.0
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/dist/cache/NodeStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/client/ClientApplication.mjs +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientCredentialClient.mjs +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/DeviceCodeClient.mjs +1 -1
- package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +3 -2
- package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
- package/dist/client/OnBehalfOfClient.mjs +1 -1
- package/dist/client/PublicClientApplication.mjs +1 -1
- package/dist/client/UsernamePasswordClient.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/NodeAuthError.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.mjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/LoopbackClient.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/InteractiveRequest.d.ts +2 -2
- package/dist/request/InteractiveRequest.d.ts.map +1 -1
- package/dist/request/ManagedIdentityRequestParams.d.ts +3 -1
- package/dist/request/ManagedIdentityRequestParams.d.ts.map +1 -1
- package/dist/request/SilentFlowRequest.d.ts +1 -1
- package/dist/request/SilentFlowRequest.d.ts.map +1 -1
- package/dist/retry/LinearRetryPolicy.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/NetworkUtils.mjs +1 -1
- package/lib/msal-node.cjs +60 -59
- package/lib/msal-node.cjs.map +1 -1
- package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/request/InteractiveRequest.d.ts +2 -2
- package/lib/types/request/InteractiveRequest.d.ts.map +1 -1
- package/lib/types/request/ManagedIdentityRequestParams.d.ts +3 -1
- package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -1
- package/lib/types/request/SilentFlowRequest.d.ts +1 -1
- package/lib/types/request/SilentFlowRequest.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/client/ManagedIdentityApplication.ts +4 -1
- package/src/packageMetadata.ts +1 -1
- package/src/request/InteractiveRequest.ts +6 -13
- package/src/request/ManagedIdentityRequestParams.ts +3 -1
- package/src/request/SilentFlowRequest.ts +1 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagedIdentityApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAYH,oBAAoB,EAGvB,MAAM,yBA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CAAwB;gBAEzC,aAAa,CAAC,EAAE,4BAA4B;IA2DxD;;;;OAIG;IACU,YAAY,CACrB,4BAA4B,EAAE,4BAA4B,GAC3D,OAAO,CAAC,oBAAoB,CAAC;IAqEhC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;CAMhE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node";
|
|
2
3
|
import { ILoopbackClient } from "../network/ILoopbackClient.js";
|
|
3
|
-
import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest.js";
|
|
4
4
|
/**
|
|
5
5
|
* Request object passed by user to configure acquireTokenInteractive API
|
|
6
6
|
*
|
|
@@ -12,7 +12,7 @@ import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest.js";
|
|
|
12
12
|
* - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export type InteractiveRequest =
|
|
15
|
+
export type InteractiveRequest = Partial<Omit<CommonAuthorizationUrlRequest, "scopes" | "redirectUri" | "requestedClaimsHash" | "storeInCache">> & {
|
|
16
16
|
openBrowser: (url: string) => Promise<void>;
|
|
17
17
|
scopes?: Array<string>;
|
|
18
18
|
successTemplate?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../../../src/request/InteractiveRequest.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../../../src/request/InteractiveRequest.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,IAAI,CACA,6BAA6B,EAC7B,QAAQ,GAAG,aAAa,GAAG,qBAAqB,GAAG,cAAc,CACpE,CACJ,GAAG;IACA,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,eAAe,CAAC;CACpC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ManagedIdentityRequest
|
|
3
|
+
* - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped
|
|
3
4
|
* - forceRefresh - forces managed identity requests to skip the cache and make network calls if true
|
|
4
|
-
* - resource
|
|
5
|
+
* - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default
|
|
5
6
|
*/
|
|
6
7
|
export type ManagedIdentityRequestParams = {
|
|
8
|
+
claims?: string;
|
|
7
9
|
forceRefresh?: boolean;
|
|
8
10
|
resource: string;
|
|
9
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagedIdentityRequestParams.d.ts","sourceRoot":"","sources":["../../../src/request/ManagedIdentityRequestParams.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"ManagedIdentityRequestParams.d.ts","sourceRoot":"","sources":["../../../src/request/ManagedIdentityRequestParams.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node";
|
|
|
10
10
|
* - forceRefresh - Forces silent requests to make network calls if true.
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export type SilentFlowRequest = Partial<Omit<CommonSilentFlowRequest, "account" | "scopes" | "
|
|
13
|
+
export type SilentFlowRequest = Partial<Omit<CommonSilentFlowRequest, "account" | "scopes" | "requestedClaimsHash" | "storeInCache">> & {
|
|
14
14
|
account: AccountInfo;
|
|
15
15
|
scopes: Array<string>;
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SilentFlowRequest.d.ts","sourceRoot":"","sources":["../../../src/request/SilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":"SilentFlowRequest.d.ts","sourceRoot":"","sources":["../../../src/request/SilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACvB,SAAS,GAAG,QAAQ,GAAG,qBAAqB,GAAG,cAAc,CAChE,CACJ,GAAG;IACA,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@azure/msal-node",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.15.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Microsoft",
|
|
7
7
|
"email": "nugetaad@microsoft.com",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"eslint-config-msal": "file:../../shared-configs/eslint-config-msal",
|
|
75
75
|
"jest": "^29.5.0",
|
|
76
76
|
"prettier": "2.8.7",
|
|
77
|
-
"rollup": "^3.
|
|
77
|
+
"rollup": "^3.29.5",
|
|
78
78
|
"rollup-msal": "file:../../shared-configs/rollup-msal",
|
|
79
79
|
"ts-jest": "^29.1.0",
|
|
80
80
|
"tslib": "^1.10.0",
|
|
@@ -142,7 +142,10 @@ export class ManagedIdentityApplication {
|
|
|
142
142
|
correlationId: this.cryptoProvider.createNewGuid(),
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
if (
|
|
145
|
+
if (
|
|
146
|
+
managedIdentityRequestParams.claims ||
|
|
147
|
+
managedIdentityRequest.forceRefresh
|
|
148
|
+
) {
|
|
146
149
|
// make a network call to the managed identity source
|
|
147
150
|
return this.managedIdentityClient.sendManagedIdentityTokenRequest(
|
|
148
151
|
managedIdentityRequest,
|
package/src/packageMetadata.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node";
|
|
6
7
|
import { ILoopbackClient } from "../network/ILoopbackClient.js";
|
|
7
|
-
import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Request object passed by user to configure acquireTokenInteractive API
|
|
@@ -17,18 +17,11 @@ import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest.js";
|
|
|
17
17
|
* - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
|
-
export type InteractiveRequest =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| "azureCloudOptions"
|
|
26
|
-
| "account"
|
|
27
|
-
| "extraQueryParameters"
|
|
28
|
-
| "tokenQueryParameters"
|
|
29
|
-
| "extraScopesToConsent"
|
|
30
|
-
| "loginHint"
|
|
31
|
-
| "prompt"
|
|
20
|
+
export type InteractiveRequest = Partial<
|
|
21
|
+
Omit<
|
|
22
|
+
CommonAuthorizationUrlRequest,
|
|
23
|
+
"scopes" | "redirectUri" | "requestedClaimsHash" | "storeInCache"
|
|
24
|
+
>
|
|
32
25
|
> & {
|
|
33
26
|
openBrowser: (url: string) => Promise<void>;
|
|
34
27
|
scopes?: Array<string>;
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* ManagedIdentityRequest
|
|
8
|
+
* - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped
|
|
8
9
|
* - forceRefresh - forces managed identity requests to skip the cache and make network calls if true
|
|
9
|
-
* - resource
|
|
10
|
+
* - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default
|
|
10
11
|
*/
|
|
11
12
|
export type ManagedIdentityRequestParams = {
|
|
13
|
+
claims?: string;
|
|
12
14
|
forceRefresh?: boolean;
|
|
13
15
|
resource: string;
|
|
14
16
|
};
|
|
@@ -19,12 +19,7 @@ import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node";
|
|
|
19
19
|
export type SilentFlowRequest = Partial<
|
|
20
20
|
Omit<
|
|
21
21
|
CommonSilentFlowRequest,
|
|
22
|
-
| "
|
|
23
|
-
| "scopes"
|
|
24
|
-
| "resourceRequestMethod"
|
|
25
|
-
| "resourceRequestUri"
|
|
26
|
-
| "requestedClaimsHash"
|
|
27
|
-
| "storeInCache"
|
|
22
|
+
"account" | "scopes" | "requestedClaimsHash" | "storeInCache"
|
|
28
23
|
>
|
|
29
24
|
> & {
|
|
30
25
|
account: AccountInfo;
|