@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,205 +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
-
9
- /*
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License.
12
- */
13
- /**
14
- * OAuth2.0 client credential grant
15
- */
16
- class ClientCredentialClient extends msalCommon.BaseClient {
17
- constructor(configuration, appTokenProvider) {
18
- super(configuration);
19
- this.appTokenProvider = appTokenProvider;
20
- }
21
- /**
22
- * Public API to acquire a token with ClientCredential Flow for Confidential clients
23
- * @param request
24
- */
25
- async acquireToken(request) {
26
- if (request.skipCache || request.claims) {
27
- return this.executeTokenRequest(request, this.authority);
28
- }
29
- const [cachedAuthenticationResult, lastCacheOutcome] = await this.getCachedAuthenticationResult(request, this.config, this.cryptoUtils, this.authority, this.cacheManager, this.serverTelemetryManager);
30
- if (cachedAuthenticationResult) {
31
- // if the token is not expired but must be refreshed; get a new one in the background
32
- if (lastCacheOutcome === msalCommon.CacheOutcome.PROACTIVELY_REFRESHED) {
33
- this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");
34
- // refresh the access token in the background
35
- const refreshAccessToken = true;
36
- await this.executeTokenRequest(request, this.authority, refreshAccessToken);
37
- }
38
- // return the cached token
39
- return cachedAuthenticationResult;
40
- }
41
- else {
42
- return this.executeTokenRequest(request, this.authority);
43
- }
44
- }
45
- /**
46
- * looks up cache if the tokens are cached already
47
- */
48
- async getCachedAuthenticationResult(request, config, cryptoUtils, authority, cacheManager, serverTelemetryManager) {
49
- const clientConfiguration = config;
50
- const managedIdentityConfiguration = config;
51
- let lastCacheOutcome = msalCommon.CacheOutcome.NOT_APPLICABLE;
52
- // read the user-supplied cache into memory, if applicable
53
- let cacheContext;
54
- if (clientConfiguration.serializableCache &&
55
- clientConfiguration.persistencePlugin) {
56
- cacheContext = new msalCommon.TokenCacheContext(clientConfiguration.serializableCache, false);
57
- await clientConfiguration.persistencePlugin.beforeCacheAccess(cacheContext);
58
- }
59
- const cachedAccessToken = this.readAccessTokenFromCache(authority, managedIdentityConfiguration.managedIdentityId?.id ||
60
- clientConfiguration.authOptions.clientId, new msalCommon.ScopeSet(request.scopes || []), cacheManager);
61
- if (clientConfiguration.serializableCache &&
62
- clientConfiguration.persistencePlugin &&
63
- cacheContext) {
64
- await clientConfiguration.persistencePlugin.afterCacheAccess(cacheContext);
65
- }
66
- // must refresh due to non-existent access_token
67
- if (!cachedAccessToken) {
68
- serverTelemetryManager?.setCacheOutcome(msalCommon.CacheOutcome.NO_CACHED_ACCESS_TOKEN);
69
- return [null, msalCommon.CacheOutcome.NO_CACHED_ACCESS_TOKEN];
70
- }
71
- // must refresh due to the expires_in value
72
- if (msalCommon.TimeUtils.isTokenExpired(cachedAccessToken.expiresOn, clientConfiguration.systemOptions?.tokenRenewalOffsetSeconds ||
73
- msalCommon.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC)) {
74
- serverTelemetryManager?.setCacheOutcome(msalCommon.CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED);
75
- return [null, msalCommon.CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED];
76
- }
77
- // must refresh (in the background) due to the refresh_in value
78
- if (cachedAccessToken.refreshOn &&
79
- msalCommon.TimeUtils.isTokenExpired(cachedAccessToken.refreshOn.toString(), 0)) {
80
- lastCacheOutcome = msalCommon.CacheOutcome.PROACTIVELY_REFRESHED;
81
- serverTelemetryManager?.setCacheOutcome(msalCommon.CacheOutcome.PROACTIVELY_REFRESHED);
82
- }
83
- return [
84
- await msalCommon.ResponseHandler.generateAuthenticationResult(cryptoUtils, authority, {
85
- account: null,
86
- idToken: null,
87
- accessToken: cachedAccessToken,
88
- refreshToken: null,
89
- appMetadata: null,
90
- }, true, request),
91
- lastCacheOutcome,
92
- ];
93
- }
94
- /**
95
- * Reads access token from the cache
96
- */
97
- readAccessTokenFromCache(authority, id, scopeSet, cacheManager) {
98
- const accessTokenFilter = {
99
- homeAccountId: msalCommon.Constants.EMPTY_STRING,
100
- environment: authority.canonicalAuthorityUrlComponents.HostNameAndPort,
101
- credentialType: msalCommon.CredentialType.ACCESS_TOKEN,
102
- clientId: id,
103
- realm: authority.tenant,
104
- target: msalCommon.ScopeSet.createSearchScopes(scopeSet.asArray()),
105
- };
106
- const accessTokens = cacheManager.getAccessTokensByFilter(accessTokenFilter);
107
- if (accessTokens.length < 1) {
108
- return null;
109
- }
110
- else if (accessTokens.length > 1) {
111
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.multipleMatchingTokens);
112
- }
113
- return accessTokens[0];
114
- }
115
- /**
116
- * Makes a network call to request the token from the service
117
- * @param request
118
- * @param authority
119
- */
120
- async executeTokenRequest(request, authority, refreshAccessToken) {
121
- let serverTokenResponse;
122
- let reqTimestamp;
123
- if (this.appTokenProvider) {
124
- this.logger.info("Using appTokenProvider extensibility.");
125
- const appTokenPropviderParameters = {
126
- correlationId: request.correlationId,
127
- tenantId: this.config.authOptions.authority.tenant,
128
- scopes: request.scopes,
129
- claims: request.claims,
130
- };
131
- reqTimestamp = msalCommon.TimeUtils.nowSeconds();
132
- const appTokenProviderResult = await this.appTokenProvider(appTokenPropviderParameters);
133
- serverTokenResponse = {
134
- access_token: appTokenProviderResult.accessToken,
135
- expires_in: appTokenProviderResult.expiresInSeconds,
136
- refresh_in: appTokenProviderResult.refreshInSeconds,
137
- token_type: msalCommon.AuthenticationScheme.BEARER,
138
- };
139
- }
140
- else {
141
- const queryParametersString = this.createTokenQueryParameters(request);
142
- const endpoint = msalCommon.UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);
143
- const requestBody = await this.createTokenRequestBody(request);
144
- const headers = this.createTokenRequestHeaders();
145
- const thumbprint = {
146
- clientId: this.config.authOptions.clientId,
147
- authority: request.authority,
148
- scopes: request.scopes,
149
- claims: request.claims,
150
- authenticationScheme: request.authenticationScheme,
151
- resourceRequestMethod: request.resourceRequestMethod,
152
- resourceRequestUri: request.resourceRequestUri,
153
- shrClaims: request.shrClaims,
154
- sshKid: request.sshKid,
155
- };
156
- this.logger.info("Sending token request to endpoint: " + authority.tokenEndpoint);
157
- reqTimestamp = msalCommon.TimeUtils.nowSeconds();
158
- const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
159
- serverTokenResponse = response.body;
160
- serverTokenResponse.status = response.status;
161
- }
162
- const responseHandler = new msalCommon.ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
163
- responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken);
164
- const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request);
165
- return tokenResponse;
166
- }
167
- /**
168
- * generate the request to the server in the acceptable format
169
- * @param request
170
- */
171
- async createTokenRequestBody(request) {
172
- const parameterBuilder = new msalCommon.RequestParameterBuilder();
173
- parameterBuilder.addClientId(this.config.authOptions.clientId);
174
- parameterBuilder.addScopes(request.scopes, false);
175
- parameterBuilder.addGrantType(msalCommon.GrantType.CLIENT_CREDENTIALS_GRANT);
176
- parameterBuilder.addLibraryInfo(this.config.libraryInfo);
177
- parameterBuilder.addApplicationTelemetry(this.config.telemetry.application);
178
- parameterBuilder.addThrottling();
179
- if (this.serverTelemetryManager) {
180
- parameterBuilder.addServerTelemetry(this.serverTelemetryManager);
181
- }
182
- const correlationId = request.correlationId ||
183
- this.config.cryptoInterface.createNewGuid();
184
- parameterBuilder.addCorrelationId(correlationId);
185
- if (this.config.clientCredentials.clientSecret) {
186
- parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);
187
- }
188
- // Use clientAssertion from request, fallback to client assertion in base configuration
189
- const clientAssertion = request.clientAssertion ||
190
- this.config.clientCredentials.clientAssertion;
191
- if (clientAssertion) {
192
- parameterBuilder.addClientAssertion(await msalCommon.getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri));
193
- parameterBuilder.addClientAssertionType(clientAssertion.assertionType);
194
- }
195
- if (!msalCommon.StringUtils.isEmptyObj(request.claims) ||
196
- (this.config.authOptions.clientCapabilities &&
197
- this.config.authOptions.clientCapabilities.length > 0)) {
198
- parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
199
- }
200
- return parameterBuilder.createQueryString();
201
- }
202
- }
203
-
204
- exports.ClientCredentialClient = ClientCredentialClient;
205
- //# sourceMappingURL=ClientCredentialClient.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientCredentialClient.cjs","sources":["../../src/client/ClientCredentialClient.ts"],"sourcesContent":[null],"names":["BaseClient","CacheOutcome","TokenCacheContext","ScopeSet","TimeUtils","DEFAULT_TOKEN_RENEWAL_OFFSET_SEC","ResponseHandler","Constants","CredentialType","createClientAuthError","ClientAuthErrorCodes","AuthenticationScheme","UrlString","RequestParameterBuilder","GrantType","getClientAssertion","StringUtils"],"mappings":";;;;;;;;AAAA;;;AAGG;AAuCH;;AAEG;AACG,MAAO,sBAAuB,SAAQA,qBAAU,CAAA;IAGlD,WACI,CAAA,aAAkC,EAClC,gBAAoC,EAAA;QAEpC,KAAK,CAAC,aAAa,CAAC,CAAC;AACrB,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;AAED;;;AAGG;IACI,MAAM,YAAY,CACrB,OAAsC,EAAA;AAEtC,QAAA,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE;YACrC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5D,SAAA;AAED,QAAA,MAAM,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,GAChD,MAAM,IAAI,CAAC,6BAA6B,CACpC,OAAO,EACP,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,sBAAsB,CAC9B,CAAC;AAEN,QAAA,IAAI,0BAA0B,EAAE;;AAE5B,YAAA,IAAI,gBAAgB,KAAKC,uBAAY,CAAC,q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WAAW,CAAC,kBAAkB,CAC7C,CAAC;AACL,SAAA;AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"}
@@ -1,184 +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 ClientApplication = require('./ClientApplication.cjs');
8
- var ClientAssertion = require('./ClientAssertion.cjs');
9
- var Constants = require('../utils/Constants.cjs');
10
- var msalCommon = require('@azure/msal-common');
11
- var ClientCredentialClient = require('./ClientCredentialClient.cjs');
12
- var OnBehalfOfClient = require('./OnBehalfOfClient.cjs');
13
-
14
- /*
15
- * Copyright (c) Microsoft Corporation. All rights reserved.
16
- * Licensed under the MIT License.
17
- */
18
- /**
19
- * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications
20
- * will configure application secrets, client certificates/assertions as applicable
21
- * @public
22
- */
23
- class ConfidentialClientApplication extends ClientApplication.ClientApplication {
24
- /**
25
- * Constructor for the ConfidentialClientApplication
26
- *
27
- * Required attributes in the Configuration object are:
28
- * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal
29
- * - authority: the authority URL for your application.
30
- * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal.
31
- *
32
- * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
33
- * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
34
- * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
35
- * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
36
- * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
37
- *
38
- * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/
39
- * Full B2C functionality will be available in this library in future versions.
40
- *
41
- * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance
42
- */
43
- constructor(configuration) {
44
- super(configuration);
45
- this.setClientCredential();
46
- this.appTokenProvider = undefined;
47
- }
48
- /**
49
- * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and
50
- * is meant for Azure SDK to enhance Managed Identity support.
51
- *
52
- * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source.
53
- */
54
- SetAppTokenProvider(provider) {
55
- this.appTokenProvider = provider;
56
- }
57
- /**
58
- * Acquires tokens from the authority for the application (not for an end user).
59
- */
60
- async acquireTokenByClientCredential(request) {
61
- this.logger.info("acquireTokenByClientCredential called", request.correlationId);
62
- // If there is a client assertion present in the request, it overrides the one present in the client configuration
63
- let clientAssertion;
64
- if (request.clientAssertion) {
65
- clientAssertion = {
66
- assertion: await msalCommon.getClientAssertion(request.clientAssertion, this.config.auth.clientId
67
- // tokenEndpoint will be undefined. resourceRequestUri is omitted in ClientCredentialRequest
68
- ),
69
- assertionType: Constants.Constants.JWT_BEARER_ASSERTION_TYPE,
70
- };
71
- }
72
- const baseRequest = await this.initializeBaseRequest(request);
73
- // valid base request should not contain oidc scopes in this grant type
74
- const validBaseRequest = {
75
- ...baseRequest,
76
- scopes: baseRequest.scopes.filter((scope) => !msalCommon.OIDC_DEFAULT_SCOPES.includes(scope)),
77
- };
78
- const validRequest = {
79
- ...request,
80
- ...validBaseRequest,
81
- clientAssertion,
82
- };
83
- /*
84
- * valid request should not have "common" or "organizations" in lieu of the tenant_id in the authority in the auth configuration
85
- * example authority: "https://login.microsoftonline.com/TenantId",
86
- */
87
- const authority = new msalCommon.UrlString(validRequest.authority);
88
- const tenantId = authority.getUrlComponents().PathSegments[0];
89
- if (Object.values(msalCommon.AADAuthorityConstants).includes(tenantId)) {
90
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.missingTenantIdError);
91
- }
92
- const azureRegionConfiguration = {
93
- azureRegion: validRequest.azureRegion,
94
- environmentRegion: process.env[Constants.REGION_ENVIRONMENT_VARIABLE],
95
- };
96
- const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenByClientCredential, validRequest.correlationId, validRequest.skipCache);
97
- try {
98
- const clientCredentialConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, azureRegionConfiguration, request.azureCloudOptions);
99
- const clientCredentialClient = new ClientCredentialClient.ClientCredentialClient(clientCredentialConfig, this.appTokenProvider);
100
- this.logger.verbose("Client credential client created", validRequest.correlationId);
101
- return await clientCredentialClient.acquireToken(validRequest);
102
- }
103
- catch (e) {
104
- if (e instanceof msalCommon.AuthError) {
105
- e.setCorrelationId(validRequest.correlationId);
106
- }
107
- serverTelemetryManager.cacheFailedRequest(e);
108
- throw e;
109
- }
110
- }
111
- /**
112
- * Acquires tokens from the authority for the application.
113
- *
114
- * Used in scenarios where the current app is a middle-tier service which was called with a token
115
- * representing an end user. The current app can use the token (oboAssertion) to request another
116
- * token to access downstream web API, on behalf of that user.
117
- *
118
- * The current middle-tier app has no user interaction to obtain consent.
119
- * See how to gain consent upfront for your middle-tier app from this article.
120
- * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application
121
- */
122
- async acquireTokenOnBehalfOf(request) {
123
- this.logger.info("acquireTokenOnBehalfOf called", request.correlationId);
124
- const validRequest = {
125
- ...request,
126
- ...(await this.initializeBaseRequest(request)),
127
- };
128
- try {
129
- const onBehalfOfConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, undefined, undefined, request.azureCloudOptions);
130
- const oboClient = new OnBehalfOfClient.OnBehalfOfClient(onBehalfOfConfig);
131
- this.logger.verbose("On behalf of client created", validRequest.correlationId);
132
- return await oboClient.acquireToken(validRequest);
133
- }
134
- catch (e) {
135
- if (e instanceof msalCommon.AuthError) {
136
- e.setCorrelationId(validRequest.correlationId);
137
- }
138
- throw e;
139
- }
140
- }
141
- setClientCredential() {
142
- const clientSecretNotEmpty = !!this.config.auth.clientSecret;
143
- const clientAssertionNotEmpty = !!this.config.auth.clientAssertion;
144
- const certificateNotEmpty = (!!this.config.auth.clientCertificate?.thumbprint ||
145
- !!this.config.auth.clientCertificate?.thumbprintSha256) &&
146
- !!this.config.auth.clientCertificate?.privateKey;
147
- /*
148
- * If app developer configures this callback, they don't need a credential
149
- * i.e. AzureSDK can get token from Managed Identity without a cert / secret
150
- */
151
- if (this.appTokenProvider) {
152
- return;
153
- }
154
- // Check that at most one credential is set on the application
155
- if ((clientSecretNotEmpty && clientAssertionNotEmpty) ||
156
- (clientAssertionNotEmpty && certificateNotEmpty) ||
157
- (clientSecretNotEmpty && certificateNotEmpty)) {
158
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidClientCredential);
159
- }
160
- if (this.config.auth.clientSecret) {
161
- this.clientSecret = this.config.auth.clientSecret;
162
- return;
163
- }
164
- if (this.config.auth.clientAssertion) {
165
- this.developerProvidedClientAssertion =
166
- this.config.auth.clientAssertion;
167
- return;
168
- }
169
- if (!certificateNotEmpty) {
170
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidClientCredential);
171
- }
172
- else {
173
- this.clientAssertion = !!this.config.auth.clientCertificate
174
- .thumbprintSha256
175
- ? ClientAssertion.ClientAssertion.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c)
176
- : ClientAssertion.ClientAssertion.fromCertificate(
177
- // guaranteed to be a string, due to prior error checking in this function
178
- this.config.auth.clientCertificate.thumbprint, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c);
179
- }
180
- }
181
- }
182
-
183
- exports.ConfidentialClientApplication = ConfidentialClientApplication;
184
- //# sourceMappingURL=ConfidentialClientApplication.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfidentialClientApplication.cjs","sources":["../../src/client/ConfidentialClientApplication.ts"],"sourcesContent":[null],"names":["ClientApplication","getClientAssertion","NodeConstants","OIDC_DEFAULT_SCOPES","UrlString","AADAuthorityConstants","createClientAuthError","ClientAuthErrorCodes","REGION_ENVIRONMENT_VARIABLE","ApiId","ClientCredentialClient","AuthError","OnBehalfOfClient","ClientAssertion"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAiCH;;;;AAIG;AACG,MAAO,6BACT,SAAQA,mCAAiB,CAAA;AAKzB;;;;;;;;;;;;;;;;;;AAkBG;AACH,IAAA,WAAA,CAAY,aAA4B,EAAA;QACpC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrB,IAAI,CAAC,mBAAmB,EAAE,CAAC;AAC3B,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;KACrC;AAED;;;;;AAKG;AACH,IAAA,mBAAmB,CAAC,QAA2B,EAAA;AAC3C,QAAA,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;KACpC;AAED;;AAEG;IACI,MAAM,8BAA8B,CACvC,OAAgC,EAAA;QAEhC,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,uCAAuC,EACvC,OAAO,CAAC,aAAa,CACxB,CAAC;;AAGF,QAAA,IAAI,eAAgD,CAAC;QACrD,IAAI,OAAO,CAAC,eAAe,EAAE;AACzB,YAAA,eAAe,GAAG;AACd,gBAAA,SAAS,EAAE,MAAMC,6BAAkB,CAC/B,OAAO,CAAC,eAAe,EACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ;;AAE5B,iBAAA;gBACD,aAAa,EAAEC,mBAAa,CAAC,yBAAyB;aACzD,CAAC;AACL,SAAA;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;;AAG9D,QAAA,MAAM,gBAAgB,GAAG;AACrB,YAAA,GAAG,WAAW;AACd,YAAA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AG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB;iBACtD,gBAAgB;AACjB,kBAAEM,+BAAe,CAAC,mCAAmC,CAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EACnD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CACzC;kBACDA,+BAAe,CAAC,eAAe;;AAE3B,gBAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAoB,EACvD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CACzC,CAAC;AACX,SAAA;KACJ;AACJ;;;;"}
@@ -1,218 +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
-
9
- /*
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License.
12
- */
13
- /**
14
- * OAuth2.0 Device code client
15
- */
16
- class DeviceCodeClient extends msalCommon.BaseClient {
17
- constructor(configuration) {
18
- super(configuration);
19
- }
20
- /**
21
- * Gets device code from device code endpoint, calls back to with device code response, and
22
- * polls token endpoint to exchange device code for tokens
23
- * @param request
24
- */
25
- async acquireToken(request) {
26
- const deviceCodeResponse = await this.getDeviceCode(request);
27
- request.deviceCodeCallback(deviceCodeResponse);
28
- const reqTimestamp = msalCommon.TimeUtils.nowSeconds();
29
- const response = await this.acquireTokenWithDeviceCode(request, deviceCodeResponse);
30
- const responseHandler = new msalCommon.ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
31
- // Validate response. This function throws a server error if an error is returned by the server.
32
- responseHandler.validateTokenResponse(response);
33
- return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request);
34
- }
35
- /**
36
- * Creates device code request and executes http GET
37
- * @param request
38
- */
39
- async getDeviceCode(request) {
40
- const queryParametersString = this.createExtraQueryParameters(request);
41
- const endpoint = msalCommon.UrlString.appendQueryString(this.authority.deviceCodeEndpoint, queryParametersString);
42
- const queryString = this.createQueryString(request);
43
- const headers = this.createTokenRequestHeaders();
44
- const thumbprint = {
45
- clientId: this.config.authOptions.clientId,
46
- authority: request.authority,
47
- scopes: request.scopes,
48
- claims: request.claims,
49
- authenticationScheme: request.authenticationScheme,
50
- resourceRequestMethod: request.resourceRequestMethod,
51
- resourceRequestUri: request.resourceRequestUri,
52
- shrClaims: request.shrClaims,
53
- sshKid: request.sshKid,
54
- };
55
- return this.executePostRequestToDeviceCodeEndpoint(endpoint, queryString, headers, thumbprint);
56
- }
57
- /**
58
- * Creates query string for the device code request
59
- * @param request
60
- */
61
- createExtraQueryParameters(request) {
62
- const parameterBuilder = new msalCommon.RequestParameterBuilder();
63
- if (request.extraQueryParameters) {
64
- parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);
65
- }
66
- return parameterBuilder.createQueryString();
67
- }
68
- /**
69
- * Executes POST request to device code endpoint
70
- * @param deviceCodeEndpoint
71
- * @param queryString
72
- * @param headers
73
- */
74
- async executePostRequestToDeviceCodeEndpoint(deviceCodeEndpoint, queryString, headers, thumbprint) {
75
- const { body: { user_code: userCode, device_code: deviceCode, verification_uri: verificationUri, expires_in: expiresIn, interval, message, }, } = await this.networkManager.sendPostRequest(thumbprint, deviceCodeEndpoint, {
76
- body: queryString,
77
- headers: headers,
78
- });
79
- return {
80
- userCode,
81
- deviceCode,
82
- verificationUri,
83
- expiresIn,
84
- interval,
85
- message,
86
- };
87
- }
88
- /**
89
- * Create device code endpoint query parameters and returns string
90
- */
91
- createQueryString(request) {
92
- const parameterBuilder = new msalCommon.RequestParameterBuilder();
93
- parameterBuilder.addScopes(request.scopes);
94
- parameterBuilder.addClientId(this.config.authOptions.clientId);
95
- if (request.extraQueryParameters) {
96
- parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);
97
- }
98
- if (request.claims ||
99
- (this.config.authOptions.clientCapabilities &&
100
- this.config.authOptions.clientCapabilities.length > 0)) {
101
- parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
102
- }
103
- return parameterBuilder.createQueryString();
104
- }
105
- /**
106
- * Breaks the polling with specific conditions.
107
- * @param request CommonDeviceCodeRequest
108
- * @param deviceCodeResponse DeviceCodeResponse
109
- */
110
- continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, userSpecifiedCancelFlag) {
111
- if (userSpecifiedCancelFlag) {
112
- this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true");
113
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.deviceCodePollingCancelled);
114
- }
115
- else if (userSpecifiedTimeout &&
116
- userSpecifiedTimeout < deviceCodeExpirationTime &&
117
- msalCommon.TimeUtils.nowSeconds() > userSpecifiedTimeout) {
118
- this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`);
119
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.userTimeoutReached);
120
- }
121
- else if (msalCommon.TimeUtils.nowSeconds() > deviceCodeExpirationTime) {
122
- if (userSpecifiedTimeout) {
123
- this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}`);
124
- }
125
- this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`);
126
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.deviceCodeExpired);
127
- }
128
- return true;
129
- }
130
- /**
131
- * Creates token request with device code response and polls token endpoint at interval set by the device code
132
- * response
133
- * @param request
134
- * @param deviceCodeResponse
135
- */
136
- async acquireTokenWithDeviceCode(request, deviceCodeResponse) {
137
- const queryParametersString = this.createTokenQueryParameters(request);
138
- const endpoint = msalCommon.UrlString.appendQueryString(this.authority.tokenEndpoint, queryParametersString);
139
- const requestBody = this.createTokenRequestBody(request, deviceCodeResponse);
140
- const headers = this.createTokenRequestHeaders();
141
- const userSpecifiedTimeout = request.timeout
142
- ? msalCommon.TimeUtils.nowSeconds() + request.timeout
143
- : undefined;
144
- const deviceCodeExpirationTime = msalCommon.TimeUtils.nowSeconds() + deviceCodeResponse.expiresIn;
145
- const pollingIntervalMilli = deviceCodeResponse.interval * 1000;
146
- /*
147
- * Poll token endpoint while (device code is not expired AND operation has not been cancelled by
148
- * setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli
149
- */
150
- while (this.continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, request.cancel)) {
151
- const thumbprint = {
152
- clientId: this.config.authOptions.clientId,
153
- authority: request.authority,
154
- scopes: request.scopes,
155
- claims: request.claims,
156
- authenticationScheme: request.authenticationScheme,
157
- resourceRequestMethod: request.resourceRequestMethod,
158
- resourceRequestUri: request.resourceRequestUri,
159
- shrClaims: request.shrClaims,
160
- sshKid: request.sshKid,
161
- };
162
- const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
163
- if (response.body && response.body.error) {
164
- // user authorization is pending. Sleep for polling interval and try again
165
- if (response.body.error === msalCommon.Constants.AUTHORIZATION_PENDING) {
166
- this.logger.info("Authorization pending. Continue polling.");
167
- await msalCommon.TimeUtils.delay(pollingIntervalMilli);
168
- }
169
- else {
170
- // for any other error, throw
171
- this.logger.info("Unexpected error in polling from the server");
172
- throw msalCommon.createAuthError(msalCommon.AuthErrorCodes.postRequestFailed, response.body.error);
173
- }
174
- }
175
- else {
176
- this.logger.verbose("Authorization completed successfully. Polling stopped.");
177
- return response.body;
178
- }
179
- }
180
- /*
181
- * The above code should've thrown by this point, but to satisfy TypeScript,
182
- * and in the rare case the conditionals in continuePolling() may not catch everything...
183
- */
184
- this.logger.error("Polling stopped for unknown reasons.");
185
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.deviceCodeUnknownError);
186
- }
187
- /**
188
- * Creates query parameters and converts to string.
189
- * @param request
190
- * @param deviceCodeResponse
191
- */
192
- createTokenRequestBody(request, deviceCodeResponse) {
193
- const requestParameters = new msalCommon.RequestParameterBuilder();
194
- requestParameters.addScopes(request.scopes);
195
- requestParameters.addClientId(this.config.authOptions.clientId);
196
- requestParameters.addGrantType(msalCommon.GrantType.DEVICE_CODE_GRANT);
197
- requestParameters.addDeviceCode(deviceCodeResponse.deviceCode);
198
- const correlationId = request.correlationId ||
199
- this.config.cryptoInterface.createNewGuid();
200
- requestParameters.addCorrelationId(correlationId);
201
- requestParameters.addClientInfo();
202
- requestParameters.addLibraryInfo(this.config.libraryInfo);
203
- requestParameters.addApplicationTelemetry(this.config.telemetry.application);
204
- requestParameters.addThrottling();
205
- if (this.serverTelemetryManager) {
206
- requestParameters.addServerTelemetry(this.serverTelemetryManager);
207
- }
208
- if (!msalCommon.StringUtils.isEmptyObj(request.claims) ||
209
- (this.config.authOptions.clientCapabilities &&
210
- this.config.authOptions.clientCapabilities.length > 0)) {
211
- requestParameters.addClaims(request.claims, this.config.authOptions.clientCapabilities);
212
- }
213
- return requestParameters.createQueryString();
214
- }
215
- }
216
-
217
- exports.DeviceCodeClient = DeviceCodeClient;
218
- //# sourceMappingURL=DeviceCodeClient.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeviceCodeClient.cjs","sources":["../../src/client/DeviceCodeClient.ts"],"sourcesContent":[null],"names":["BaseClient","TimeUtils","ResponseHandler","UrlString","RequestParameterBuilder","createClientAuthError","ClientAuthErrorCodes","Constants","createAuthError","AuthErrorCodes","GrantType","StringUtils"],"mappings":";;;;;;;;AAAA;;;AAGG;AAwBH;;AAEG;AACG,MAAO,gBAAiB,SAAQA,qBAAU,CAAA;AAC5C,IAAA,WAAA,CAAY,aA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