@azure/msal-node 2.7.0-alpha.0 → 2.7.1-alpha.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 (245) hide show
  1. package/README.md +1 -1
  2. package/dist/cache/ITokenCache.d.ts +15 -15
  3. package/dist/cache/NodeStorage.cjs +423 -423
  4. package/dist/cache/NodeStorage.cjs.map +1 -1
  5. package/dist/cache/NodeStorage.d.ts +193 -193
  6. package/dist/cache/NodeStorage.d.ts.map +1 -1
  7. package/dist/cache/NodeStorage.mjs +424 -424
  8. package/dist/cache/NodeStorage.mjs.map +1 -1
  9. package/dist/cache/TokenCache.cjs +265 -265
  10. package/dist/cache/TokenCache.d.ts +90 -90
  11. package/dist/cache/TokenCache.mjs +265 -265
  12. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  13. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  14. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  15. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  16. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  17. package/dist/cache/serializer/Deserializer.cjs +167 -170
  18. package/dist/cache/serializer/Deserializer.cjs.map +1 -1
  19. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  20. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  21. package/dist/cache/serializer/Deserializer.mjs +168 -171
  22. package/dist/cache/serializer/Deserializer.mjs.map +1 -1
  23. package/dist/cache/serializer/Serializer.cjs +137 -137
  24. package/dist/cache/serializer/Serializer.d.ts +39 -39
  25. package/dist/cache/serializer/Serializer.mjs +137 -137
  26. package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
  27. package/dist/client/ClientApplication.cjs +335 -333
  28. package/dist/client/ClientApplication.cjs.map +1 -1
  29. package/dist/client/ClientApplication.d.ts +143 -142
  30. package/dist/client/ClientApplication.d.ts.map +1 -1
  31. package/dist/client/ClientApplication.mjs +336 -334
  32. package/dist/client/ClientApplication.mjs.map +1 -1
  33. package/dist/client/ClientAssertion.cjs +116 -116
  34. package/dist/client/ClientAssertion.d.ts +46 -46
  35. package/dist/client/ClientAssertion.mjs +116 -116
  36. package/dist/client/ClientCredentialClient.cjs +194 -194
  37. package/dist/client/ClientCredentialClient.cjs.map +1 -1
  38. package/dist/client/ClientCredentialClient.d.ts +33 -33
  39. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  40. package/dist/client/ClientCredentialClient.mjs +195 -195
  41. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  42. package/dist/client/ConfidentialClientApplication.cjs +166 -163
  43. package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
  44. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  45. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  46. package/dist/client/ConfidentialClientApplication.mjs +168 -165
  47. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  48. package/dist/client/DeviceCodeClient.cjs +207 -207
  49. package/dist/client/DeviceCodeClient.d.ts +53 -53
  50. package/dist/client/DeviceCodeClient.mjs +207 -207
  51. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  52. package/dist/client/IPublicClientApplication.d.ts +42 -42
  53. package/dist/client/ManagedIdentityApplication.cjs +75 -80
  54. package/dist/client/ManagedIdentityApplication.cjs.map +1 -1
  55. package/dist/client/ManagedIdentityApplication.d.ts +23 -23
  56. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  57. package/dist/client/ManagedIdentityApplication.mjs +76 -81
  58. package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
  59. package/dist/client/ManagedIdentityClient.cjs +40 -36
  60. package/dist/client/ManagedIdentityClient.cjs.map +1 -1
  61. package/dist/client/ManagedIdentityClient.d.ts +19 -24
  62. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  63. package/dist/client/ManagedIdentityClient.mjs +40 -36
  64. package/dist/client/ManagedIdentityClient.mjs.map +1 -1
  65. package/dist/client/ManagedIdentitySources/AppService.cjs +42 -69
  66. package/dist/client/ManagedIdentitySources/AppService.cjs.map +1 -1
  67. package/dist/client/ManagedIdentitySources/AppService.d.ts +16 -16
  68. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  69. package/dist/client/ManagedIdentitySources/AppService.mjs +43 -70
  70. package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
  71. package/dist/client/ManagedIdentitySources/AzureArc.cjs +81 -92
  72. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
  73. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +18 -18
  74. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  75. package/dist/client/ManagedIdentitySources/AzureArc.mjs +84 -95
  76. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
  77. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +116 -77
  78. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
  79. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -18
  80. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  81. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +118 -80
  82. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  83. package/dist/client/ManagedIdentitySources/CloudShell.cjs +47 -0
  84. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +1 -0
  85. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +15 -6
  86. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  87. package/dist/client/ManagedIdentitySources/CloudShell.mjs +45 -0
  88. package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -0
  89. package/dist/client/ManagedIdentitySources/Imds.cjs +43 -52
  90. package/dist/client/ManagedIdentitySources/Imds.cjs.map +1 -1
  91. package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
  92. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  93. package/dist/client/ManagedIdentitySources/Imds.mjs +44 -53
  94. package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
  95. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +61 -0
  96. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +1 -0
  97. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +16 -6
  98. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  99. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +59 -0
  100. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -0
  101. package/dist/client/OnBehalfOfClient.cjs +202 -202
  102. package/dist/client/OnBehalfOfClient.cjs.map +1 -1
  103. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  104. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  105. package/dist/client/OnBehalfOfClient.mjs +203 -203
  106. package/dist/client/OnBehalfOfClient.mjs.map +1 -1
  107. package/dist/client/PublicClientApplication.cjs +229 -229
  108. package/dist/client/PublicClientApplication.d.ts +71 -71
  109. package/dist/client/PublicClientApplication.mjs +229 -229
  110. package/dist/client/UsernamePasswordClient.cjs +95 -95
  111. package/dist/client/UsernamePasswordClient.cjs.map +1 -1
  112. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  113. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  114. package/dist/client/UsernamePasswordClient.mjs +96 -96
  115. package/dist/client/UsernamePasswordClient.mjs.map +1 -1
  116. package/dist/config/Configuration.cjs +102 -86
  117. package/dist/config/Configuration.cjs.map +1 -1
  118. package/dist/config/Configuration.d.ts +126 -122
  119. package/dist/config/Configuration.d.ts.map +1 -1
  120. package/dist/config/Configuration.mjs +102 -86
  121. package/dist/config/Configuration.mjs.map +1 -1
  122. package/dist/config/ManagedIdentityId.cjs +48 -48
  123. package/dist/config/ManagedIdentityId.d.ts +11 -11
  124. package/dist/config/ManagedIdentityId.mjs +48 -48
  125. package/dist/config/ManagedIdentityRequestParameters.cjs +28 -29
  126. package/dist/config/ManagedIdentityRequestParameters.cjs.map +1 -1
  127. package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
  128. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  129. package/dist/config/ManagedIdentityRequestParameters.mjs +28 -29
  130. package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -1
  131. package/dist/crypto/CryptoProvider.cjs +75 -75
  132. package/dist/crypto/CryptoProvider.d.ts +52 -52
  133. package/dist/crypto/CryptoProvider.mjs +75 -75
  134. package/dist/crypto/GuidGenerator.cjs +22 -22
  135. package/dist/crypto/GuidGenerator.d.ts +14 -14
  136. package/dist/crypto/GuidGenerator.mjs +22 -22
  137. package/dist/crypto/HashUtils.cjs +13 -13
  138. package/dist/crypto/HashUtils.d.ts +8 -8
  139. package/dist/crypto/HashUtils.mjs +13 -13
  140. package/dist/crypto/PkceGenerator.cjs +49 -49
  141. package/dist/crypto/PkceGenerator.d.ts +22 -22
  142. package/dist/crypto/PkceGenerator.mjs +49 -49
  143. package/dist/error/ManagedIdentityError.cjs +38 -28
  144. package/dist/error/ManagedIdentityError.cjs.map +1 -1
  145. package/dist/error/ManagedIdentityError.d.ts +26 -21
  146. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  147. package/dist/error/ManagedIdentityError.mjs +39 -29
  148. package/dist/error/ManagedIdentityError.mjs.map +1 -1
  149. package/dist/error/ManagedIdentityErrorCodes.cjs +26 -15
  150. package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -1
  151. package/dist/error/ManagedIdentityErrorCodes.d.ts +18 -9
  152. package/dist/error/ManagedIdentityErrorCodes.d.ts.map +1 -1
  153. package/dist/error/ManagedIdentityErrorCodes.mjs +23 -14
  154. package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
  155. package/dist/error/NodeAuthError.cjs +85 -85
  156. package/dist/error/NodeAuthError.d.ts +65 -65
  157. package/dist/error/NodeAuthError.mjs +85 -85
  158. package/dist/index.cjs +21 -21
  159. package/dist/index.d.ts +44 -44
  160. package/dist/index.d.ts.map +1 -1
  161. package/dist/index.mjs +1 -1
  162. package/dist/internals.cjs +8 -8
  163. package/dist/internals.d.ts +6 -6
  164. package/dist/internals.mjs +8 -8
  165. package/dist/network/HttpClient.cjs +281 -283
  166. package/dist/network/HttpClient.cjs.map +1 -1
  167. package/dist/network/HttpClient.d.ts +25 -26
  168. package/dist/network/HttpClient.d.ts.map +1 -1
  169. package/dist/network/HttpClient.mjs +281 -283
  170. package/dist/network/HttpClient.mjs.map +1 -1
  171. package/dist/network/HttpClientWithRetries.cjs +44 -0
  172. package/dist/network/HttpClientWithRetries.cjs.map +1 -0
  173. package/dist/network/HttpClientWithRetries.d.ts +12 -0
  174. package/dist/network/HttpClientWithRetries.d.ts.map +1 -0
  175. package/dist/network/HttpClientWithRetries.mjs +42 -0
  176. package/dist/network/HttpClientWithRetries.mjs.map +1 -0
  177. package/dist/network/ILoopbackClient.d.ts +10 -10
  178. package/dist/network/LoopbackClient.cjs +77 -77
  179. package/dist/network/LoopbackClient.d.ts +21 -21
  180. package/dist/network/LoopbackClient.mjs +77 -77
  181. package/dist/packageMetadata.cjs +4 -4
  182. package/dist/packageMetadata.d.ts +2 -2
  183. package/dist/packageMetadata.mjs +4 -4
  184. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  185. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  186. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  187. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  188. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  189. package/dist/request/InteractiveRequest.d.ts +22 -22
  190. package/dist/request/ManagedIdentityRequest.d.ts +8 -8
  191. package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
  192. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  193. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  194. package/dist/request/SignOutRequest.d.ts +5 -5
  195. package/dist/request/SilentFlowRequest.d.ts +16 -16
  196. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  197. package/dist/response/ManagedIdentityTokenResponse.d.ts +24 -24
  198. package/dist/retry/IHttpRetryPolicy.d.ts +6 -0
  199. package/dist/retry/IHttpRetryPolicy.d.ts.map +1 -0
  200. package/dist/retry/LinearRetryPolicy.cjs +47 -0
  201. package/dist/retry/LinearRetryPolicy.cjs.map +1 -0
  202. package/dist/retry/LinearRetryPolicy.d.ts +12 -0
  203. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -0
  204. package/dist/retry/LinearRetryPolicy.mjs +45 -0
  205. package/dist/retry/LinearRetryPolicy.mjs.map +1 -0
  206. package/dist/utils/Constants.cjs +142 -103
  207. package/dist/utils/Constants.cjs.map +1 -1
  208. package/dist/utils/Constants.d.ts +132 -106
  209. package/dist/utils/Constants.d.ts.map +1 -1
  210. package/dist/utils/Constants.mjs +134 -100
  211. package/dist/utils/Constants.mjs.map +1 -1
  212. package/dist/utils/EncodingUtils.cjs +44 -44
  213. package/dist/utils/EncodingUtils.d.ts +26 -26
  214. package/dist/utils/EncodingUtils.mjs +44 -44
  215. package/dist/utils/NetworkUtils.cjs +38 -38
  216. package/dist/utils/NetworkUtils.d.ts +5 -5
  217. package/dist/utils/NetworkUtils.mjs +38 -38
  218. package/package.json +5 -5
  219. package/src/cache/NodeStorage.ts +4 -9
  220. package/src/cache/serializer/Deserializer.ts +1 -5
  221. package/src/client/ClientApplication.ts +24 -10
  222. package/src/client/ClientCredentialClient.ts +14 -6
  223. package/src/client/ConfidentialClientApplication.ts +10 -5
  224. package/src/client/ManagedIdentityApplication.ts +8 -16
  225. package/src/client/ManagedIdentityClient.ts +23 -11
  226. package/src/client/ManagedIdentitySources/AppService.ts +68 -97
  227. package/src/client/ManagedIdentitySources/AzureArc.ts +59 -68
  228. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +82 -11
  229. package/src/client/ManagedIdentitySources/CloudShell.ts +93 -8
  230. package/src/client/ManagedIdentitySources/Imds.ts +54 -40
  231. package/src/client/ManagedIdentitySources/ServiceFabric.ts +126 -5
  232. package/src/client/OnBehalfOfClient.ts +18 -7
  233. package/src/client/UsernamePasswordClient.ts +16 -7
  234. package/src/config/Configuration.ts +50 -18
  235. package/src/config/ManagedIdentityRequestParameters.ts +1 -6
  236. package/src/error/ManagedIdentityError.ts +15 -4
  237. package/src/error/ManagedIdentityErrorCodes.ts +19 -1
  238. package/src/index.ts +1 -0
  239. package/src/network/HttpClient.ts +27 -39
  240. package/src/network/HttpClientWithRetries.ts +80 -0
  241. package/src/packageMetadata.ts +1 -1
  242. package/src/request/ClientCredentialRequest.ts +6 -3
  243. package/src/retry/IHttpRetryPolicy.ts +18 -0
  244. package/src/retry/LinearRetryPolicy.ts +71 -0
  245. package/src/utils/Constants.ts +47 -10
