@azure/msal-node 2.13.0 → 2.14.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 (418) hide show
  1. package/dist/cache/ITokenCache.d.ts +1 -1
  2. package/dist/cache/ITokenCache.d.ts.map +1 -1
  3. package/dist/cache/NodeStorage.d.ts +1 -1
  4. package/dist/cache/NodeStorage.d.ts.map +1 -1
  5. package/dist/cache/NodeStorage.mjs +2 -2
  6. package/dist/cache/TokenCache.d.ts +1 -1
  7. package/dist/cache/TokenCache.d.ts.map +1 -1
  8. package/dist/cache/TokenCache.mjs +2 -2
  9. package/dist/cache/distributed/DistributedCachePlugin.d.ts +1 -1
  10. package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  11. package/dist/cache/distributed/DistributedCachePlugin.mjs +2 -2
  12. package/dist/cache/distributed/IPartitionManager.d.ts +1 -1
  13. package/dist/cache/distributed/IPartitionManager.d.ts.map +1 -1
  14. package/dist/cache/serializer/Deserializer.d.ts +1 -1
  15. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  16. package/dist/cache/serializer/Deserializer.mjs +2 -2
  17. package/dist/cache/serializer/Serializer.d.ts +1 -1
  18. package/dist/cache/serializer/Serializer.d.ts.map +1 -1
  19. package/dist/cache/serializer/Serializer.mjs +1 -1
  20. package/dist/cache/serializer/SerializerTypes.d.ts +1 -1
  21. package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -1
  22. package/dist/client/ClientApplication.d.ts +1 -1
  23. package/dist/client/ClientApplication.d.ts.map +1 -1
  24. package/dist/client/ClientApplication.mjs +2 -2
  25. package/dist/client/ClientAssertion.mjs +2 -2
  26. package/dist/client/ClientCredentialClient.d.ts +2 -2
  27. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  28. package/dist/client/ClientCredentialClient.mjs +2 -2
  29. package/dist/client/ConfidentialClientApplication.d.ts +1 -1
  30. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  31. package/dist/client/ConfidentialClientApplication.mjs +3 -2
  32. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  33. package/dist/client/DeviceCodeClient.d.ts +1 -1
  34. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  35. package/dist/client/DeviceCodeClient.mjs +2 -2
  36. package/dist/client/IConfidentialClientApplication.d.ts +1 -1
  37. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  38. package/dist/client/IPublicClientApplication.d.ts +1 -1
  39. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  40. package/dist/client/ManagedIdentityApplication.d.ts +4 -4
  41. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  42. package/dist/client/ManagedIdentityApplication.mjs +2 -2
  43. package/dist/client/ManagedIdentityClient.d.ts +6 -6
  44. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  45. package/dist/client/ManagedIdentityClient.mjs +1 -1
  46. package/dist/client/ManagedIdentitySources/AppService.d.ts +6 -6
  47. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  48. package/dist/client/ManagedIdentitySources/AppService.mjs +2 -2
  49. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +7 -7
  50. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  51. package/dist/client/ManagedIdentitySources/AzureArc.mjs +2 -2
  52. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +8 -8
  53. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  54. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +2 -2
  55. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +6 -6
  56. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  57. package/dist/client/ManagedIdentitySources/CloudShell.mjs +2 -2
  58. package/dist/client/ManagedIdentitySources/Imds.d.ts +6 -6
  59. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  60. package/dist/client/ManagedIdentitySources/Imds.mjs +2 -2
  61. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +6 -6
  62. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  63. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +2 -2
  64. package/dist/client/OnBehalfOfClient.d.ts +1 -1
  65. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  66. package/dist/client/OnBehalfOfClient.mjs +2 -2
  67. package/dist/client/PublicClientApplication.d.ts +1 -1
  68. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  69. package/dist/client/PublicClientApplication.mjs +2 -2
  70. package/dist/client/UsernamePasswordClient.d.ts +1 -1
  71. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  72. package/dist/client/UsernamePasswordClient.mjs +2 -2
  73. package/dist/config/Configuration.d.ts +3 -3
  74. package/dist/config/Configuration.d.ts.map +1 -1
  75. package/dist/config/Configuration.mjs +2 -2
  76. package/dist/config/ManagedIdentityId.d.ts +2 -2
  77. package/dist/config/ManagedIdentityId.d.ts.map +1 -1
  78. package/dist/config/ManagedIdentityId.mjs +1 -1
  79. package/dist/config/ManagedIdentityRequestParameters.d.ts +1 -1
  80. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  81. package/dist/config/ManagedIdentityRequestParameters.mjs +2 -2
  82. package/dist/crypto/CryptoProvider.d.ts +1 -1
  83. package/dist/crypto/CryptoProvider.d.ts.map +1 -1
  84. package/dist/crypto/CryptoProvider.mjs +1 -1
  85. package/dist/crypto/GuidGenerator.d.ts +1 -1
  86. package/dist/crypto/GuidGenerator.d.ts.map +1 -1
  87. package/dist/crypto/GuidGenerator.mjs +1 -1
  88. package/dist/crypto/HashUtils.d.ts +1 -1
  89. package/dist/crypto/HashUtils.mjs +1 -1
  90. package/dist/crypto/PkceGenerator.d.ts +1 -1
  91. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  92. package/dist/crypto/PkceGenerator.mjs +2 -2
  93. package/dist/error/ManagedIdentityError.d.ts +2 -2
  94. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  95. package/dist/error/ManagedIdentityError.mjs +2 -2
  96. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  97. package/dist/error/NodeAuthError.d.ts +1 -1
  98. package/dist/error/NodeAuthError.d.ts.map +1 -1
  99. package/dist/error/NodeAuthError.mjs +2 -2
  100. package/dist/index.d.ts +1 -1
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.mjs +2 -2
  103. package/dist/internals.mjs +5 -1
  104. package/dist/internals.mjs.map +1 -1
  105. package/dist/network/HttpClient.d.ts +3 -3
  106. package/dist/network/HttpClient.d.ts.map +1 -1
  107. package/dist/network/HttpClient.mjs +2 -2
  108. package/dist/network/HttpClientWithRetries.d.ts +2 -2
  109. package/dist/network/HttpClientWithRetries.d.ts.map +1 -1
  110. package/dist/network/HttpClientWithRetries.mjs +2 -2
  111. package/dist/network/ILoopbackClient.d.ts +1 -1
  112. package/dist/network/ILoopbackClient.d.ts.map +1 -1
  113. package/dist/network/LoopbackClient.d.ts +1 -1
  114. package/dist/network/LoopbackClient.d.ts.map +1 -1
  115. package/dist/network/LoopbackClient.mjs +3 -3
  116. package/dist/network/LoopbackClient.mjs.map +1 -1
  117. package/dist/packageMetadata.d.ts +1 -1
  118. package/dist/packageMetadata.mjs +2 -2
  119. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  120. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  121. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  122. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  123. package/dist/request/ClientCredentialRequest.d.ts +1 -1
  124. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  125. package/dist/request/DeviceCodeRequest.d.ts +1 -1
  126. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  127. package/dist/request/InteractiveRequest.d.ts +1 -1
  128. package/dist/request/ManagedIdentityRequest.d.ts +2 -2
  129. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -1
  130. package/dist/request/OnBehalfOfRequest.d.ts +1 -1
  131. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  132. package/dist/request/RefreshTokenRequest.d.ts +1 -1
  133. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  134. package/dist/request/SignOutRequest.d.ts +1 -1
  135. package/dist/request/SignOutRequest.d.ts.map +1 -1
  136. package/dist/request/SilentFlowRequest.d.ts +1 -1
  137. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  138. package/dist/request/UsernamePasswordRequest.d.ts +1 -1
  139. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  140. package/dist/response/ManagedIdentityTokenResponse.d.ts +1 -1
  141. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  142. package/dist/retry/IHttpRetryPolicy.d.ts +1 -1
  143. package/dist/retry/LinearRetryPolicy.d.ts +2 -2
  144. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -1
  145. package/dist/retry/LinearRetryPolicy.mjs +1 -1
  146. package/dist/utils/Constants.mjs +2 -2
  147. package/dist/utils/EncodingUtils.d.ts +1 -1
  148. package/dist/utils/EncodingUtils.mjs +2 -2
  149. package/dist/utils/NetworkUtils.d.ts +1 -1
  150. package/dist/utils/NetworkUtils.d.ts.map +1 -1
  151. package/dist/utils/NetworkUtils.mjs +1 -1
  152. package/dist/utils/NetworkUtils.mjs.map +1 -1
  153. package/lib/msal-node.cjs +12362 -0
  154. package/lib/msal-node.cjs.map +1 -0
  155. package/lib/package.json +1 -0
  156. package/lib/types/cache/ITokenCache.d.ts +16 -0
  157. package/lib/types/cache/ITokenCache.d.ts.map +1 -0
  158. package/lib/types/cache/NodeStorage.d.ts +194 -0
  159. package/lib/types/cache/NodeStorage.d.ts.map +1 -0
  160. package/lib/types/cache/TokenCache.d.ts +91 -0
  161. package/lib/types/cache/TokenCache.d.ts.map +1 -0
  162. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts +11 -0
  163. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +1 -0
  164. package/lib/types/cache/distributed/ICacheClient.d.ts +18 -0
  165. package/lib/types/cache/distributed/ICacheClient.d.ts.map +1 -0
  166. package/lib/types/cache/distributed/IPartitionManager.d.ts +29 -0
  167. package/lib/types/cache/distributed/IPartitionManager.d.ts.map +1 -0
  168. package/lib/types/cache/serializer/Deserializer.d.ts +43 -0
  169. package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -0
  170. package/lib/types/cache/serializer/Serializer.d.ts +40 -0
  171. package/lib/types/cache/serializer/Serializer.d.ts.map +1 -0
  172. package/lib/types/cache/serializer/SerializerTypes.d.ts +103 -0
  173. package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -0
  174. package/lib/types/client/ClientApplication.d.ts +144 -0
  175. package/lib/types/client/ClientApplication.d.ts.map +1 -0
  176. package/lib/types/client/ClientAssertion.d.ts +56 -0
  177. package/lib/types/client/ClientAssertion.d.ts.map +1 -0
  178. package/lib/types/client/ClientCredentialClient.d.ts +34 -0
  179. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -0
  180. package/lib/types/client/ConfidentialClientApplication.d.ts +59 -0
  181. package/lib/types/client/ConfidentialClientApplication.d.ts.map +1 -0
  182. package/lib/types/client/DeviceCodeClient.d.ts +54 -0
  183. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -0
  184. package/lib/types/client/IConfidentialClientApplication.d.ts +40 -0
  185. package/lib/types/client/IConfidentialClientApplication.d.ts.map +1 -0
  186. package/lib/types/client/IPublicClientApplication.d.ts +43 -0
  187. package/lib/types/client/IPublicClientApplication.d.ts.map +1 -0
  188. package/lib/types/client/ManagedIdentityApplication.d.ts +31 -0
  189. package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -0
  190. package/lib/types/client/ManagedIdentityClient.d.ts +28 -0
  191. package/lib/types/client/ManagedIdentityClient.d.ts.map +1 -0
  192. package/lib/types/client/ManagedIdentitySources/AppService.d.ts +18 -0
  193. package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -0
  194. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +28 -0
  195. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -0
  196. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +31 -0
  197. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -0
  198. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +17 -0
  199. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -0
  200. package/lib/types/client/ManagedIdentitySources/Imds.d.ts +13 -0
  201. package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -0
  202. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +18 -0
  203. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -0
  204. package/lib/types/client/OnBehalfOfClient.d.ts +48 -0
  205. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -0
  206. package/lib/types/client/PublicClientApplication.d.ts +73 -0
  207. package/lib/types/client/PublicClientApplication.d.ts.map +1 -0
  208. package/lib/types/client/UsernamePasswordClient.d.ts +26 -0
  209. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -0
  210. package/lib/types/config/Configuration.d.ts +132 -0
  211. package/lib/types/config/Configuration.d.ts.map +1 -0
  212. package/lib/types/config/ManagedIdentityId.d.ts +12 -0
  213. package/lib/types/config/ManagedIdentityId.d.ts.map +1 -0
  214. package/lib/types/config/ManagedIdentityRequestParameters.d.ts +12 -0
  215. package/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +1 -0
  216. package/lib/types/crypto/CryptoProvider.d.ts +63 -0
  217. package/lib/types/crypto/CryptoProvider.d.ts.map +1 -0
  218. package/lib/types/crypto/GuidGenerator.d.ts +15 -0
  219. package/lib/types/crypto/GuidGenerator.d.ts.map +1 -0
  220. package/lib/types/crypto/HashUtils.d.ts +9 -0
  221. package/lib/types/crypto/HashUtils.d.ts.map +1 -0
  222. package/lib/types/crypto/PkceGenerator.d.ts +23 -0
  223. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
  224. package/lib/types/error/ManagedIdentityError.d.ts +31 -0
  225. package/lib/types/error/ManagedIdentityError.d.ts.map +1 -0
  226. package/lib/types/error/ManagedIdentityErrorCodes.d.ts +23 -0
  227. package/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +1 -0
  228. package/lib/types/error/NodeAuthError.d.ts +74 -0
  229. package/lib/types/error/NodeAuthError.d.ts.map +1 -0
  230. package/lib/types/index.d.ts +46 -0
  231. package/lib/types/index.d.ts.map +1 -0
  232. package/lib/types/internals.d.ts +7 -0
  233. package/lib/types/internals.d.ts.map +1 -0
  234. package/lib/types/network/HttpClient.d.ts +26 -0
  235. package/lib/types/network/HttpClient.d.ts.map +1 -0
  236. package/lib/types/network/HttpClientWithRetries.d.ts +12 -0
  237. package/lib/types/network/HttpClientWithRetries.d.ts.map +1 -0
  238. package/lib/types/network/ILoopbackClient.d.ts +11 -0
  239. package/lib/types/network/ILoopbackClient.d.ts.map +1 -0
  240. package/lib/types/network/LoopbackClient.d.ts +22 -0
  241. package/lib/types/network/LoopbackClient.d.ts.map +1 -0
  242. package/lib/types/packageMetadata.d.ts +3 -0
  243. package/lib/types/packageMetadata.d.ts.map +1 -0
  244. package/lib/types/request/AuthorizationCodeRequest.d.ts +22 -0
  245. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
  246. package/lib/types/request/AuthorizationUrlRequest.d.ts +34 -0
  247. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
  248. package/lib/types/request/ClientCredentialRequest.d.ts +15 -0
  249. package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -0
  250. package/lib/types/request/DeviceCodeRequest.d.ts +16 -0
  251. package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -0
  252. package/lib/types/request/InteractiveRequest.d.ts +23 -0
  253. package/lib/types/request/InteractiveRequest.d.ts.map +1 -0
  254. package/lib/types/request/ManagedIdentityRequest.d.ts +9 -0
  255. package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -0
  256. package/lib/types/request/ManagedIdentityRequestParams.d.ts +10 -0
  257. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -0
  258. package/lib/types/request/OnBehalfOfRequest.d.ts +15 -0
  259. package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -0
  260. package/lib/types/request/RefreshTokenRequest.d.ts +18 -0
  261. package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -0
  262. package/lib/types/request/SignOutRequest.d.ts +6 -0
  263. package/lib/types/request/SignOutRequest.d.ts.map +1 -0
  264. package/lib/types/request/SilentFlowRequest.d.ts +17 -0
  265. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -0
  266. package/lib/types/request/UsernamePasswordRequest.d.ts +20 -0
  267. package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -0
  268. package/lib/types/response/ManagedIdentityTokenResponse.d.ts +35 -0
  269. package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -0
  270. package/lib/types/retry/IHttpRetryPolicy.d.ts +6 -0
  271. package/lib/types/retry/IHttpRetryPolicy.d.ts.map +1 -0
  272. package/lib/types/retry/LinearRetryPolicy.d.ts +12 -0
  273. package/lib/types/retry/LinearRetryPolicy.d.ts.map +1 -0
  274. package/lib/types/utils/Constants.d.ts +142 -0
  275. package/lib/types/utils/Constants.d.ts.map +1 -0
  276. package/lib/types/utils/EncodingUtils.d.ts +27 -0
  277. package/lib/types/utils/EncodingUtils.d.ts.map +1 -0
  278. package/lib/types/utils/NetworkUtils.d.ts +6 -0
  279. package/lib/types/utils/NetworkUtils.d.ts.map +1 -0
  280. package/package.json +13 -10
  281. package/src/cache/ITokenCache.ts +1 -1
  282. package/src/cache/NodeStorage.ts +1 -1
  283. package/src/cache/TokenCache.ts +1 -1
  284. package/src/cache/distributed/DistributedCachePlugin.ts +1 -1
  285. package/src/cache/distributed/IPartitionManager.ts +1 -1
  286. package/src/cache/serializer/Deserializer.ts +1 -1
  287. package/src/cache/serializer/Serializer.ts +1 -1
  288. package/src/cache/serializer/SerializerTypes.ts +1 -1
  289. package/src/client/ClientApplication.ts +1 -1
  290. package/src/client/ClientAssertion.ts +1 -1
  291. package/src/client/ClientCredentialClient.ts +2 -2
  292. package/src/client/ConfidentialClientApplication.ts +1 -1
  293. package/src/client/DeviceCodeClient.ts +1 -1
  294. package/src/client/IConfidentialClientApplication.ts +1 -1
  295. package/src/client/IPublicClientApplication.ts +5 -1
  296. package/src/client/ManagedIdentityApplication.ts +9 -9
  297. package/src/client/ManagedIdentityClient.ts +13 -13
  298. package/src/client/ManagedIdentitySources/AppService.ts +7 -7
  299. package/src/client/ManagedIdentitySources/AzureArc.ts +9 -9
  300. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +9 -9
  301. package/src/client/ManagedIdentitySources/CloudShell.ts +8 -8
  302. package/src/client/ManagedIdentitySources/Imds.ts +7 -7
  303. package/src/client/ManagedIdentitySources/ServiceFabric.ts +7 -7
  304. package/src/client/OnBehalfOfClient.ts +2 -2
  305. package/src/client/PublicClientApplication.ts +2 -2
  306. package/src/client/UsernamePasswordClient.ts +1 -1
  307. package/src/config/Configuration.ts +1 -1
  308. package/src/config/ManagedIdentityId.ts +3 -3
  309. package/src/config/ManagedIdentityRequestParameters.ts +2 -2
  310. package/src/crypto/CryptoProvider.ts +1 -1
  311. package/src/crypto/GuidGenerator.ts +1 -1
  312. package/src/crypto/PkceGenerator.ts +1 -1
  313. package/src/error/ManagedIdentityError.ts +3 -3
  314. package/src/error/ManagedIdentityErrorCodes.ts +1 -1
  315. package/src/error/NodeAuthError.ts +1 -1
  316. package/src/index.ts +1 -1
  317. package/src/network/HttpClient.ts +1 -1
  318. package/src/network/HttpClientWithRetries.ts +3 -3
  319. package/src/network/ILoopbackClient.ts +1 -1
  320. package/src/network/LoopbackClient.ts +2 -2
  321. package/src/packageMetadata.ts +1 -1
  322. package/src/request/AuthorizationCodeRequest.ts +1 -1
  323. package/src/request/AuthorizationUrlRequest.ts +1 -1
  324. package/src/request/ClientCredentialRequest.ts +1 -1
  325. package/src/request/DeviceCodeRequest.ts +1 -1
  326. package/src/request/ManagedIdentityRequest.ts +2 -2
  327. package/src/request/OnBehalfOfRequest.ts +1 -1
  328. package/src/request/RefreshTokenRequest.ts +1 -1
  329. package/src/request/SignOutRequest.ts +1 -1
  330. package/src/request/SilentFlowRequest.ts +1 -1
  331. package/src/request/UsernamePasswordRequest.ts +1 -1
  332. package/src/response/ManagedIdentityTokenResponse.ts +1 -1
  333. package/src/retry/LinearRetryPolicy.ts +1 -1
  334. package/src/utils/Constants.ts +1 -1
  335. package/src/utils/EncodingUtils.ts +1 -1
  336. package/src/utils/NetworkUtils.ts +4 -1
  337. package/dist/cache/NodeStorage.cjs +0 -436
  338. package/dist/cache/NodeStorage.cjs.map +0 -1
  339. package/dist/cache/TokenCache.cjs +0 -278
  340. package/dist/cache/TokenCache.cjs.map +0 -1
  341. package/dist/cache/distributed/DistributedCachePlugin.cjs +0 -37
  342. package/dist/cache/distributed/DistributedCachePlugin.cjs.map +0 -1
  343. package/dist/cache/serializer/Deserializer.cjs +0 -178
  344. package/dist/cache/serializer/Deserializer.cjs.map +0 -1
  345. package/dist/cache/serializer/Serializer.cjs +0 -146
  346. package/dist/cache/serializer/Serializer.cjs.map +0 -1
  347. package/dist/client/ClientApplication.cjs +0 -354
  348. package/dist/client/ClientApplication.cjs.map +0 -1
  349. package/dist/client/ClientAssertion.cjs +0 -161
  350. package/dist/client/ClientAssertion.cjs.map +0 -1
  351. package/dist/client/ClientCredentialClient.cjs +0 -205
  352. package/dist/client/ClientCredentialClient.cjs.map +0 -1
  353. package/dist/client/ConfidentialClientApplication.cjs +0 -184
  354. package/dist/client/ConfidentialClientApplication.cjs.map +0 -1
  355. package/dist/client/DeviceCodeClient.cjs +0 -218
  356. package/dist/client/DeviceCodeClient.cjs.map +0 -1
  357. package/dist/client/ManagedIdentityApplication.cjs +0 -102
  358. package/dist/client/ManagedIdentityApplication.cjs.map +0 -1
  359. package/dist/client/ManagedIdentityClient.cjs +0 -78
  360. package/dist/client/ManagedIdentityClient.cjs.map +0 -1
  361. package/dist/client/ManagedIdentitySources/AppService.cjs +0 -58
  362. package/dist/client/ManagedIdentitySources/AppService.cjs.map +0 -1
  363. package/dist/client/ManagedIdentitySources/AzureArc.cjs +0 -179
  364. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +0 -1
  365. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +0 -137
  366. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +0 -1
  367. package/dist/client/ManagedIdentitySources/CloudShell.cjs +0 -53
  368. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +0 -1
  369. package/dist/client/ManagedIdentitySources/Imds.cjs +0 -56
  370. package/dist/client/ManagedIdentitySources/Imds.cjs.map +0 -1
  371. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +0 -67
  372. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +0 -1
  373. package/dist/client/OnBehalfOfClient.cjs +0 -214
  374. package/dist/client/OnBehalfOfClient.cjs.map +0 -1
  375. package/dist/client/PublicClientApplication.cjs +0 -254
  376. package/dist/client/PublicClientApplication.cjs.map +0 -1
  377. package/dist/client/UsernamePasswordClient.cjs +0 -106
  378. package/dist/client/UsernamePasswordClient.cjs.map +0 -1
  379. package/dist/config/Configuration.cjs +0 -124
  380. package/dist/config/Configuration.cjs.map +0 -1
  381. package/dist/config/ManagedIdentityId.cjs +0 -61
  382. package/dist/config/ManagedIdentityId.cjs.map +0 -1
  383. package/dist/config/ManagedIdentityRequestParameters.cjs +0 -39
  384. package/dist/config/ManagedIdentityRequestParameters.cjs.map +0 -1
  385. package/dist/crypto/CryptoProvider.cjs +0 -103
  386. package/dist/crypto/CryptoProvider.cjs.map +0 -1
  387. package/dist/crypto/GuidGenerator.cjs +0 -33
  388. package/dist/crypto/GuidGenerator.cjs.map +0 -1
  389. package/dist/crypto/HashUtils.cjs +0 -29
  390. package/dist/crypto/HashUtils.cjs.map +0 -1
  391. package/dist/crypto/PkceGenerator.cjs +0 -68
  392. package/dist/crypto/PkceGenerator.cjs.map +0 -1
  393. package/dist/error/ManagedIdentityError.cjs +0 -56
  394. package/dist/error/ManagedIdentityError.cjs.map +0 -1
  395. package/dist/error/ManagedIdentityErrorCodes.cjs +0 -49
  396. package/dist/error/ManagedIdentityErrorCodes.cjs.map +0 -1
  397. package/dist/error/NodeAuthError.cjs +0 -107
  398. package/dist/error/NodeAuthError.cjs.map +0 -1
  399. package/dist/index.cjs +0 -125
  400. package/dist/index.cjs.map +0 -1
  401. package/dist/internals.cjs +0 -17
  402. package/dist/internals.cjs.map +0 -1
  403. package/dist/network/HttpClient.cjs +0 -301
  404. package/dist/network/HttpClient.cjs.map +0 -1
  405. package/dist/network/HttpClientWithRetries.cjs +0 -46
  406. package/dist/network/HttpClientWithRetries.cjs.map +0 -1
  407. package/dist/network/LoopbackClient.cjs +0 -99
  408. package/dist/network/LoopbackClient.cjs.map +0 -1
  409. package/dist/packageMetadata.cjs +0 -13
  410. package/dist/packageMetadata.cjs.map +0 -1
  411. package/dist/retry/LinearRetryPolicy.cjs +0 -49
  412. package/dist/retry/LinearRetryPolicy.cjs.map +0 -1
  413. package/dist/utils/Constants.cjs +0 -172
  414. package/dist/utils/Constants.cjs.map +0 -1
  415. package/dist/utils/EncodingUtils.cjs +0 -55
  416. package/dist/utils/EncodingUtils.cjs.map +0 -1
  417. package/dist/utils/NetworkUtils.cjs +0 -47
  418. package/dist/utils/NetworkUtils.cjs.map +0 -1
