@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.
Files changed (66) hide show
  1. package/dist/cache/NodeStorage.mjs +1 -1
  2. package/dist/cache/TokenCache.mjs +1 -1
  3. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  4. package/dist/cache/serializer/Deserializer.mjs +1 -1
  5. package/dist/cache/serializer/Serializer.mjs +1 -1
  6. package/dist/client/ClientApplication.mjs +1 -1
  7. package/dist/client/ClientAssertion.mjs +1 -1
  8. package/dist/client/ClientCredentialClient.mjs +1 -1
  9. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  10. package/dist/client/DeviceCodeClient.mjs +1 -1
  11. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  12. package/dist/client/ManagedIdentityApplication.mjs +3 -2
  13. package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
  14. package/dist/client/ManagedIdentityClient.mjs +1 -1
  15. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  16. package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
  17. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
  18. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  19. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  20. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  21. package/dist/client/OnBehalfOfClient.mjs +1 -1
  22. package/dist/client/PublicClientApplication.mjs +1 -1
  23. package/dist/client/UsernamePasswordClient.mjs +1 -1
  24. package/dist/config/Configuration.mjs +1 -1
  25. package/dist/config/ManagedIdentityId.mjs +1 -1
  26. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  27. package/dist/crypto/CryptoProvider.mjs +1 -1
  28. package/dist/crypto/GuidGenerator.mjs +1 -1
  29. package/dist/crypto/HashUtils.mjs +1 -1
  30. package/dist/crypto/PkceGenerator.mjs +1 -1
  31. package/dist/error/ManagedIdentityError.mjs +1 -1
  32. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  33. package/dist/error/NodeAuthError.mjs +1 -1
  34. package/dist/index.mjs +1 -1
  35. package/dist/internals.mjs +1 -1
  36. package/dist/network/HttpClient.mjs +1 -1
  37. package/dist/network/HttpClientWithRetries.mjs +1 -1
  38. package/dist/network/LoopbackClient.mjs +1 -1
  39. package/dist/packageMetadata.d.ts +1 -1
  40. package/dist/packageMetadata.mjs +2 -2
  41. package/dist/request/InteractiveRequest.d.ts +2 -2
  42. package/dist/request/InteractiveRequest.d.ts.map +1 -1
  43. package/dist/request/ManagedIdentityRequestParams.d.ts +3 -1
  44. package/dist/request/ManagedIdentityRequestParams.d.ts.map +1 -1
  45. package/dist/request/SilentFlowRequest.d.ts +1 -1
  46. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  47. package/dist/retry/LinearRetryPolicy.mjs +1 -1
  48. package/dist/utils/Constants.mjs +1 -1
  49. package/dist/utils/EncodingUtils.mjs +1 -1
  50. package/dist/utils/NetworkUtils.mjs +1 -1
  51. package/lib/msal-node.cjs +60 -59
  52. package/lib/msal-node.cjs.map +1 -1
  53. package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -1
  54. package/lib/types/packageMetadata.d.ts +1 -1
  55. package/lib/types/request/InteractiveRequest.d.ts +2 -2
  56. package/lib/types/request/InteractiveRequest.d.ts.map +1 -1
  57. package/lib/types/request/ManagedIdentityRequestParams.d.ts +3 -1
  58. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -1
  59. package/lib/types/request/SilentFlowRequest.d.ts +1 -1
  60. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -1
  61. package/package.json +2 -2
  62. package/src/client/ManagedIdentityApplication.ts +4 -1
  63. package/src/packageMetadata.ts +1 -1
  64. package/src/request/InteractiveRequest.ts +6 -13
  65. package/src/request/ManagedIdentityRequestParams.ts +3 -1
  66. 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,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAG/B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAEH,0BAA0B,EAC7B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAmC;IAEjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAc;IACzC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,aAAa,CAAY;IAGjC,OAAO,CAAC,0BAA0B,CAAyB;IAE3D,OAAO,CAAC,qBAAqB,CAAwB;gBAEzC,aAAa,CAAC,EAAE,4BAA4B;IA2DxD;;;;OAIG;IACU,YAAY,CACrB,4BAA4B,EAAE,4BAA4B,GAC3D,OAAO,CAAC,oBAAoB,CAAC;IAkEhC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;CAMhE"}
1
+ {"version":3,"file":"ManagedIdentityApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAYH,oBAAoB,EAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAG/B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAEH,0BAA0B,EAC7B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAmC;IAEjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAc;IACzC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,aAAa,CAAY;IAGjC,OAAO,CAAC,0BAA0B,CAAyB;IAE3D,OAAO,CAAC,qBAAqB,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,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-node";
2
- export declare const version = "2.14.0";
2
+ export declare const version = "2.15.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -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 = Pick<AuthorizationUrlRequest, "authority" | "correlationId" | "claims" | "azureCloudOptions" | "account" | "extraQueryParameters" | "tokenQueryParameters" | "extraScopesToConsent" | "loginHint" | "prompt"> & {
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,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACjC,uBAAuB,EACrB,WAAW,GACX,eAAe,GACf,QAAQ,GACR,mBAAmB,GACnB,SAAS,GACT,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,WAAW,GACX,QAAQ,CACb,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
+ {"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 - 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
+ * - 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;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"}
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" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash" | "storeInCache">> & {
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,EACrB,SAAS,GACT,QAAQ,GACR,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"}
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.14.0",
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.20.1",
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 (managedIdentityRequest.forceRefresh) {
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,
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable header/header */
2
2
  export const name = "@azure/msal-node";
3
- export const version = "2.14.0";
3
+ export const version = "2.15.0";
@@ -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 = Pick<
21
- AuthorizationUrlRequest,
22
- | "authority"
23
- | "correlationId"
24
- | "claims"
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 - 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
+ * - 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
- | "account"
23
- | "scopes"
24
- | "resourceRequestMethod"
25
- | "resourceRequestUri"
26
- | "requestedClaimsHash"
27
- | "storeInCache"
22
+ "account" | "scopes" | "requestedClaimsHash" | "storeInCache"
28
23
  >
29
24
  > & {
30
25
  account: AccountInfo;