@@ -1,96 +1,112 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.1-alpha.0 2024-05-01 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
5
  var msalCommon = require('@azure/msal-common');
6
6
  var HttpClient = require('../network/HttpClient.cjs');
7
7
  var ManagedIdentityId = require('./ManagedIdentityId.cjs');
8
+ var Constants = require('../utils/Constants.cjs');
9
+ var LinearRetryPolicy = require('../retry/LinearRetryPolicy.cjs');
10
+ var HttpClientWithRetries = require('../network/HttpClientWithRetries.cjs');
8
11
 
9
- /*
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License.
12
- */
13
- const DEFAULT_AUTH_OPTIONS = {
14
- clientId: msalCommon.Constants.EMPTY_STRING,
15
- authority: msalCommon.Constants.DEFAULT_AUTHORITY,
16
- clientSecret: msalCommon.Constants.EMPTY_STRING,
17
- clientAssertion: msalCommon.Constants.EMPTY_STRING,
18
- clientCertificate: {
19
- thumbprint: msalCommon.Constants.EMPTY_STRING,
20
- privateKey: msalCommon.Constants.EMPTY_STRING,
21
- x5c: msalCommon.Constants.EMPTY_STRING,
22
- },
23
- knownAuthorities: [],
24
- cloudDiscoveryMetadata: msalCommon.Constants.EMPTY_STRING,
25
- authorityMetadata: msalCommon.Constants.EMPTY_STRING,
26
- clientCapabilities: [],
27
- protocolMode: msalCommon.ProtocolMode.AAD,
28
- azureCloudOptions: {
29
- azureCloudInstance: msalCommon.AzureCloudInstance.None,
30
- tenant: msalCommon.Constants.EMPTY_STRING,
31
- },
32
- skipAuthorityMetadataCache: false,
33
- };
34
- const DEFAULT_CACHE_OPTIONS = {
35
- claimsBasedCachingEnabled: false,
36
- };
37
- const DEFAULT_LOGGER_OPTIONS = {
38
- loggerCallback: () => {
39
- // allow users to not set logger call back
40
- },
41
- piiLoggingEnabled: false,
42
- logLevel: msalCommon.LogLevel.Info,
43
- };
44
- const DEFAULT_SYSTEM_OPTIONS = {
45
- loggerOptions: DEFAULT_LOGGER_OPTIONS,
46
- networkClient: new HttpClient.HttpClient(),
47
- proxyUrl: msalCommon.Constants.EMPTY_STRING,
48
- customAgentOptions: {},
49
- };
50
- const DEFAULT_TELEMETRY_OPTIONS = {
51
- application: {
52
- appName: msalCommon.Constants.EMPTY_STRING,
53
- appVersion: msalCommon.Constants.EMPTY_STRING,
54
- },
55
- };
56
- /**
57
- * Sets the default options when not explicitly configured from app developer
58
- *
59
- * @param auth - Authentication options
60
- * @param cache - Cache options
61
- * @param system - System options
62
- * @param telemetry - Telemetry options
63
- *
64
- * @returns Configuration
65
- * @internal
66
- */
67
- function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) {
68
- const systemOptions = {
69
- ...DEFAULT_SYSTEM_OPTIONS,
70
- networkClient: new HttpClient.HttpClient(system?.proxyUrl, system?.customAgentOptions, false // Managed Identity
71
- ),
72
- loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
73
- };
74
- return {
75
- auth: { ...DEFAULT_AUTH_OPTIONS, ...auth },
76
- broker: { ...broker },
77
- cache: { ...DEFAULT_CACHE_OPTIONS, ...cache },
78
- system: { ...systemOptions, ...system },
79
- telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
80
- };
81
- }
82
- function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) {
83
- const managedIdentityId = new ManagedIdentityId.ManagedIdentityId(managedIdentityIdParams);
84
- const systemOptions = {
85
- ...DEFAULT_SYSTEM_OPTIONS,
86
- loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
87
- networkClient: new HttpClient.HttpClient(system?.proxyUrl, system?.customAgentOptions, true // Managed Identity
88
- ),
89
- };
90
- return {
91
- managedIdentityId: managedIdentityId,
92
- system: { ...systemOptions, ...system },
93
- };
12
+ /*
13
+ * Copyright (c) Microsoft Corporation. All rights reserved.
14
+ * Licensed under the MIT License.
15
+ */
16
+ const DEFAULT_AUTH_OPTIONS = {
17
+ clientId: msalCommon.Constants.EMPTY_STRING,
18
+ authority: msalCommon.Constants.DEFAULT_AUTHORITY,
19
+ clientSecret: msalCommon.Constants.EMPTY_STRING,
20
+ clientAssertion: msalCommon.Constants.EMPTY_STRING,
21
+ clientCertificate: {
22
+ thumbprint: msalCommon.Constants.EMPTY_STRING,
23
+ privateKey: msalCommon.Constants.EMPTY_STRING,
24
+ x5c: msalCommon.Constants.EMPTY_STRING,
25
+ },
26
+ knownAuthorities: [],
27
+ cloudDiscoveryMetadata: msalCommon.Constants.EMPTY_STRING,
28
+ authorityMetadata: msalCommon.Constants.EMPTY_STRING,
29
+ clientCapabilities: [],
30
+ protocolMode: msalCommon.ProtocolMode.AAD,
31
+ azureCloudOptions: {
32
+ azureCloudInstance: msalCommon.AzureCloudInstance.None,
33
+ tenant: msalCommon.Constants.EMPTY_STRING,
34
+ },
35
+ skipAuthorityMetadataCache: false,
36
+ };
37
+ const DEFAULT_CACHE_OPTIONS = {
38
+ claimsBasedCachingEnabled: false,
39
+ };
40
+ const DEFAULT_LOGGER_OPTIONS = {
41
+ loggerCallback: () => {
42
+ // allow users to not set logger call back
43
+ },
44
+ piiLoggingEnabled: false,
45
+ logLevel: msalCommon.LogLevel.Info,
46
+ };
47
+ const DEFAULT_SYSTEM_OPTIONS = {
48
+ loggerOptions: DEFAULT_LOGGER_OPTIONS,
49
+ networkClient: new HttpClient.HttpClient(),
50
+ proxyUrl: msalCommon.Constants.EMPTY_STRING,
51
+ customAgentOptions: {},
52
+ disableInternalRetries: false,
53
+ };
54
+ const DEFAULT_TELEMETRY_OPTIONS = {
55
+ application: {
56
+ appName: msalCommon.Constants.EMPTY_STRING,
57
+ appVersion: msalCommon.Constants.EMPTY_STRING,
58
+ },
59
+ };
60
+ /**
61
+ * Sets the default options when not explicitly configured from app developer
62
+ *
63
+ * @param auth - Authentication options
64
+ * @param cache - Cache options
65
+ * @param system - System options
66
+ * @param telemetry - Telemetry options
67
+ *
68
+ * @returns Configuration
69
+ * @internal
70
+ */
71
+ function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) {
72
+ const systemOptions = {
73
+ ...DEFAULT_SYSTEM_OPTIONS,
74
+ networkClient: new HttpClient.HttpClient(system?.proxyUrl, system?.customAgentOptions),
75
+ loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
76
+ disableInternalRetries: system?.disableInternalRetries || false,
77
+ };
78
+ return {
79
+ auth: { ...DEFAULT_AUTH_OPTIONS, ...auth },
80
+ broker: { ...broker },
81
+ cache: { ...DEFAULT_CACHE_OPTIONS, ...cache },
82
+ system: { ...systemOptions, ...system },
83
+ telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
84
+ };
85
+ }
86
+ function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) {
87
+ const managedIdentityId = new ManagedIdentityId.ManagedIdentityId(managedIdentityIdParams);
88
+ const loggerOptions = system?.loggerOptions || DEFAULT_LOGGER_OPTIONS;
89
+ let networkClient;
90
+ // use developer provided network client if passed in
91
+ if (system?.networkClient) {
92
+ networkClient = system.networkClient;
93
+ // otherwise, create a new one
94
+ }
95
+ else {
96
+ networkClient = new HttpClient.HttpClient(system?.proxyUrl, system?.customAgentOptions);
97
+ }
98
+ // wrap the network client with a retry policy if the developer has not disabled the option to do so
99
+ if (!system?.disableInternalRetries) {
100
+ const linearRetryPolicy = new LinearRetryPolicy.LinearRetryPolicy(Constants.MANAGED_IDENTITY_MAX_RETRIES, Constants.MANAGED_IDENTITY_RETRY_DELAY, Constants.MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON);
101
+ networkClient = new HttpClientWithRetries.HttpClientWithRetries(networkClient, linearRetryPolicy);
102
+ }
103
+ return {
104
+ managedIdentityId: managedIdentityId,
105
+ system: {
106
+ loggerOptions,
107
+ networkClient,
108
+ },
109
+ };
94
110
  }
