@azure/msal-node 2.13.1 → 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 (415) 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 +2 -2
  32. package/dist/client/DeviceCodeClient.d.ts +1 -1
  33. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  34. package/dist/client/DeviceCodeClient.mjs +2 -2
  35. package/dist/client/IConfidentialClientApplication.d.ts +1 -1
  36. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  37. package/dist/client/IPublicClientApplication.d.ts +1 -1
  38. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  39. package/dist/client/ManagedIdentityApplication.d.ts +4 -4
  40. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  41. package/dist/client/ManagedIdentityApplication.mjs +2 -2
  42. package/dist/client/ManagedIdentityClient.d.ts +6 -6
  43. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  44. package/dist/client/ManagedIdentityClient.mjs +1 -1
  45. package/dist/client/ManagedIdentitySources/AppService.d.ts +6 -6
  46. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  47. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  48. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +7 -7
  49. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  50. package/dist/client/ManagedIdentitySources/AzureArc.mjs +2 -2
  51. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +8 -8
  52. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  53. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +2 -2
  54. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +6 -6
  55. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  56. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  57. package/dist/client/ManagedIdentitySources/Imds.d.ts +6 -6
  58. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  59. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  60. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +6 -6
  61. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  62. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  63. package/dist/client/OnBehalfOfClient.d.ts +1 -1
  64. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  65. package/dist/client/OnBehalfOfClient.mjs +2 -2
  66. package/dist/client/PublicClientApplication.d.ts +1 -1
  67. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  68. package/dist/client/PublicClientApplication.mjs +2 -2
  69. package/dist/client/UsernamePasswordClient.d.ts +1 -1
  70. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  71. package/dist/client/UsernamePasswordClient.mjs +2 -2
  72. package/dist/config/Configuration.d.ts +3 -3
  73. package/dist/config/Configuration.d.ts.map +1 -1
  74. package/dist/config/Configuration.mjs +2 -2
  75. package/dist/config/ManagedIdentityId.d.ts +2 -2
  76. package/dist/config/ManagedIdentityId.d.ts.map +1 -1
  77. package/dist/config/ManagedIdentityId.mjs +1 -1
  78. package/dist/config/ManagedIdentityRequestParameters.d.ts +1 -1
  79. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  80. package/dist/config/ManagedIdentityRequestParameters.mjs +2 -2
  81. package/dist/crypto/CryptoProvider.d.ts +1 -1
  82. package/dist/crypto/CryptoProvider.d.ts.map +1 -1
  83. package/dist/crypto/CryptoProvider.mjs +1 -1
  84. package/dist/crypto/GuidGenerator.d.ts +1 -1
  85. package/dist/crypto/GuidGenerator.d.ts.map +1 -1
  86. package/dist/crypto/GuidGenerator.mjs +1 -1
  87. package/dist/crypto/HashUtils.d.ts +1 -1
  88. package/dist/crypto/HashUtils.mjs +1 -1
  89. package/dist/crypto/PkceGenerator.d.ts +1 -1
  90. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  91. package/dist/crypto/PkceGenerator.mjs +2 -2
  92. package/dist/error/ManagedIdentityError.d.ts +2 -2
  93. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  94. package/dist/error/ManagedIdentityError.mjs +2 -2
  95. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  96. package/dist/error/NodeAuthError.d.ts +1 -1
  97. package/dist/error/NodeAuthError.d.ts.map +1 -1
  98. package/dist/error/NodeAuthError.mjs +2 -2
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.mjs +2 -2
  102. package/dist/internals.mjs +1 -1
  103. package/dist/network/HttpClient.d.ts +3 -3
  104. package/dist/network/HttpClient.d.ts.map +1 -1
  105. package/dist/network/HttpClient.mjs +2 -2
  106. package/dist/network/HttpClientWithRetries.d.ts +2 -2
  107. package/dist/network/HttpClientWithRetries.d.ts.map +1 -1
  108. package/dist/network/HttpClientWithRetries.mjs +2 -2
  109. package/dist/network/ILoopbackClient.d.ts +1 -1
  110. package/dist/network/ILoopbackClient.d.ts.map +1 -1
  111. package/dist/network/LoopbackClient.d.ts +1 -1
  112. package/dist/network/LoopbackClient.d.ts.map +1 -1
  113. package/dist/network/LoopbackClient.mjs +2 -2
  114. package/dist/packageMetadata.d.ts +1 -1
  115. package/dist/packageMetadata.mjs +2 -2
  116. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  117. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  118. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  119. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  120. package/dist/request/ClientCredentialRequest.d.ts +1 -1
  121. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  122. package/dist/request/DeviceCodeRequest.d.ts +1 -1
  123. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  124. package/dist/request/InteractiveRequest.d.ts +1 -1
  125. package/dist/request/ManagedIdentityRequest.d.ts +2 -2
  126. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -1
  127. package/dist/request/OnBehalfOfRequest.d.ts +1 -1
  128. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  129. package/dist/request/RefreshTokenRequest.d.ts +1 -1
  130. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  131. package/dist/request/SignOutRequest.d.ts +1 -1
  132. package/dist/request/SignOutRequest.d.ts.map +1 -1
  133. package/dist/request/SilentFlowRequest.d.ts +1 -1
  134. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  135. package/dist/request/UsernamePasswordRequest.d.ts +1 -1
  136. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  137. package/dist/response/ManagedIdentityTokenResponse.d.ts +1 -1
  138. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  139. package/dist/retry/IHttpRetryPolicy.d.ts +1 -1
  140. package/dist/retry/LinearRetryPolicy.d.ts +2 -2
  141. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -1
  142. package/dist/retry/LinearRetryPolicy.mjs +1 -1
  143. package/dist/utils/Constants.mjs +2 -2
  144. package/dist/utils/EncodingUtils.d.ts +1 -1
  145. package/dist/utils/EncodingUtils.mjs +2 -2
  146. package/dist/utils/NetworkUtils.d.ts +1 -1
  147. package/dist/utils/NetworkUtils.d.ts.map +1 -1
  148. package/dist/utils/NetworkUtils.mjs +1 -1
  149. package/dist/utils/NetworkUtils.mjs.map +1 -1
  150. package/lib/msal-node.cjs +12362 -0
  151. package/lib/msal-node.cjs.map +1 -0
  152. package/lib/package.json +1 -0
  153. package/lib/types/cache/ITokenCache.d.ts +16 -0
  154. package/lib/types/cache/ITokenCache.d.ts.map +1 -0
  155. package/lib/types/cache/NodeStorage.d.ts +194 -0
  156. package/lib/types/cache/NodeStorage.d.ts.map +1 -0
  157. package/lib/types/cache/TokenCache.d.ts +91 -0
  158. package/lib/types/cache/TokenCache.d.ts.map +1 -0
  159. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts +11 -0
  160. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +1 -0
  161. package/lib/types/cache/distributed/ICacheClient.d.ts +18 -0
  162. package/lib/types/cache/distributed/ICacheClient.d.ts.map +1 -0
  163. package/lib/types/cache/distributed/IPartitionManager.d.ts +29 -0
  164. package/lib/types/cache/distributed/IPartitionManager.d.ts.map +1 -0
  165. package/lib/types/cache/serializer/Deserializer.d.ts +43 -0
  166. package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -0
  167. package/lib/types/cache/serializer/Serializer.d.ts +40 -0
  168. package/lib/types/cache/serializer/Serializer.d.ts.map +1 -0
  169. package/lib/types/cache/serializer/SerializerTypes.d.ts +103 -0
  170. package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -0
  171. package/lib/types/client/ClientApplication.d.ts +144 -0
  172. package/lib/types/client/ClientApplication.d.ts.map +1 -0
  173. package/lib/types/client/ClientAssertion.d.ts +56 -0
  174. package/lib/types/client/ClientAssertion.d.ts.map +1 -0
  175. package/lib/types/client/ClientCredentialClient.d.ts +34 -0
  176. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -0
  177. package/lib/types/client/ConfidentialClientApplication.d.ts +59 -0
  178. package/lib/types/client/ConfidentialClientApplication.d.ts.map +1 -0
  179. package/lib/types/client/DeviceCodeClient.d.ts +54 -0
  180. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -0
  181. package/lib/types/client/IConfidentialClientApplication.d.ts +40 -0
  182. package/lib/types/client/IConfidentialClientApplication.d.ts.map +1 -0
  183. package/lib/types/client/IPublicClientApplication.d.ts +43 -0
  184. package/lib/types/client/IPublicClientApplication.d.ts.map +1 -0
  185. package/lib/types/client/ManagedIdentityApplication.d.ts +31 -0
  186. package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -0
  187. package/lib/types/client/ManagedIdentityClient.d.ts +28 -0
  188. package/lib/types/client/ManagedIdentityClient.d.ts.map +1 -0
  189. package/lib/types/client/ManagedIdentitySources/AppService.d.ts +18 -0
  190. package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -0
  191. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +28 -0
  192. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -0
  193. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +31 -0
  194. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -0
  195. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +17 -0
  196. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -0
  197. package/lib/types/client/ManagedIdentitySources/Imds.d.ts +13 -0
  198. package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -0
  199. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +18 -0
  200. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -0
  201. package/lib/types/client/OnBehalfOfClient.d.ts +48 -0
  202. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -0
  203. package/lib/types/client/PublicClientApplication.d.ts +73 -0
  204. package/lib/types/client/PublicClientApplication.d.ts.map +1 -0
  205. package/lib/types/client/UsernamePasswordClient.d.ts +26 -0
  206. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -0
  207. package/lib/types/config/Configuration.d.ts +132 -0
  208. package/lib/types/config/Configuration.d.ts.map +1 -0
  209. package/lib/types/config/ManagedIdentityId.d.ts +12 -0
  210. package/lib/types/config/ManagedIdentityId.d.ts.map +1 -0
  211. package/lib/types/config/ManagedIdentityRequestParameters.d.ts +12 -0
  212. package/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +1 -0
  213. package/lib/types/crypto/CryptoProvider.d.ts +63 -0
  214. package/lib/types/crypto/CryptoProvider.d.ts.map +1 -0
  215. package/lib/types/crypto/GuidGenerator.d.ts +15 -0
  216. package/lib/types/crypto/GuidGenerator.d.ts.map +1 -0
  217. package/lib/types/crypto/HashUtils.d.ts +9 -0
  218. package/lib/types/crypto/HashUtils.d.ts.map +1 -0
  219. package/lib/types/crypto/PkceGenerator.d.ts +23 -0
  220. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
  221. package/lib/types/error/ManagedIdentityError.d.ts +31 -0
  222. package/lib/types/error/ManagedIdentityError.d.ts.map +1 -0
  223. package/lib/types/error/ManagedIdentityErrorCodes.d.ts +23 -0
  224. package/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +1 -0
  225. package/lib/types/error/NodeAuthError.d.ts +74 -0
  226. package/lib/types/error/NodeAuthError.d.ts.map +1 -0
  227. package/lib/types/index.d.ts +46 -0
  228. package/lib/types/index.d.ts.map +1 -0
  229. package/lib/types/internals.d.ts +7 -0
  230. package/lib/types/internals.d.ts.map +1 -0
  231. package/lib/types/network/HttpClient.d.ts +26 -0
  232. package/lib/types/network/HttpClient.d.ts.map +1 -0
  233. package/lib/types/network/HttpClientWithRetries.d.ts +12 -0
  234. package/lib/types/network/HttpClientWithRetries.d.ts.map +1 -0
  235. package/lib/types/network/ILoopbackClient.d.ts +11 -0
  236. package/lib/types/network/ILoopbackClient.d.ts.map +1 -0
  237. package/lib/types/network/LoopbackClient.d.ts +22 -0
  238. package/lib/types/network/LoopbackClient.d.ts.map +1 -0
  239. package/lib/types/packageMetadata.d.ts +3 -0
  240. package/lib/types/packageMetadata.d.ts.map +1 -0
  241. package/lib/types/request/AuthorizationCodeRequest.d.ts +22 -0
  242. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
  243. package/lib/types/request/AuthorizationUrlRequest.d.ts +34 -0
  244. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
  245. package/lib/types/request/ClientCredentialRequest.d.ts +15 -0
  246. package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -0
  247. package/lib/types/request/DeviceCodeRequest.d.ts +16 -0
  248. package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -0
  249. package/lib/types/request/InteractiveRequest.d.ts +23 -0
  250. package/lib/types/request/InteractiveRequest.d.ts.map +1 -0
  251. package/lib/types/request/ManagedIdentityRequest.d.ts +9 -0
  252. package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -0
  253. package/lib/types/request/ManagedIdentityRequestParams.d.ts +10 -0
  254. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -0
  255. package/lib/types/request/OnBehalfOfRequest.d.ts +15 -0
  256. package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -0
  257. package/lib/types/request/RefreshTokenRequest.d.ts +18 -0
  258. package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -0
  259. package/lib/types/request/SignOutRequest.d.ts +6 -0
  260. package/lib/types/request/SignOutRequest.d.ts.map +1 -0
  261. package/lib/types/request/SilentFlowRequest.d.ts +17 -0
  262. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -0
  263. package/lib/types/request/UsernamePasswordRequest.d.ts +20 -0
  264. package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -0
  265. package/lib/types/response/ManagedIdentityTokenResponse.d.ts +35 -0
  266. package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -0
  267. package/lib/types/retry/IHttpRetryPolicy.d.ts +6 -0
  268. package/lib/types/retry/IHttpRetryPolicy.d.ts.map +1 -0
  269. package/lib/types/retry/LinearRetryPolicy.d.ts +12 -0
  270. package/lib/types/retry/LinearRetryPolicy.d.ts.map +1 -0
  271. package/lib/types/utils/Constants.d.ts +142 -0
  272. package/lib/types/utils/Constants.d.ts.map +1 -0
  273. package/lib/types/utils/EncodingUtils.d.ts +27 -0
  274. package/lib/types/utils/EncodingUtils.d.ts.map +1 -0
  275. package/lib/types/utils/NetworkUtils.d.ts +6 -0
  276. package/lib/types/utils/NetworkUtils.d.ts.map +1 -0
  277. package/package.json +13 -10
  278. package/src/cache/ITokenCache.ts +1 -1
  279. package/src/cache/NodeStorage.ts +1 -1
  280. package/src/cache/TokenCache.ts +1 -1
  281. package/src/cache/distributed/DistributedCachePlugin.ts +1 -1
  282. package/src/cache/distributed/IPartitionManager.ts +1 -1
  283. package/src/cache/serializer/Deserializer.ts +1 -1
  284. package/src/cache/serializer/Serializer.ts +1 -1
  285. package/src/cache/serializer/SerializerTypes.ts +1 -1
  286. package/src/client/ClientApplication.ts +1 -1
  287. package/src/client/ClientAssertion.ts +1 -1
  288. package/src/client/ClientCredentialClient.ts +2 -2
  289. package/src/client/ConfidentialClientApplication.ts +1 -1
  290. package/src/client/DeviceCodeClient.ts +1 -1
  291. package/src/client/IConfidentialClientApplication.ts +1 -1
  292. package/src/client/IPublicClientApplication.ts +5 -1
  293. package/src/client/ManagedIdentityApplication.ts +9 -9
  294. package/src/client/ManagedIdentityClient.ts +13 -13
  295. package/src/client/ManagedIdentitySources/AppService.ts +7 -7
  296. package/src/client/ManagedIdentitySources/AzureArc.ts +9 -9
  297. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +9 -9
  298. package/src/client/ManagedIdentitySources/CloudShell.ts +8 -8
  299. package/src/client/ManagedIdentitySources/Imds.ts +7 -7
  300. package/src/client/ManagedIdentitySources/ServiceFabric.ts +7 -7
  301. package/src/client/OnBehalfOfClient.ts +2 -2
  302. package/src/client/PublicClientApplication.ts +2 -2
  303. package/src/client/UsernamePasswordClient.ts +1 -1
  304. package/src/config/Configuration.ts +1 -1
  305. package/src/config/ManagedIdentityId.ts +3 -3
  306. package/src/config/ManagedIdentityRequestParameters.ts +2 -2
  307. package/src/crypto/CryptoProvider.ts +1 -1
  308. package/src/crypto/GuidGenerator.ts +1 -1
  309. package/src/crypto/PkceGenerator.ts +1 -1
  310. package/src/error/ManagedIdentityError.ts +3 -3
  311. package/src/error/ManagedIdentityErrorCodes.ts +1 -1
  312. package/src/error/NodeAuthError.ts +1 -1
  313. package/src/index.ts +1 -1
  314. package/src/network/HttpClient.ts +1 -1
  315. package/src/network/HttpClientWithRetries.ts +3 -3
  316. package/src/network/ILoopbackClient.ts +1 -1
  317. package/src/network/LoopbackClient.ts +1 -1
  318. package/src/packageMetadata.ts +1 -1
  319. package/src/request/AuthorizationCodeRequest.ts +1 -1
  320. package/src/request/AuthorizationUrlRequest.ts +1 -1
  321. package/src/request/ClientCredentialRequest.ts +1 -1
  322. package/src/request/DeviceCodeRequest.ts +1 -1
  323. package/src/request/ManagedIdentityRequest.ts +2 -2
  324. package/src/request/OnBehalfOfRequest.ts +1 -1
  325. package/src/request/RefreshTokenRequest.ts +1 -1
  326. package/src/request/SignOutRequest.ts +1 -1
  327. package/src/request/SilentFlowRequest.ts +1 -1
  328. package/src/request/UsernamePasswordRequest.ts +1 -1
  329. package/src/response/ManagedIdentityTokenResponse.ts +1 -1
  330. package/src/retry/LinearRetryPolicy.ts +1 -1
  331. package/src/utils/Constants.ts +1 -1
  332. package/src/utils/EncodingUtils.ts +1 -1
  333. package/src/utils/NetworkUtils.ts +4 -1
  334. package/dist/cache/NodeStorage.cjs +0 -434
  335. package/dist/cache/NodeStorage.cjs.map +0 -1
  336. package/dist/cache/TokenCache.cjs +0 -276
  337. package/dist/cache/TokenCache.cjs.map +0 -1
  338. package/dist/cache/distributed/DistributedCachePlugin.cjs +0 -35
  339. package/dist/cache/distributed/DistributedCachePlugin.cjs.map +0 -1
  340. package/dist/cache/serializer/Deserializer.cjs +0 -176
  341. package/dist/cache/serializer/Deserializer.cjs.map +0 -1
  342. package/dist/cache/serializer/Serializer.cjs +0 -144
  343. package/dist/cache/serializer/Serializer.cjs.map +0 -1
  344. package/dist/client/ClientApplication.cjs +0 -352
  345. package/dist/client/ClientApplication.cjs.map +0 -1
  346. package/dist/client/ClientAssertion.cjs +0 -155
  347. package/dist/client/ClientAssertion.cjs.map +0 -1
  348. package/dist/client/ClientCredentialClient.cjs +0 -203
  349. package/dist/client/ClientCredentialClient.cjs.map +0 -1
  350. package/dist/client/ConfidentialClientApplication.cjs +0 -183
  351. package/dist/client/ConfidentialClientApplication.cjs.map +0 -1
  352. package/dist/client/DeviceCodeClient.cjs +0 -216
  353. package/dist/client/DeviceCodeClient.cjs.map +0 -1
  354. package/dist/client/ManagedIdentityApplication.cjs +0 -100
  355. package/dist/client/ManagedIdentityApplication.cjs.map +0 -1
  356. package/dist/client/ManagedIdentityClient.cjs +0 -76
  357. package/dist/client/ManagedIdentityClient.cjs.map +0 -1
  358. package/dist/client/ManagedIdentitySources/AppService.cjs +0 -56
  359. package/dist/client/ManagedIdentitySources/AppService.cjs.map +0 -1
  360. package/dist/client/ManagedIdentitySources/AzureArc.cjs +0 -173
  361. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +0 -1
  362. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +0 -135
  363. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +0 -1
  364. package/dist/client/ManagedIdentitySources/CloudShell.cjs +0 -51
  365. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +0 -1
  366. package/dist/client/ManagedIdentitySources/Imds.cjs +0 -54
  367. package/dist/client/ManagedIdentitySources/Imds.cjs.map +0 -1
  368. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +0 -65
  369. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +0 -1
  370. package/dist/client/OnBehalfOfClient.cjs +0 -212
  371. package/dist/client/OnBehalfOfClient.cjs.map +0 -1
  372. package/dist/client/PublicClientApplication.cjs +0 -252
  373. package/dist/client/PublicClientApplication.cjs.map +0 -1
  374. package/dist/client/UsernamePasswordClient.cjs +0 -104
  375. package/dist/client/UsernamePasswordClient.cjs.map +0 -1
  376. package/dist/config/Configuration.cjs +0 -122
  377. package/dist/config/Configuration.cjs.map +0 -1
  378. package/dist/config/ManagedIdentityId.cjs +0 -59
  379. package/dist/config/ManagedIdentityId.cjs.map +0 -1
  380. package/dist/config/ManagedIdentityRequestParameters.cjs +0 -37
  381. package/dist/config/ManagedIdentityRequestParameters.cjs.map +0 -1
  382. package/dist/crypto/CryptoProvider.cjs +0 -101
  383. package/dist/crypto/CryptoProvider.cjs.map +0 -1
  384. package/dist/crypto/GuidGenerator.cjs +0 -31
  385. package/dist/crypto/GuidGenerator.cjs.map +0 -1
  386. package/dist/crypto/HashUtils.cjs +0 -23
  387. package/dist/crypto/HashUtils.cjs.map +0 -1
  388. package/dist/crypto/PkceGenerator.cjs +0 -62
  389. package/dist/crypto/PkceGenerator.cjs.map +0 -1
  390. package/dist/error/ManagedIdentityError.cjs +0 -54
  391. package/dist/error/ManagedIdentityError.cjs.map +0 -1
  392. package/dist/error/ManagedIdentityErrorCodes.cjs +0 -47
  393. package/dist/error/ManagedIdentityErrorCodes.cjs.map +0 -1
  394. package/dist/error/NodeAuthError.cjs +0 -105
  395. package/dist/error/NodeAuthError.cjs.map +0 -1
  396. package/dist/index.cjs +0 -123
  397. package/dist/index.cjs.map +0 -1
  398. package/dist/internals.cjs +0 -19
  399. package/dist/internals.cjs.map +0 -1
  400. package/dist/network/HttpClient.cjs +0 -294
  401. package/dist/network/HttpClient.cjs.map +0 -1
  402. package/dist/network/HttpClientWithRetries.cjs +0 -44
  403. package/dist/network/HttpClientWithRetries.cjs.map +0 -1
  404. package/dist/network/LoopbackClient.cjs +0 -93
  405. package/dist/network/LoopbackClient.cjs.map +0 -1
  406. package/dist/packageMetadata.cjs +0 -11
  407. package/dist/packageMetadata.cjs.map +0 -1
  408. package/dist/retry/LinearRetryPolicy.cjs +0 -47
  409. package/dist/retry/LinearRetryPolicy.cjs.map +0 -1
  410. package/dist/utils/Constants.cjs +0 -170
  411. package/dist/utils/Constants.cjs.map +0 -1
  412. package/dist/utils/EncodingUtils.cjs +0 -53
  413. package/dist/utils/EncodingUtils.cjs.map +0 -1
  414. package/dist/utils/NetworkUtils.cjs +0 -45
  415. package/dist/utils/NetworkUtils.cjs.map +0 -1