@@ -1,354 +0,0 @@
1
- /*! @azure/msal-node v2.13.0 2024-08-13 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var msalCommon = require('@azure/msal-common');
8
- var Configuration = require('../config/Configuration.cjs');
9
- var CryptoProvider = require('../crypto/CryptoProvider.cjs');
10
- var NodeStorage = require('../cache/NodeStorage.cjs');
11
- var Constants = require('../utils/Constants.cjs');
12
- var TokenCache = require('../cache/TokenCache.cjs');
13
- var ClientAssertion = require('./ClientAssertion.cjs');
14
- var packageMetadata = require('../packageMetadata.cjs');
15
- var NodeAuthError = require('../error/NodeAuthError.cjs');
16
- var UsernamePasswordClient = require('./UsernamePasswordClient.cjs');
17
-
18
- /*
19
- * Copyright (c) Microsoft Corporation. All rights reserved.
20
- * Licensed under the MIT License.
21
- */
22
- /**
23
- * Base abstract class for all ClientApplications - public and confidential
24
- * @public
25
- */
26
- class ClientApplication {
27
- /**
28
- * Constructor for the ClientApplication
29
- */
30
- constructor(configuration) {
31
- this.config = Configuration.buildAppConfiguration(configuration);
32
- this.cryptoProvider = new CryptoProvider.CryptoProvider();
33
- this.logger = new msalCommon.Logger(this.config.system.loggerOptions, packageMetadata.name, packageMetadata.version);
34
- this.storage = new NodeStorage.NodeStorage(this.logger, this.config.auth.clientId, this.cryptoProvider, msalCommon.buildStaticAuthorityOptions(this.config.auth));
35
- this.tokenCache = new TokenCache.TokenCache(this.storage, this.logger, this.config.cache.cachePlugin);
36
- }
37
- /**
38
- * Creates the URL of the authorization request, letting the user input credentials and consent to the
39
- * application. The URL targets the /authorize endpoint of the authority configured in the
40
- * application object.
41
- *
42
- * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI
43
- * sent in the request and should contain an authorization code, which can then be used to acquire tokens via
44
- * `acquireTokenByCode(AuthorizationCodeRequest)`.
45
- */
46
- async getAuthCodeUrl(request) {
47
- this.logger.info("getAuthCodeUrl called", request.correlationId);
48
- const validRequest = {
49
- ...request,
50
- ...(await this.initializeBaseRequest(request)),
51
- responseMode: request.responseMode || msalCommon.ResponseMode.QUERY,
52
- authenticationScheme: msalCommon.AuthenticationScheme.BEARER,
53
- };
54
- const authClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, undefined, undefined, request.azureCloudOptions);
55
- const authorizationCodeClient = new msalCommon.AuthorizationCodeClient(authClientConfig);
56
- this.logger.verbose("Auth code client created", validRequest.correlationId);
57
- return authorizationCodeClient.getAuthCodeUrl(validRequest);
58
- }
59
- /**
60
- * Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0
61
- * Authorization Code flow.
62
- *
63
- * `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0
64
- * Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and
65
- * AuthorizationCodeRequest are the same.
66
- */
67
- async acquireTokenByCode(request, authCodePayLoad) {
68
- this.logger.info("acquireTokenByCode called");
69
- if (request.state && authCodePayLoad) {
70
- this.logger.info("acquireTokenByCode - validating state");
71
- this.validateState(request.state, authCodePayLoad.state || "");
72
- // eslint-disable-next-line no-param-reassign
73
- authCodePayLoad = { ...authCodePayLoad, state: "" };
74
- }
75
- const validRequest = {
76
- ...request,
77
- ...(await this.initializeBaseRequest(request)),
78
- authenticationScheme: msalCommon.AuthenticationScheme.BEARER,
79
- };
80
- const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenByCode, validRequest.correlationId);
81
- try {
82
- const authClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, undefined, request.azureCloudOptions);
83
- const authorizationCodeClient = new msalCommon.AuthorizationCodeClient(authClientConfig);
84
- this.logger.verbose("Auth code client created", validRequest.correlationId);
85
- return await authorizationCodeClient.acquireToken(validRequest, authCodePayLoad);
86
- }
87
- catch (e) {
88
- if (e instanceof msalCommon.AuthError) {
89
- e.setCorrelationId(validRequest.correlationId);
90
- }
91
- serverTelemetryManager.cacheFailedRequest(e);
92
- throw e;
93
- }
94
- }
95
- /**
96
- * Acquires a token by exchanging the refresh token provided for a new set of tokens.
97
- *
98
- * This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is
99
- * recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will
100
- * handle the caching and refreshing of tokens automatically.
101
- */
102
- async acquireTokenByRefreshToken(request) {
103
- this.logger.info("acquireTokenByRefreshToken called", request.correlationId);
104
- const validRequest = {
105
- ...request,
106
- ...(await this.initializeBaseRequest(request)),
107
- authenticationScheme: msalCommon.AuthenticationScheme.BEARER,
108
- };
109
- const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenByRefreshToken, validRequest.correlationId);
110
- try {
111
- const refreshTokenClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, undefined, request.azureCloudOptions);
112
- const refreshTokenClient = new msalCommon.RefreshTokenClient(refreshTokenClientConfig);
113
- this.logger.verbose("Refresh token client created", validRequest.correlationId);
114
- return await refreshTokenClient.acquireToken(validRequest);
115
- }
116
- catch (e) {
117
- if (e instanceof msalCommon.AuthError) {
118
- e.setCorrelationId(validRequest.correlationId);
119
- }
120
- serverTelemetryManager.cacheFailedRequest(e);
121
- throw e;
122
- }
123
- }
124
- /**
125
- * Acquires a token silently when a user specifies the account the token is requested for.
126
- *
127
- * This API expects the user to provide an account object and looks into the cache to retrieve the token if present.
128
- * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token.
129
- * In case the refresh_token is expired or not found, an error is thrown
130
- * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`).
131
- */
132
- async acquireTokenSilent(request) {
133
- const validRequest = {
134
- ...request,
135
- ...(await this.initializeBaseRequest(request)),
136
- forceRefresh: request.forceRefresh || false,
137
- };
138
- const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenSilent, validRequest.correlationId, validRequest.forceRefresh);
139
- try {
140
- const silentFlowClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, undefined, request.azureCloudOptions);
141
- const silentFlowClient = new msalCommon.SilentFlowClient(silentFlowClientConfig);
142
- this.logger.verbose("Silent flow client created", validRequest.correlationId);
143
- return await silentFlowClient.acquireToken(validRequest);
144
- }
145
- catch (e) {
146
- if (e instanceof msalCommon.AuthError) {
147
- e.setCorrelationId(validRequest.correlationId);
148
- }
149
- serverTelemetryManager.cacheFailedRequest(e);
150
- throw e;
151
- }
152
- }
153
- /**
154
- * Acquires tokens with password grant by exchanging client applications username and password for credentials
155
- *
156
- * The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely.
157
- * More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4
158
- * Microsoft's documentation and recommendations are at:
159
- * https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword
160
- *
161
- * @param request - UsenamePasswordRequest
162
- */
163
- async acquireTokenByUsernamePassword(request) {
164
- this.logger.info("acquireTokenByUsernamePassword called", request.correlationId);
165
- const validRequest = {
166
- ...request,
167
- ...(await this.initializeBaseRequest(request)),
168
- };
169
- const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenByUsernamePassword, validRequest.correlationId);
170
- try {
171
- const usernamePasswordClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, undefined, request.azureCloudOptions);
172
- const usernamePasswordClient = new UsernamePasswordClient.UsernamePasswordClient(usernamePasswordClientConfig);
173
- this.logger.verbose("Username password client created", validRequest.correlationId);
174
- return await usernamePasswordClient.acquireToken(validRequest);
175
- }
176
- catch (e) {
177
- if (e instanceof msalCommon.AuthError) {
178
- e.setCorrelationId(validRequest.correlationId);
179
- }
180
- serverTelemetryManager.cacheFailedRequest(e);
181
- throw e;
182
- }
183
- }
184
- /**
185
- * Gets the token cache for the application.
186
- */
187
- getTokenCache() {
188
- this.logger.info("getTokenCache called");
189
- return this.tokenCache;
190
- }
191
- /**
192
- * Validates OIDC state by comparing the user cached state with the state received from the server.
193
- *
194
- * This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against
195
- * CSRF attacks.
196
- * For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6.
197
- * @param state
198
- * @param cachedState
199
- */
200
- validateState(state, cachedState) {
201
- if (!state) {
202
- throw NodeAuthError.NodeAuthError.createStateNotFoundError();
203
- }
204
- if (state !== cachedState) {
205
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.stateMismatch);
206
- }
207
- }
208
- /**
209
- * Returns the logger instance
210
- */
211
- getLogger() {
212
- return this.logger;
213
- }
214
- /**
215
- * Replaces the default logger set in configurations with new Logger with new configurations
216
- * @param logger - Logger instance
217
- */
218
- setLogger(logger) {
219
- this.logger = logger;
220
- }
221
- /**
222
- * Builds the common configuration to be passed to the common component based on the platform configurarion
223
- * @param authority - user passed authority in configuration
224
- * @param serverTelemetryManager - initializes servertelemetry if passed
225
- */
226
- async buildOauthClientConfiguration(authority, requestCorrelationId, serverTelemetryManager, azureRegionConfiguration, azureCloudOptions) {
227
- this.logger.verbose("buildOauthClientConfiguration called", requestCorrelationId);
228
- // precedence - azureCloudInstance + tenant >> authority and request >> config
229
- const userAzureCloudOptions = azureCloudOptions
230
- ? azureCloudOptions
231
- : this.config.auth.azureCloudOptions;
232
- // using null assertion operator as we ensure that all config values have default values in buildConfiguration()
233
- const discoveredAuthority = await this.createAuthority(authority, requestCorrelationId, azureRegionConfiguration, userAzureCloudOptions);
234
- this.logger.info(`Building oauth client configuration with the following authority: ${discoveredAuthority.tokenEndpoint}.`, requestCorrelationId);
235
- serverTelemetryManager?.updateRegionDiscoveryMetadata(discoveredAuthority.regionDiscoveryMetadata);
236
- const clientConfiguration = {
237
- authOptions: {
238
- clientId: this.config.auth.clientId,
239
- authority: discoveredAuthority,
240
- clientCapabilities: this.config.auth.clientCapabilities,
241
- },
242
- loggerOptions: {
243
- logLevel: this.config.system.loggerOptions.logLevel,
244
- loggerCallback: this.config.system.loggerOptions.loggerCallback,
245
- piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,
246
- correlationId: requestCorrelationId,
247
- },
248
- cacheOptions: {
249
- claimsBasedCachingEnabled: this.config.cache.claimsBasedCachingEnabled,
250
- },
251
- cryptoInterface: this.cryptoProvider,
252
- networkInterface: this.config.system.networkClient,
253
- storageInterface: this.storage,
254
- serverTelemetryManager: serverTelemetryManager,
255
- clientCredentials: {
256
- clientSecret: this.clientSecret,
257
- clientAssertion: await this.getClientAssertion(discoveredAuthority),
258
- },
259
- libraryInfo: {
260
- sku: Constants.Constants.MSAL_SKU,
261
- version: packageMetadata.version,
262
- cpu: process.arch || msalCommon.Constants.EMPTY_STRING,
263
- os: process.platform || msalCommon.Constants.EMPTY_STRING,
264
- },
265
- telemetry: this.config.telemetry,
266
- persistencePlugin: this.config.cache.cachePlugin,
267
- serializableCache: this.tokenCache,
268
- };
269
- return clientConfiguration;
270
- }
271
- async getClientAssertion(authority) {
272
- if (this.developerProvidedClientAssertion) {
273
- this.clientAssertion = ClientAssertion.ClientAssertion.fromAssertion(await msalCommon.getClientAssertion(this.developerProvidedClientAssertion, this.config.auth.clientId, authority.tokenEndpoint));
274
- }
275
- return (this.clientAssertion && {
276
- assertion: this.clientAssertion.getJwt(this.cryptoProvider, this.config.auth.clientId, authority.tokenEndpoint),
277
- assertionType: Constants.Constants.JWT_BEARER_ASSERTION_TYPE,
278
- });
279
- }
280
- /**
281
- * Generates a request with the default scopes & generates a correlationId.
282
- * @param authRequest - BaseAuthRequest for initialization
283
- */
284
- async initializeBaseRequest(authRequest) {
285
- this.logger.verbose("initializeRequestScopes called", authRequest.correlationId);
286
- // Default authenticationScheme to Bearer, log that POP isn't supported yet
287
- if (authRequest.authenticationScheme &&
288
- authRequest.authenticationScheme === msalCommon.AuthenticationScheme.POP) {
289
- this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request", authRequest.correlationId);
290
- }
291
- authRequest.authenticationScheme = msalCommon.AuthenticationScheme.BEARER;
292
- // Set requested claims hash if claims-based caching is enabled and claims were requested
293
- if (this.config.cache.claimsBasedCachingEnabled &&
294
- authRequest.claims &&
295
- // Checks for empty stringified object "{}" which doesn't qualify as requested claims
296
- !msalCommon.StringUtils.isEmptyObj(authRequest.claims)) {
297
- authRequest.requestedClaimsHash =
298
- await this.cryptoProvider.hashString(authRequest.claims);
299
- }
300
- return {
301
- ...authRequest,
302
- scopes: [
303
- ...((authRequest && authRequest.scopes) || []),
304
- ...msalCommon.OIDC_DEFAULT_SCOPES,
305
- ],
306
- correlationId: (authRequest && authRequest.correlationId) ||
307
- this.cryptoProvider.createNewGuid(),
308
- authority: authRequest.authority || this.config.auth.authority,
309
- };
310
- }
311
- /**
312
- * Initializes the server telemetry payload
313
- * @param apiId - Id for a specific request
314
- * @param correlationId - GUID
315
- * @param forceRefresh - boolean to indicate network call
316
- */
317
- initializeServerTelemetryManager(apiId, correlationId, forceRefresh) {
318
- const telemetryPayload = {
319
- clientId: this.config.auth.clientId,
320
- correlationId: correlationId,
321
- apiId: apiId,
322
- forceRefresh: forceRefresh || false,
323
- };
324
- return new msalCommon.ServerTelemetryManager(telemetryPayload, this.storage);
325
- }
326
- /**
327
- * Create authority instance. If authority not passed in request, default to authority set on the application
328
- * object. If no authority set in application object, then default to common authority.
329
- * @param authorityString - authority from user configuration
330
- */
331
- async createAuthority(authorityString, requestCorrelationId, azureRegionConfiguration, azureCloudOptions) {
332
- this.logger.verbose("createAuthority called", requestCorrelationId);
333
- // build authority string based on auth params - azureCloudInstance is prioritized if provided
334
- const authorityUrl = msalCommon.Authority.generateAuthority(authorityString, azureCloudOptions);
335
- const authorityOptions = {
336
- protocolMode: this.config.auth.protocolMode,
337
- knownAuthorities: this.config.auth.knownAuthorities,
338
- cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
339
- authorityMetadata: this.config.auth.authorityMetadata,
340
- azureRegionConfiguration,
341
- skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
342
- };
343
- return msalCommon.AuthorityFactory.createDiscoveredInstance(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger, requestCorrelationId);
344
- }
345
- /**
346
- * Clear the cache
347
- */
348
- clearCache() {
349
- void this.storage.clear();
350
- }
351
- }
352
-
353
- exports.ClientApplication = ClientApplication;
354
- //# sourceMappingURL=ClientApplication.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientApplication.cjs","sources":["../../src/client/ClientApplication.ts"],"sourcesContent":[null],"names":["buildAppConfiguration","CryptoProvider","Logger","name","version","NodeStorage","buildStaticAuthorityOptions","TokenCache","ResponseMode","AuthenticationScheme","AuthorizationCodeClient","ApiId","AuthError","RefreshTokenClient","SilentFlowClient","UsernamePasswordClient","NodeAuthError","createClientAuthError","ClientAuthErrorCodes","NodeConstants","Constants","ClientAssertion","getClientAssertion","StringUtils","OIDC_DEFAULT_SCOPES","ServerTelemetryManager","Authority","AuthorityFactory"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAuDH;;;AAGG;MACmB,iBAAiB,CAAA;AA4BnC;;AAEG;AACH,IAAA,WAAA,CAAsB,aAA4B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAGA,mCAAqB,CAAC,aAAa,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAIC,6BAAc,EAAE,CAAC;AAC3C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAIC,iBAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChCC,oBAAI,EACJC,uBAAO,CACV,CAAC;AACF,QAAA,IAAI,CAAC,OAAO,GAAG,IAAIC,uBAAW,CAC1B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACzB,IAAI,CAAC,cAAc,EACnBC,sCAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAChD,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAIC,qBAAU,CAC5B,IAAI,CAAC,OAAO,EACZ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KAAK,EAAE,CAAC;KAC7B;AACJ;;;;"}
@@ -1,161 +0,0 @@
1
- /*! @azure/msal-node v2.13.0 2024-08-13 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var jwt = require('jsonwebtoken');
8
- var msalCommon = require('@azure/msal-common');
9
- var EncodingUtils = require('../utils/EncodingUtils.cjs');
10
- var Constants = require('../utils/Constants.cjs');
11
-
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var jwt__default = /*#__PURE__*/_interopDefaultLegacy(jwt);
15
-
16
- /*
17
- * Copyright (c) Microsoft Corporation. All rights reserved.
18
- * Licensed under the MIT License.
19
- */
20
- /**
21
- * Client assertion of type jwt-bearer used in confidential client flows
22
- * @public
23
- */
24
- class ClientAssertion {
25
- /**
26
- * Initialize the ClientAssertion class from the clientAssertion passed by the user
27
- * @param assertion - refer https://tools.ietf.org/html/rfc7521
28
- */
29
- static fromAssertion(assertion) {
30
- const clientAssertion = new ClientAssertion();
31
- clientAssertion.jwt = assertion;
32
- return clientAssertion;
33
- }
34
- /**
35
- * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
36
- * Initialize the ClientAssertion class from the certificate passed by the user
37
- * @param thumbprint - identifier of a certificate
38
- * @param privateKey - secret key
39
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
40
- */
41
- static fromCertificate(thumbprint, privateKey, publicCertificate) {
42
- const clientAssertion = new ClientAssertion();
43
- clientAssertion.privateKey = privateKey;
44
- clientAssertion.thumbprint = thumbprint;
45
- clientAssertion.useSha256 = false;
46
- if (publicCertificate) {
47
- clientAssertion.publicCertificate =
48
- this.parseCertificate(publicCertificate);
49
- }
50
- return clientAssertion;
51
- }
52
- /**
53
- * Initialize the ClientAssertion class from the certificate passed by the user
54
- * @param thumbprint - identifier of a certificate
55
- * @param privateKey - secret key
56
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
57
- */
58
- static fromCertificateWithSha256Thumbprint(thumbprint, privateKey, publicCertificate) {
59
- const clientAssertion = new ClientAssertion();
60
- clientAssertion.privateKey = privateKey;
61
- clientAssertion.thumbprint = thumbprint;
62
- clientAssertion.useSha256 = true;
63
- if (publicCertificate) {
64
- clientAssertion.publicCertificate =
65
- this.parseCertificate(publicCertificate);
66
- }
67
- return clientAssertion;
68
- }
69
- /**
70
- * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
71
- * @param cryptoProvider - library's crypto helper
72
- * @param issuer - iss claim
73
- * @param jwtAudience - aud claim
74
- */
75
- getJwt(cryptoProvider, issuer, jwtAudience) {
76
- // if assertion was created from certificate, check if jwt is expired and create new one.
77
- if (this.privateKey && this.thumbprint) {
78
- if (this.jwt &&
79
- !this.isExpired() &&
80
- issuer === this.issuer &&
81
- jwtAudience === this.jwtAudience) {
82
- return this.jwt;
83
- }
84
- return this.createJwt(cryptoProvider, issuer, jwtAudience);
85
- }
86
- /*
87
- * if assertion was created by caller, then we just append it. It is up to the caller to
88
- * ensure that it contains necessary claims and that it is not expired.
89
- */
90
- if (this.jwt) {
91
- return this.jwt;
92
- }
93
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidAssertion);
94
- }
95
- /**
96
- * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
97
- */
98
- createJwt(cryptoProvider, issuer, jwtAudience) {
99
- this.issuer = issuer;
100
- this.jwtAudience = jwtAudience;
101
- const issuedAt = msalCommon.TimeUtils.nowSeconds();
102
- this.expirationTime = issuedAt + 600;
103
- const algorithm = this.useSha256
104
- ? Constants.JwtConstants.PSS_256
105
- : Constants.JwtConstants.RSA_256;
106
- const header = {
107
- alg: algorithm,
108
- };
109
- const thumbprintHeader = this.useSha256
110
- ? Constants.JwtConstants.X5T_256
111
- : Constants.JwtConstants.X5T;
112
- Object.assign(header, {
113
- [thumbprintHeader]: EncodingUtils.EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
114
- });
115
- if (this.publicCertificate) {
116
- Object.assign(header, {
117
- [Constants.JwtConstants.X5C]: this.publicCertificate,
118
- });
119
- }
120
- const payload = {
121
- [Constants.JwtConstants.AUDIENCE]: this.jwtAudience,
122
- [Constants.JwtConstants.EXPIRATION_TIME]: this.expirationTime,
123
- [Constants.JwtConstants.ISSUER]: this.issuer,
124
- [Constants.JwtConstants.SUBJECT]: this.issuer,
125
- [Constants.JwtConstants.NOT_BEFORE]: issuedAt,
126
- [Constants.JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
127
- };
128
- this.jwt = jwt__default["default"].sign(payload, this.privateKey, { header });
129
- return this.jwt;
130
- }
131
- /**
132
- * Utility API to check expiration
133
- */
134
- isExpired() {
135
- return this.expirationTime < msalCommon.TimeUtils.nowSeconds();
136
- }
137
- /**
138
- * Extracts the raw certs from a given certificate string and returns them in an array.
139
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
140
- */
141
- static parseCertificate(publicCertificate) {
142
- /**
143
- * This is regex to identify the certs in a given certificate string.
144
- * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
145
- * The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
146
- * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
147
- * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
148
- */
149
- const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
150
- const certs = [];
151
- let matches;
152
- while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
153
- // matches[1] represents the first parens capture group in the regex.
154
- certs.push(matches[1].replace(/\r*\n/g, msalCommon.Constants.EMPTY_STRING));
155
- }
156
- return certs;
157
- }
158
- }
159
-
160
- exports.ClientAssertion = ClientAssertion;
161
- //# sourceMappingURL=ClientAssertion.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientAssertion.cjs","sources":["../../src/client/ClientAssertion.ts"],"sourcesContent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