95
111
 
96
112
  exports.buildAppConfiguration = buildAppConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.cjs","sources":["../../src/config/Configuration.ts"],"sourcesContent":[null],"names":["Constants","ProtocolMode","AzureCloudInstance","LogLevel","HttpClient","ManagedIdentityId"],"mappings":";;;;;;;;AAAA;;;AAGG;AAsHH,MAAM,oBAAoB,GAA8B;IACpD,QAAQ,EAAEA,oBAAS,CAAC,YAAY;IAChC,SAAS,EAAEA,oBAAS,CAAC,iBAAiB;IACtC,YAAY,EAAEA,oBAAS,CAAC,YAAY;IACpC,eAAe,EAAEA,oBAAS,CAAC,YAAY;AACvC,IAAA,iBAAiB,EAAE;QACf,UAAU,EAAEA,oBAAS,CAAC,YAAY;QAClC,UAAU,EAAEA,oBAAS,CAAC,YAAY;QAClC,GAAG,EAAEA,oBAAS,CAAC,YAAY;AAC9B,KAAA;AACD,IAAA,gBAAgB,EAAE,EAAE;IACpB,sBAAsB,EAAEA,oBAAS,CAAC,YAAY;IAC9C,iBAAiB,EAAEA,oBAAS,CAAC,YAAY;AACzC,IAAA,kBAAkB,EAAE,EAAE;IACtB,YAAY,EAAEC,uBAAY,CAAC,GAAG;AAC9B,IAAA,iBAAiB,EAAE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AG,KAAK,EAAE;AAC7C,QAAA,MAAM,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE;AACvC,QAAA,SAAS,EAAE,EAAE,GAAG,yBAAyB,EAAE,GAAG,SAAS,EAAE;KAC5D,CAAC;AACN,CAAC;SAOe,iCAAiC,CAAC,EAC9C,uBAAuB,EACvB,MAAM,GACqB,EAAA;AAC3B,IAAA,MAAM,iBAAiB,GAAsB,IAAIC,mCAAiB,CAC9D,uBAAuB,CAC1B,CAAC;AAEF,IAAA,MAAM,aAAa,GAAgC;AAC/C,QAAA,GAAG,sBAAsB;AACzB,QAAA,aAAa,EAAE,MAAM,EAAE,aAAa,IAAI,sBAAsB;AAC9D,QAAA,aAAa,EAAE,IAAID,qBAAU,CACzB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,kBAEgB,EACxB,IAAI;AACP,SAAA;KACJ,CAAC;IAEF,OAAO;AACH,QAAA,iBAAiB,EAAE,iBAAiB;AACpC,QAAA,MAAM,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE;KAC1C,CAAC;AACN;;;;;"}