@@ -1,203 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
-
7
- /*
8
- * Copyright (c) Microsoft Corporation. All rights reserved.
9
- * Licensed under the MIT License.
10
- */
11
- /**
12
- * OAuth2.0 client credential grant
13
- */
14
- class ClientCredentialClient extends msalCommon.BaseClient {
15
- constructor(configuration, appTokenProvider) {
16
- super(configuration);
17
- this.appTokenProvider = appTokenProvider;
18
- }
19
- /**
20
- * Public API to acquire a token with ClientCredential Flow for Confidential clients
21
- * @param request
22
- */
23
- async acquireToken(request) {
24
- if (request.skipCache || request.claims) {
25
- return this.executeTokenRequest(request, this.authority);
26
- }
27
- const [cachedAuthenticationResult, lastCacheOutcome] = await this.getCachedAuthenticationResult(request, this.config, this.cryptoUtils, this.authority, this.cacheManager, this.serverTelemetryManager);
28
- if (cachedAuthenticationResult) {
29
- // if the token is not expired but must be refreshed; get a new one in the background
30
- if (lastCacheOutcome === msalCommon.CacheOutcome.PROACTIVELY_REFRESHED) {
31
- this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");
32
- // refresh the access token in the background
33
- const refreshAccessToken = true;
34
- await this.executeTokenRequest(request, this.authority, refreshAccessToken);
35
- }
36
- // return the cached token
37
- return cachedAuthenticationResult;
38
- }
39
- else {
40
- return this.executeTokenRequest(request, this.authority);
41
- }
42
- }
43
- /**
44
- * looks up cache if the tokens are cached already
45
- */
46
- async getCachedAuthenticationResult(request, config, cryptoUtils, authority, cacheManager, serverTelemetryManager) {
47
- const clientConfiguration = config;
48
- const managedIdentityConfiguration = config;
49
- let lastCacheOutcome = msalCommon.CacheOutcome.NOT_APPLICABLE;
50
- // read the user-supplied cache into memory, if applicable
51
- let cacheContext;
52
- if (clientConfiguration.serializableCache &&
53
- clientConfiguration.persistencePlugin) {
54
- cacheContext = new msalCommon.TokenCacheContext(clientConfiguration.serializableCache, false);
55
- await clientConfiguration.persistencePlugin.beforeCacheAccess(cacheContext);
56
- }
57
- const cachedAccessToken = this.readAccessTokenFromCache(authority, managedIdentityConfiguration.managedIdentityId?.id ||
58
- clientConfiguration.authOptions.clientId, new msalCommon.ScopeSet(request.scopes || []), cacheManager);
59
- if (clientConfiguration.serializableCache &&
60
- clientConfiguration.persistencePlugin &&
61
- cacheContext) {
62
- await clientConfiguration.persistencePlugin.afterCacheAccess(cacheContext);
63
- }
64
- // must refresh due to non-existent access_token
65
- if (!cachedAccessToken) {
66
- serverTelemetryManager?.setCacheOutcome(msalCommon.CacheOutcome.NO_CACHED_ACCESS_TOKEN);
67
- return [null, msalCommon.CacheOutcome.NO_CACHED_ACCESS_TOKEN];
68
- }
69
- // must refresh due to the expires_in value
70
- if (msalCommon.TimeUtils.isTokenExpired(cachedAccessToken.expiresOn, clientConfiguration.systemOptions?.tokenRenewalOffsetSeconds ||
71
- msalCommon.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC)) {
72
- serverTelemetryManager?.setCacheOutcome(msalCommon.CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED);
73
- return [null, msalCommon.CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED];
74
- }
75
- // must refresh (in the background) due to the refresh_in value
76
- if (cachedAccessToken.refreshOn &&
77
- msalCommon.TimeUtils.isTokenExpired(cachedAccessToken.refreshOn.toString(), 0)) {
78
- lastCacheOutcome = msalCommon.CacheOutcome.PROACTIVELY_REFRESHED;
79
- serverTelemetryManager?.setCacheOutcome(msalCommon.CacheOutcome.PROACTIVELY_REFRESHED);
80
- }
81
- return [
82
- await msalCommon.ResponseHandler.generateAuthenticationResult(cryptoUtils, authority, {
83
- account: null,
84
- idToken: null,
85
- accessToken: cachedAccessToken,
86
- refreshToken: null,
87
- appMetadata: null,
88
- }, true, request),
89
- lastCacheOutcome,
90
- ];
91
- }
92
- /**
93
- * Reads access token from the cache
94
- */
95
- readAccessTokenFromCache(authority, id, scopeSet, cacheManager) {
96
- const accessTokenFilter = {
97
- homeAccountId: msalCommon.Constants.EMPTY_STRING,
98
- environment: authority.canonicalAuthorityUrlComponents.HostNameAndPort,
99
- credentialType: msalCommon.CredentialType.ACCESS_TOKEN,
100
- clientId: id,
101
- realm: authority.tenant,
102
- target: msalCommon.ScopeSet.createSearchScopes(scopeSet.asArray()),
103
- };
104
- const accessTokens = cacheManager.getAccessTokensByFilter(accessTokenFilter);
105
- if (accessTokens.length < 1) {
106
- return null;
107
- }
108
- else if (accessTokens.length > 1) {
109
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.multipleMatchingTokens);
110
- }
111
- return accessTokens[0];
112
- }
113
- /**
114
- * Makes a network call to request the token from the service
115
- * @param request
116
- * @param authority
117
- */
118
- async executeTokenRequest(request, authority, refreshAccessToken) {
119
- let serverTokenResponse;
120
- let reqTimestamp;
121
- if (this.appTokenProvider) {
122
- this.logger.info("Using appTokenProvider extensibility.");
123
- const appTokenPropviderParameters = {
124
- correlationId: request.correlationId,
125
- tenantId: this.config.authOptions.authority.tenant,
126
- scopes: request.scopes,
127
- claims: request.claims,
128
- };
129
- reqTimestamp = msalCommon.TimeUtils.nowSeconds();
130
- const appTokenProviderResult = await this.appTokenProvider(appTokenPropviderParameters);
131
- serverTokenResponse = {
132
- access_token: appTokenProviderResult.accessToken,
133
- expires_in: appTokenProviderResult.expiresInSeconds,
134
- refresh_in: appTokenProviderResult.refreshInSeconds,
135
- token_type: msalCommon.AuthenticationScheme.BEARER,
136
- };
137
- }
138
- else {
139
- const queryParametersString = this.createTokenQueryParameters(request);
140
- const endpoint = msalCommon.UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);
141
- const requestBody = await this.createTokenRequestBody(request);
142
- const headers = this.createTokenRequestHeaders();
143
- const thumbprint = {
144
- clientId: this.config.authOptions.clientId,
145
- authority: request.authority,
146
- scopes: request.scopes,
147
- claims: request.claims,
148
- authenticationScheme: request.authenticationScheme,
149
- resourceRequestMethod: request.resourceRequestMethod,
150
- resourceRequestUri: request.resourceRequestUri,
151
- shrClaims: request.shrClaims,
152
- sshKid: request.sshKid,
153
- };
154
- this.logger.info("Sending token request to endpoint: " + authority.tokenEndpoint);
155
- reqTimestamp = msalCommon.TimeUtils.nowSeconds();
156
- const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
157
- serverTokenResponse = response.body;
158
- serverTokenResponse.status = response.status;
159
- }
160
- const responseHandler = new msalCommon.ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
161
- responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken);
162
- const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request);
163
- return tokenResponse;
164
- }
165
- /**
166
- * generate the request to the server in the acceptable format
167
- * @param request
168
- */
169
- async createTokenRequestBody(request) {
170
- const parameterBuilder = new msalCommon.RequestParameterBuilder();
171
- parameterBuilder.addClientId(this.config.authOptions.clientId);
172
- parameterBuilder.addScopes(request.scopes, false);
173
- parameterBuilder.addGrantType(msalCommon.GrantType.CLIENT_CREDENTIALS_GRANT);
174
- parameterBuilder.addLibraryInfo(this.config.libraryInfo);
175
- parameterBuilder.addApplicationTelemetry(this.config.telemetry.application);
176
- parameterBuilder.addThrottling();
177
- if (this.serverTelemetryManager) {
178
- parameterBuilder.addServerTelemetry(this.serverTelemetryManager);
179
- }
180
- const correlationId = request.correlationId ||
181
- this.config.cryptoInterface.createNewGuid();
182
- parameterBuilder.addCorrelationId(correlationId);
183
- if (this.config.clientCredentials.clientSecret) {
184
- parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);
185
- }
186
- // Use clientAssertion from request, fallback to client assertion in base configuration
187
- const clientAssertion = request.clientAssertion ||
188
- this.config.clientCredentials.clientAssertion;
189
- if (clientAssertion) {
190
- parameterBuilder.addClientAssertion(await msalCommon.getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri));
191
- parameterBuilder.addClientAssertionType(clientAssertion.assertionType);
192
- }
193
- if (!msalCommon.StringUtils.isEmptyObj(request.claims) ||
194
- (this.config.authOptions.clientCapabilities &&
195
- this.config.authOptions.clientCapabilities.length > 0)) {
196
- parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
197
- }
198
- return parameterBuilder.createQueryString();
199
- }
200
- }
201
-
202
- exports.ClientCredentialClient = ClientCredentialClient;
203
- //# 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,qBAAqB,EAAE;AACzD,gBAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,8JAA8J,CACjK,CAAC;;gBAGF,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,gBAAA,MAA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*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var ClientApplication = require('./ClientApplication.cjs');
6
- var ClientAssertion = require('./ClientAssertion.cjs');
7
- var Constants = require('../utils/Constants.cjs');
8
- var msalCommon = require('@azure/msal-common');
9
- var ClientCredentialClient = require('./ClientCredentialClient.cjs');
10
- var OnBehalfOfClient = require('./OnBehalfOfClient.cjs');
11
-
12
- /*
13
- * Copyright (c) Microsoft Corporation. All rights reserved.
14
- * Licensed under the MIT License.
15
- */
16
- // AADAuthorityConstants
17
- /**
18
- * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications
19
- * will configure application secrets, client certificates/assertions as applicable
20
- * @public
21
- */
22
- class ConfidentialClientApplication extends ClientApplication.ClientApplication {
23
- /**
24
- * Constructor for the ConfidentialClientApplication
25
- *
26
- * Required attributes in the Configuration object are:
27
- * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal
28
- * - authority: the authority URL for your application.
29
- * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal.
30
- *
31
- * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
32
- * 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).
33
- * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
34
- * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
35
- * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
36
- *
37
- * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/
38
- * Full B2C functionality will be available in this library in future versions.
39
- *
40
- * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance
41
- */
42
- constructor(configuration) {
43
- super(configuration);
44
- this.setClientCredential();
45
- this.appTokenProvider = undefined;
46
- }
47
- /**
48
- * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and
49
- * is meant for Azure SDK to enhance Managed Identity support.
50
- *
51
- * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source.
52
- */
53
- SetAppTokenProvider(provider) {
54
- this.appTokenProvider = provider;
55
- }
56
- /**
57
- * Acquires tokens from the authority for the application (not for an end user).
58
- */
59
- async acquireTokenByClientCredential(request) {
60
- this.logger.info("acquireTokenByClientCredential called", request.correlationId);
61
- // If there is a client assertion present in the request, it overrides the one present in the client configuration
62
- let clientAssertion;
63
- if (request.clientAssertion) {
64
- clientAssertion = {
65
- assertion: await msalCommon.getClientAssertion(request.clientAssertion, this.config.auth.clientId
66
- // tokenEndpoint will be undefined. resourceRequestUri is omitted in ClientCredentialRequest
67
- ),
68
- assertionType: Constants.Constants.JWT_BEARER_ASSERTION_TYPE,
69
- };
70
- }
71
- const baseRequest = await this.initializeBaseRequest(request);
72
- // valid base request should not contain oidc scopes in this grant type
73
- const validBaseRequest = {
74
- ...baseRequest,
75
- scopes: baseRequest.scopes.filter((scope) => !msalCommon.OIDC_DEFAULT_SCOPES.includes(scope)),
76
- };
77
- const validRequest = {
78
- ...request,
79
- ...validBaseRequest,
80
- clientAssertion,
81
- };
82
- /*
83
- * valid request should not have "common" or "organizations" in lieu of the tenant_id in the authority in the auth configuration
84
- * example authority: "https://login.microsoftonline.com/TenantId",
85
- */
86
- const authority = new msalCommon.UrlString(validRequest.authority);
87
- const tenantId = authority.getUrlComponents().PathSegments[0];
88
- if (Object.values(msalCommon.AADAuthorityConstants).includes(tenantId)) {
89
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.missingTenantIdError);
90
- }
91
- const azureRegionConfiguration = {
92
- azureRegion: validRequest.azureRegion,
93
- environmentRegion: process.env[Constants.REGION_ENVIRONMENT_VARIABLE],
94
- };
95
- const serverTelemetryManager = this.initializeServerTelemetryManager(Constants.ApiId.acquireTokenByClientCredential, validRequest.correlationId, validRequest.skipCache);
96
- try {
97
- const clientCredentialConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, azureRegionConfiguration, request.azureCloudOptions);
98
- const clientCredentialClient = new ClientCredentialClient.ClientCredentialClient(clientCredentialConfig, this.appTokenProvider);
99
- this.logger.verbose("Client credential client created", validRequest.correlationId);
100
- return await clientCredentialClient.acquireToken(validRequest);
101
- }
102
- catch (e) {
103
- if (e instanceof msalCommon.AuthError) {
104
- e.setCorrelationId(validRequest.correlationId);
105
- }
106
- serverTelemetryManager.cacheFailedRequest(e);
107
- throw e;
108
- }
109
- }
110
- /**
111
- * Acquires tokens from the authority for the application.
112
- *
113
- * Used in scenarios where the current app is a middle-tier service which was called with a token
114
- * representing an end user. The current app can use the token (oboAssertion) to request another
115
- * token to access downstream web API, on behalf of that user.
116
- *
117
- * The current middle-tier app has no user interaction to obtain consent.
118
- * See how to gain consent upfront for your middle-tier app from this article.
119
- * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application
120
- */
121
- async acquireTokenOnBehalfOf(request) {
122
- this.logger.info("acquireTokenOnBehalfOf called", request.correlationId);
123
- const validRequest = {
124
- ...request,
125
- ...(await this.initializeBaseRequest(request)),
126
- };
127
- try {
128
- const onBehalfOfConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, undefined, undefined, request.azureCloudOptions);
129
- const oboClient = new OnBehalfOfClient.OnBehalfOfClient(onBehalfOfConfig);
130
- this.logger.verbose("On behalf of client created", validRequest.correlationId);
131
- return await oboClient.acquireToken(validRequest);
132
- }
133
- catch (e) {
134
- if (e instanceof msalCommon.AuthError) {
135
- e.setCorrelationId(validRequest.correlationId);
136
- }
137
- throw e;
138
- }
139
- }
140
- setClientCredential() {
141
- const clientSecretNotEmpty = !!this.config.auth.clientSecret;
142
- const clientAssertionNotEmpty = !!this.config.auth.clientAssertion;
143
- const certificateNotEmpty = (!!this.config.auth.clientCertificate?.thumbprint ||
144
- !!this.config.auth.clientCertificate?.thumbprintSha256) &&
145
- !!this.config.auth.clientCertificate?.privateKey;
146
- /*
147
- * If app developer configures this callback, they don't need a credential
148
- * i.e. AzureSDK can get token from Managed Identity without a cert / secret
149
- */
150
- if (this.appTokenProvider) {
151
- return;
152
- }
153
- // Check that at most one credential is set on the application
154
- if ((clientSecretNotEmpty && clientAssertionNotEmpty) ||
155
- (clientAssertionNotEmpty && certificateNotEmpty) ||
156
- (clientSecretNotEmpty && certificateNotEmpty)) {
157
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidClientCredential);
158
- }
159
- if (this.config.auth.clientSecret) {
160
- this.clientSecret = this.config.auth.clientSecret;
161
- return;
162
- }
163
- if (this.config.auth.clientAssertion) {
164
- this.developerProvidedClientAssertion =
165
- this.config.auth.clientAssertion;
166
- return;
167
- }
168
- if (!certificateNotEmpty) {
169
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidClientCredential);
170
- }
171
- else {
172
- this.clientAssertion = !!this.config.auth.clientCertificate
173
- .thumbprintSha256
174
- ? ClientAssertion.ClientAssertion.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c)
175
- : ClientAssertion.ClientAssertion.fromCertificate(
176
- // guaranteed to be a string, due to prior error checking in this function
177
- this.config.auth.clientCertificate.thumbprint, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c);
178
- }
179
- }
180
- }
181
-
182
- exports.ConfidentialClientApplication = ConfidentialClientApplication;
183
- //# 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","create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BAAiB,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,216 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
-
7
- /*
8
- * Copyright (c) Microsoft Corporation. All rights reserved.
9
- * Licensed under the MIT License.
10
- */
11
- /**
12
- * OAuth2.0 Device code client
13
- */
14
- class DeviceCodeClient extends msalCommon.BaseClient {
15
- constructor(configuration) {
16
- super(configuration);
17
- }
18
- /**
19
- * Gets device code from device code endpoint, calls back to with device code response, and
20
- * polls token endpoint to exchange device code for tokens
21
- * @param request
22
- */
23
- async acquireToken(request) {
24
- const deviceCodeResponse = await this.getDeviceCode(request);
25
- request.deviceCodeCallback(deviceCodeResponse);
26
- const reqTimestamp = msalCommon.TimeUtils.nowSeconds();
27
- const response = await this.acquireTokenWithDeviceCode(request, deviceCodeResponse);
28
- const responseHandler = new msalCommon.ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
29
- // Validate response. This function throws a server error if an error is returned by the server.
30
- responseHandler.validateTokenResponse(response);
31
- return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request);
32
- }
33
- /**
34
- * Creates device code request and executes http GET
35
- * @param request
36
- */
37
- async getDeviceCode(request) {
38
- const queryParametersString = this.createExtraQueryParameters(request);
39
- const endpoint = msalCommon.UrlString.appendQueryString(this.authority.deviceCodeEndpoint, queryParametersString);
40
- const queryString = this.createQueryString(request);
41
- const headers = this.createTokenRequestHeaders();
42
- const thumbprint = {
43
- clientId: this.config.authOptions.clientId,
44
- authority: request.authority,
45
- scopes: request.scopes,
46
- claims: request.claims,
47
- authenticationScheme: request.authenticationScheme,
48
- resourceRequestMethod: request.resourceRequestMethod,
49
- resourceRequestUri: request.resourceRequestUri,
50
- shrClaims: request.shrClaims,
51
- sshKid: request.sshKid,
52
- };
53
- return this.executePostRequestToDeviceCodeEndpoint(endpoint, queryString, headers, thumbprint);
54
- }
55
- /**
56
- * Creates query string for the device code request
57
- * @param request
58
- */
59
- createExtraQueryParameters(request) {
60
- const parameterBuilder = new msalCommon.RequestParameterBuilder();
61
- if (request.extraQueryParameters) {
62
- parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);
63
- }
64
- return parameterBuilder.createQueryString();
65
- }
66
- /**
67
- * Executes POST request to device code endpoint
68
- * @param deviceCodeEndpoint
69
- * @param queryString
70
- * @param headers
71
- */
72
- async executePostRequestToDeviceCodeEndpoint(deviceCodeEndpoint, queryString, headers, thumbprint) {
73
- const { body: { user_code: userCode, device_code: deviceCode, verification_uri: verificationUri, expires_in: expiresIn, interval, message, }, } = await this.networkManager.sendPostRequest(thumbprint, deviceCodeEndpoint, {
74
- body: queryString,
75
- headers: headers,
76
- });
77
- return {
78
- userCode,
79
- deviceCode,
80
- verificationUri,
81
- expiresIn,
82
- interval,
83
- message,
84
- };
85
- }
86
- /**
87
- * Create device code endpoint query parameters and returns string
88
- */
89
- createQueryString(request) {
90
- const parameterBuilder = new msalCommon.RequestParameterBuilder();
91
- parameterBuilder.addScopes(request.scopes);
92
- parameterBuilder.addClientId(this.config.authOptions.clientId);
93
- if (request.extraQueryParameters) {
94
- parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);
95
- }
96
- if (request.claims ||
97
- (this.config.authOptions.clientCapabilities &&
98
- this.config.authOptions.clientCapabilities.length > 0)) {
99
- parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
100
- }
101
- return parameterBuilder.createQueryString();
102
- }
103
- /**
104
- * Breaks the polling with specific conditions.
105
- * @param request CommonDeviceCodeRequest
106
- * @param deviceCodeResponse DeviceCodeResponse
107
- */
108
- continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, userSpecifiedCancelFlag) {
109
- if (userSpecifiedCancelFlag) {
110
- this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true");
111
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.deviceCodePollingCancelled);
112
- }
113
- else if (userSpecifiedTimeout &&
114
- userSpecifiedTimeout < deviceCodeExpirationTime &&
115
- msalCommon.TimeUtils.nowSeconds() > userSpecifiedTimeout) {
116
- this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`);
117
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.userTimeoutReached);
118
- }
119
- else if (msalCommon.TimeUtils.nowSeconds() > deviceCodeExpirationTime) {
120
- if (userSpecifiedTimeout) {
121
- 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}`);
122
- }
123
- this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`);
124
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.deviceCodeExpired);
125
- }
126
- return true;
127
- }
128
- /**
129
- * Creates token request with device code response and polls token endpoint at interval set by the device code
130
- * response
131
- * @param request
132
- * @param deviceCodeResponse
133
- */
134
- async acquireTokenWithDeviceCode(request, deviceCodeResponse) {
135
- const queryParametersString = this.createTokenQueryParameters(request);
136
- const endpoint = msalCommon.UrlString.appendQueryString(this.authority.tokenEndpoint, queryParametersString);
137
- const requestBody = this.createTokenRequestBody(request, deviceCodeResponse);
138
- const headers = this.createTokenRequestHeaders();
139
- const userSpecifiedTimeout = request.timeout
140
- ? msalCommon.TimeUtils.nowSeconds() + request.timeout
141
- : undefined;
142
- const deviceCodeExpirationTime = msalCommon.TimeUtils.nowSeconds() + deviceCodeResponse.expiresIn;
143
- const pollingIntervalMilli = deviceCodeResponse.interval * 1000;
144
- /*
145
- * Poll token endpoint while (device code is not expired AND operation has not been cancelled by
146
- * setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli
147
- */
148
- while (this.continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, request.cancel)) {
149
- const thumbprint = {
150
- clientId: this.config.authOptions.clientId,
151
- authority: request.authority,
152
- scopes: request.scopes,
153
- claims: request.claims,
154
- authenticationScheme: request.authenticationScheme,
155
- resourceRequestMethod: request.resourceRequestMethod,
156
- resourceRequestUri: request.resourceRequestUri,
157
- shrClaims: request.shrClaims,
158
- sshKid: request.sshKid,
159
- };
160
- const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
161
- if (response.body && response.body.error) {
162
- // user authorization is pending. Sleep for polling interval and try again
163
- if (response.body.error === msalCommon.Constants.AUTHORIZATION_PENDING) {
164
- this.logger.info("Authorization pending. Continue polling.");
165
- await msalCommon.TimeUtils.delay(pollingIntervalMilli);
166
- }
167
- else {
168
- // for any other error, throw
169
- this.logger.info("Unexpected error in polling from the server");
170
- throw msalCommon.createAuthError(msalCommon.AuthErrorCodes.postRequestFailed, response.body.error);
171
- }
172
- }
173
- else {
174
- this.logger.verbose("Authorization completed successfully. Polling stopped.");
175
- return response.body;
176
- }
177
- }
178
- /*
179
- * The above code should've thrown by this point, but to satisfy TypeScript,
180
- * and in the rare case the conditionals in continuePolling() may not catch everything...
181
- */
182
- this.logger.error("Polling stopped for unknown reasons.");
183
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.deviceCodeUnknownError);
184
- }
185
- /**
186
- * Creates query parameters and converts to string.
187
- * @param request
188
- * @param deviceCodeResponse
189
- */
190
- createTokenRequestBody(request, deviceCodeResponse) {
191
- const requestParameters = new msalCommon.RequestParameterBuilder();
192
- requestParameters.addScopes(request.scopes);
193
- requestParameters.addClientId(this.config.authOptions.clientId);
194
- requestParameters.addGrantType(msalCommon.GrantType.DEVICE_CODE_GRANT);
195
- requestParameters.addDeviceCode(deviceCodeResponse.deviceCode);
196
- const correlationId = request.correlationId ||
197
- this.config.cryptoInterface.createNewGuid();
198
- requestParameters.addCorrelationId(correlationId);
199
- requestParameters.addClientInfo();
200
- requestParameters.addLibraryInfo(this.config.libraryInfo);
201
- requestParameters.addApplicationTelemetry(this.config.telemetry.application);
202
- requestParameters.addThrottling();
203
- if (this.serverTelemetryManager) {
204
- requestParameters.addServerTelemetry(this.serverTelemetryManager);
205
- }
206
- if (!msalCommon.StringUtils.isEmptyObj(request.claims) ||
207
- (this.config.authOptions.clientCapabilities &&
208
- this.config.authOptions.clientCapabilities.length > 0)) {
209
- requestParameters.addClaims(request.claims, this.config.authOptions.clientCapabilities);
210
- }
211
- return requestParameters.createQueryString();
212
- }
213
- }
214
-
215
- exports.DeviceCodeClient = DeviceCodeClient;
216
- //# 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,aAAkC,EAAA;QAC1C,KAAK,CAAC,aAAa,CAAC,CAAC;KACxB;AAED;;;;AAIG;IACI,MAAM,YAAY,CACrB,OAAgC,EAAA;QAEhC,MAAM,kBAAkB,GAAuB,MAAM,IAAI,CAAC,aAAa,CACnE,OAAO,CACV,CAAC;AACF,QAAA,OAAO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