1
+ {"version":3,"file":"Configuration.cjs","sources":["../../src/config/Configuration.ts"],"sourcesContent":[null],"names":["Constants","ProtocolMode","AzureCloudInstance","LogLevel","HttpClient","ManagedIdentityId","LinearRetryPolicy","MANAGED_IDENTITY_MAX_RETRIES","MANAGED_IDENTITY_RETRY_DELAY","MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON","HttpClientWithRetries"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAkIH,MAAM,oBAAoB,GAA8B;IACpD,QAAQ,EAAEA,oBAAS,CAAC,YAAY;IAChC,SAAS,EAAEA,oBAAS,CAAC,iBAAiB;IACtC,YAAY,EAAEA,oBAAS,CAAC,YAAY;IACpC,eAAe,EAAEA,oBAAS,CAAC,YAAY;AACvC,IAAA,iBAAiB,EAAE;QACf,UAAU,EAAEA,oBAAS,CAAC,YAAY;QACl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AACL,KAAA;IAED,OAAO;AACH,QAAA,iBAAiB,EAAE,iBAAiB;AACpC,QAAA,MAAM,EAAE;YACJ,aAAa;YACb,aAAa;AAChB,SAAA;KACJ,CAAC;AACN;;;;;"}
@@ -1,123 +1,127 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin } from "@azure/msal-common";
4
- import http from "http";
5
- import https from "https";
6
- import { ManagedIdentityId } from "./ManagedIdentityId.js";
7
- /**
8
- * - clientId - Client id of the application.
9
- * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
10
- * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in.
11
- * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal.
12
- * - clientAssertion - Assertion string that the application uses when requesting a token. Only used in confidential client applications. Assertion should be of type urn:ietf:params:oauth:client-assertion-type:jwt-bearer.
13
- * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 thumbprint of the certificiate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
14
- * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
15
- * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
16
- * @public
17
- */
18
- export type NodeAuthOptions = {
19
- clientId: string;
20
- authority?: string;
21
- clientSecret?: string;
22
- clientAssertion?: string;
23
- clientCertificate?: {
24
- thumbprint: string;
25
- privateKey: string;
26
- x5c?: string;
27
- };
28
- knownAuthorities?: Array<string>;
29
- cloudDiscoveryMetadata?: string;
30
- authorityMetadata?: string;
31
- clientCapabilities?: Array<string>;
32
- protocolMode?: ProtocolMode;
33
- azureCloudOptions?: AzureCloudOptions;
34
- skipAuthorityMetadataCache?: boolean;
35
- };
36
- /**
37
- * Use this to configure the below cache configuration options:
38
- *
39
- * - cachePlugin - Plugin for reading and writing token cache to disk.
40
- * @public
41
- */
42
- export type CacheOptions = {
43
- cachePlugin?: ICachePlugin;
44
- claimsBasedCachingEnabled?: boolean;
45
- };
46
- /**
47
- * Use this to configure the below broker options:
48
- * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions)
49
- *
50
- * Note: These options are only available for PublicClientApplications using the Authorization Code Flow
51
- * @public
52
- */
53
- export type BrokerOptions = {
54
- nativeBrokerPlugin?: INativeBrokerPlugin;
55
- };
56
- /**
57
- * Type for configuring logger and http client options
58
- *
59
- * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger
60
- * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client.
61
- * @public
62
- */
63
- export type NodeSystemOptions = {
64
- loggerOptions?: LoggerOptions;
65
- networkClient?: INetworkModule;
66
- proxyUrl?: string;
67
- customAgentOptions?: http.AgentOptions | https.AgentOptions;
68
- };
69
- export type NodeTelemetryOptions = {
70
- application?: ApplicationTelemetry;
71
- };
72
- /**
73
- * Use the configuration object to configure MSAL and initialize the client application object
74
- *
75
- * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
76
- * - broker: this is where you configure broker options
77
- * - cache: this is where you configure cache location
78
- * - system: this is where you can configure the network client, logger
79
- * - telemetry: this is where you can configure telemetry options
80
- * @public
81
- */
82
- export type Configuration = {
83
- auth: NodeAuthOptions;
84
- broker?: BrokerOptions;
85
- cache?: CacheOptions;
86
- system?: NodeSystemOptions;
87
- telemetry?: NodeTelemetryOptions;
88
- };
89
- export type ManagedIdentityIdParams = {
90
- userAssignedClientId?: string;
91
- userAssignedResourceId?: string;
92
- userAssignedObjectId?: string;
93
- };
94
- export type ManagedIdentityConfiguration = {
95
- managedIdentityIdParams?: ManagedIdentityIdParams;
96
- system?: NodeSystemOptions;
97
- };
98
- /** @internal */
99
- export type NodeConfiguration = {
100
- auth: Required<NodeAuthOptions>;
101
- broker: BrokerOptions;
102
- cache: CacheOptions;
103
- system: Required<NodeSystemOptions>;
104
- telemetry: Required<NodeTelemetryOptions>;
105
- };
106
- /**
107
- * Sets the default options when not explicitly configured from app developer
108
- *
109
- * @param auth - Authentication options
110
- * @param cache - Cache options
111
- * @param system - System options
112
- * @param telemetry - Telemetry options
113
- *
114
- * @returns Configuration
115
- * @internal
116
- */
117
- export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration;
118
- export type ManagedIdentityNodeConfiguration = {
119
- managedIdentityId: ManagedIdentityId;
120
- system: Required<NodeSystemOptions>;
121
- };
122
- export declare function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration;
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin, ClientAssertionCallback } from "@azure/msal-common";
4
+ import http from "http";
5
+ import https from "https";
6
+ import { ManagedIdentityId } from "./ManagedIdentityId.js";
7
+ /**
8
+ * - clientId - Client id of the application.
9
+ * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
10
+ * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in.
11
+ * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal.
12
+ * - clientAssertion - A ClientAssertion object containing an assertion string or a callback function that returns an assertion string that the application uses when requesting a token, as well as the assertion's type (urn:ietf:params:oauth:client-assertion-type:jwt-bearer). Only used in confidential client applications.
13
+ * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 thumbprint of the certificiate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
14
+ * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
15
+ * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
16
+ * @public
17
+ */
18
+ export type NodeAuthOptions = {
19
+ clientId: string;
20
+ authority?: string;
21
+ clientSecret?: string;
22
+ clientAssertion?: string | ClientAssertionCallback;
23
+ clientCertificate?: {
24
+ thumbprint: string;
25
+ privateKey: string;
26
+ x5c?: string;
27
+ };
28
+ knownAuthorities?: Array<string>;
29
+ cloudDiscoveryMetadata?: string;
30
+ authorityMetadata?: string;
31
+ clientCapabilities?: Array<string>;
32
+ protocolMode?: ProtocolMode;
33
+ azureCloudOptions?: AzureCloudOptions;
34
+ skipAuthorityMetadataCache?: boolean;
35
+ };
36
+ /**
37
+ * Use this to configure the below cache configuration options:
38
+ *
39
+ * - cachePlugin - Plugin for reading and writing token cache to disk.
40
+ * @public
41
+ */
42
+ export type CacheOptions = {
43
+ cachePlugin?: ICachePlugin;
44
+ /**
45
+ * @deprecated claims-based-caching functionality will be removed in the next version of MSALJS
46
+ */
47
+ claimsBasedCachingEnabled?: boolean;
48
+ };
49
+ /**
50
+ * Use this to configure the below broker options:
51
+ * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions)
52
+ *
53
+ * Note: These options are only available for PublicClientApplications using the Authorization Code Flow
54
+ * @public
55
+ */
56
+ export type BrokerOptions = {
57
+ nativeBrokerPlugin?: INativeBrokerPlugin;
58
+ };
59
+ /**
60
+ * Type for configuring logger and http client options
61
+ *
62
+ * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger
63
+ * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client.
64
+ * @public
65
+ */
66
+ export type NodeSystemOptions = {
67
+ loggerOptions?: LoggerOptions;
68
+ networkClient?: INetworkModule;
69
+ proxyUrl?: string;
70
+ customAgentOptions?: http.AgentOptions | https.AgentOptions;
71
+ disableInternalRetries?: boolean;
72
+ };
73
+ export type NodeTelemetryOptions = {
74
+ application?: ApplicationTelemetry;
75
+ };
76
+ /**
77
+ * Use the configuration object to configure MSAL and initialize the client application object
78
+ *
79
+ * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
80
+ * - broker: this is where you configure broker options
81
+ * - cache: this is where you configure cache location
82
+ * - system: this is where you can configure the network client, logger
83
+ * - telemetry: this is where you can configure telemetry options
84
+ * @public
85
+ */
86
+ export type Configuration = {
87
+ auth: NodeAuthOptions;
88
+ broker?: BrokerOptions;
89
+ cache?: CacheOptions;
90
+ system?: NodeSystemOptions;
91
+ telemetry?: NodeTelemetryOptions;
92
+ };
93
+ export type ManagedIdentityIdParams = {
94
+ userAssignedClientId?: string;
95
+ userAssignedResourceId?: string;
96
+ userAssignedObjectId?: string;
97
+ };
98
+ export type ManagedIdentityConfiguration = {
99
+ managedIdentityIdParams?: ManagedIdentityIdParams;
100
+ system?: NodeSystemOptions;
101
+ };
102
+ /** @internal */
103
+ export type NodeConfiguration = {
104
+ auth: Required<NodeAuthOptions>;
105
+ broker: BrokerOptions;
106
+ cache: CacheOptions;
107
+ system: Required<NodeSystemOptions>;
108
+ telemetry: Required<NodeTelemetryOptions>;
109
+ };
110
+ /**
111
+ * Sets the default options when not explicitly configured from app developer
112
+ *
113
+ * @param auth - Authentication options
114
+ * @param cache - Cache options
115
+ * @param system - System options
116
+ * @param telemetry - Telemetry options
117
+ *
118
+ * @returns Configuration
119
+ * @internal
120
+ */
121
+ export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration;
122
+ export type ManagedIdentityNodeConfiguration = {
123
+ managedIdentityId: ManagedIdentityId;
124
+ system: Required<Pick<NodeSystemOptions, "loggerOptions" | "networkClient">>;
125
+ };
126
+ export declare function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration;
123
127
  //# sourceMappingURL=Configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.d.ts","sourceRoot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