@azure/msal-node 5.1.5 → 5.2.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 (361) hide show
  1. package/dist/cache/CacheHelpers.mjs +1 -1
  2. package/dist/cache/NodeStorage.mjs +1 -1
  3. package/dist/cache/TokenCache.mjs +1 -1
  4. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  5. package/dist/cache/serializer/Deserializer.mjs +1 -1
  6. package/dist/cache/serializer/Serializer.mjs +1 -1
  7. package/dist/client/BaseClient.mjs +1 -1
  8. package/dist/client/ClientApplication.mjs +1 -1
  9. package/dist/client/ClientAssertion.mjs +1 -1
  10. package/dist/client/ClientCredentialClient.mjs +1 -1
  11. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  12. package/dist/client/DeviceCodeClient.mjs +1 -1
  13. package/dist/client/ManagedIdentityApplication.mjs +1 -1
  14. package/dist/client/ManagedIdentityClient.mjs +1 -1
  15. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  16. package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
  17. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +9 -1
  18. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  19. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  20. package/dist/client/ManagedIdentitySources/Imds.mjs +8 -2
  21. package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
  22. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
  23. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  24. package/dist/client/OnBehalfOfClient.mjs +1 -1
  25. package/dist/client/PublicClientApplication.mjs +1 -1
  26. package/dist/client/UsernamePasswordClient.mjs +1 -1
  27. package/dist/config/Configuration.mjs +1 -1
  28. package/dist/config/ManagedIdentityId.mjs +1 -1
  29. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  30. package/dist/crypto/CryptoProvider.mjs +1 -1
  31. package/dist/crypto/GuidGenerator.mjs +1 -1
  32. package/dist/crypto/HashUtils.mjs +1 -1
  33. package/dist/crypto/PkceGenerator.mjs +1 -1
  34. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  35. package/dist/error/ManagedIdentityError.mjs +1 -1
  36. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  37. package/dist/error/NodeAuthError.mjs +1 -1
  38. package/dist/index.mjs +1 -1
  39. package/dist/internals.mjs +1 -1
  40. package/dist/network/HttpClient.mjs +1 -1
  41. package/dist/network/HttpClientWithRetries.mjs +1 -1
  42. package/dist/network/LoopbackClient.mjs +1 -1
  43. package/dist/packageMetadata.mjs +2 -2
  44. package/dist/protocol/Authorize.mjs +1 -1
  45. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  46. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  47. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  48. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  49. package/dist/utils/Constants.mjs +6 -1
  50. package/dist/utils/Constants.mjs.map +1 -1
  51. package/dist/utils/EncodingUtils.mjs +1 -1
  52. package/dist/utils/TimeUtils.mjs +1 -1
  53. package/lib/msal-node.cjs +79 -63
  54. package/lib/msal-node.cjs.map +1 -1
  55. package/package.json +9 -7
  56. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +9 -0
  57. package/src/client/ManagedIdentitySources/Imds.ts +7 -0
  58. package/src/packageMetadata.ts +1 -1
  59. package/src/utils/Constants.ts +4 -0
  60. package/{dist → types}/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +6 -0
  61. package/{dist → types}/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  62. package/{dist → types}/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  63. package/types/index.d.cts +1 -0
  64. package/types/packageMetadata.d.ts +3 -0
  65. package/{lib/types → types}/utils/Constants.d.ts +3 -0
  66. package/{lib/types → types}/utils/Constants.d.ts.map +1 -1
  67. package/dist/packageMetadata.d.ts +0 -3
  68. package/dist/utils/Constants.d.ts +0 -156
  69. package/dist/utils/Constants.d.ts.map +0 -1
  70. package/lib/types/cache/CacheHelpers.d.ts +0 -4
  71. package/lib/types/cache/CacheHelpers.d.ts.map +0 -1
  72. package/lib/types/cache/ITokenCache.d.ts +0 -16
  73. package/lib/types/cache/ITokenCache.d.ts.map +0 -1
  74. package/lib/types/cache/NodeStorage.d.ts +0 -191
  75. package/lib/types/cache/NodeStorage.d.ts.map +0 -1
  76. package/lib/types/cache/TokenCache.d.ts +0 -99
  77. package/lib/types/cache/TokenCache.d.ts.map +0 -1
  78. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts +0 -23
  79. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +0 -1
  80. package/lib/types/cache/distributed/ICacheClient.d.ts +0 -22
  81. package/lib/types/cache/distributed/ICacheClient.d.ts.map +0 -1
  82. package/lib/types/cache/distributed/IPartitionManager.d.ts +0 -33
  83. package/lib/types/cache/distributed/IPartitionManager.d.ts.map +0 -1
  84. package/lib/types/cache/serializer/Deserializer.d.ts +0 -44
  85. package/lib/types/cache/serializer/Deserializer.d.ts.map +0 -1
  86. package/lib/types/cache/serializer/Serializer.d.ts +0 -44
  87. package/lib/types/cache/serializer/Serializer.d.ts.map +0 -1
  88. package/lib/types/cache/serializer/SerializerTypes.d.ts +0 -102
  89. package/lib/types/cache/serializer/SerializerTypes.d.ts.map +0 -1
  90. package/lib/types/client/BaseClient.d.ts +0 -42
  91. package/lib/types/client/BaseClient.d.ts.map +0 -1
  92. package/lib/types/client/ClientApplication.d.ts +0 -146
  93. package/lib/types/client/ClientApplication.d.ts.map +0 -1
  94. package/lib/types/client/ClientAssertion.d.ts +0 -56
  95. package/lib/types/client/ClientAssertion.d.ts.map +0 -1
  96. package/lib/types/client/ClientCredentialClient.d.ts +0 -37
  97. package/lib/types/client/ClientCredentialClient.d.ts.map +0 -1
  98. package/lib/types/client/ConfidentialClientApplication.d.ts +0 -58
  99. package/lib/types/client/ConfidentialClientApplication.d.ts.map +0 -1
  100. package/lib/types/client/DeviceCodeClient.d.ts +0 -60
  101. package/lib/types/client/DeviceCodeClient.d.ts.map +0 -1
  102. package/lib/types/client/IConfidentialClientApplication.d.ts +0 -43
  103. package/lib/types/client/IConfidentialClientApplication.d.ts.map +0 -1
  104. package/lib/types/client/IPublicClientApplication.d.ts +0 -46
  105. package/lib/types/client/IPublicClientApplication.d.ts.map +0 -1
  106. package/lib/types/client/ManagedIdentityApplication.d.ts +0 -42
  107. package/lib/types/client/ManagedIdentityApplication.d.ts.map +0 -1
  108. package/lib/types/client/ManagedIdentityClient.d.ts +0 -29
  109. package/lib/types/client/ManagedIdentityClient.d.ts.map +0 -1
  110. package/lib/types/client/ManagedIdentitySources/AppService.d.ts +0 -72
  111. package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +0 -1
  112. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +0 -109
  113. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +0 -1
  114. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +0 -125
  115. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +0 -1
  116. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +0 -71
  117. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +0 -1
  118. package/lib/types/client/ManagedIdentitySources/Imds.d.ts +0 -67
  119. package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +0 -1
  120. package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts +0 -81
  121. package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts.map +0 -1
  122. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +0 -82
  123. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +0 -1
  124. package/lib/types/client/OnBehalfOfClient.d.ts +0 -50
  125. package/lib/types/client/OnBehalfOfClient.d.ts.map +0 -1
  126. package/lib/types/client/PublicClientApplication.d.ts +0 -85
  127. package/lib/types/client/PublicClientApplication.d.ts.map +0 -1
  128. package/lib/types/client/UsernamePasswordClient.d.ts +0 -30
  129. package/lib/types/client/UsernamePasswordClient.d.ts.map +0 -1
  130. package/lib/types/config/Configuration.d.ts +0 -131
  131. package/lib/types/config/Configuration.d.ts.map +0 -1
  132. package/lib/types/config/ManagedIdentityId.d.ts +0 -12
  133. package/lib/types/config/ManagedIdentityId.d.ts.map +0 -1
  134. package/lib/types/config/ManagedIdentityRequestParameters.d.ts +0 -13
  135. package/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +0 -1
  136. package/lib/types/crypto/CryptoProvider.d.ts +0 -63
  137. package/lib/types/crypto/CryptoProvider.d.ts.map +0 -1
  138. package/lib/types/crypto/GuidGenerator.d.ts +0 -14
  139. package/lib/types/crypto/GuidGenerator.d.ts.map +0 -1
  140. package/lib/types/crypto/HashUtils.d.ts +0 -10
  141. package/lib/types/crypto/HashUtils.d.ts.map +0 -1
  142. package/lib/types/crypto/PkceGenerator.d.ts +0 -23
  143. package/lib/types/crypto/PkceGenerator.d.ts.map +0 -1
  144. package/lib/types/error/ClientAuthErrorCodes.d.ts +0 -8
  145. package/lib/types/error/ClientAuthErrorCodes.d.ts.map +0 -1
  146. package/lib/types/error/ManagedIdentityError.d.ts +0 -31
  147. package/lib/types/error/ManagedIdentityError.d.ts.map +0 -1
  148. package/lib/types/error/ManagedIdentityErrorCodes.d.ts +0 -23
  149. package/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +0 -1
  150. package/lib/types/error/NodeAuthError.d.ts +0 -82
  151. package/lib/types/error/NodeAuthError.d.ts.map +0 -1
  152. package/lib/types/index.d.ts +0 -54
  153. package/lib/types/index.d.ts.map +0 -1
  154. package/lib/types/internals.d.ts +0 -7
  155. package/lib/types/internals.d.ts.map +0 -1
  156. package/lib/types/network/HttpClient.d.ts +0 -66
  157. package/lib/types/network/HttpClient.d.ts.map +0 -1
  158. package/lib/types/network/HttpClientWithRetries.d.ts +0 -13
  159. package/lib/types/network/HttpClientWithRetries.d.ts.map +0 -1
  160. package/lib/types/network/ILoopbackClient.d.ts +0 -11
  161. package/lib/types/network/ILoopbackClient.d.ts.map +0 -1
  162. package/lib/types/network/LoopbackClient.d.ts +0 -22
  163. package/lib/types/network/LoopbackClient.d.ts.map +0 -1
  164. package/lib/types/packageMetadata.d.ts +0 -3
  165. package/lib/types/packageMetadata.d.ts.map +0 -1
  166. package/lib/types/protocol/Authorize.d.ts +0 -12
  167. package/lib/types/protocol/Authorize.d.ts.map +0 -1
  168. package/lib/types/request/AuthorizationCodeRequest.d.ts +0 -24
  169. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +0 -1
  170. package/lib/types/request/AuthorizationUrlRequest.d.ts +0 -16
  171. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +0 -1
  172. package/lib/types/request/ClientCredentialRequest.d.ts +0 -13
  173. package/lib/types/request/ClientCredentialRequest.d.ts.map +0 -1
  174. package/lib/types/request/CommonClientCredentialRequest.d.ts +0 -19
  175. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +0 -1
  176. package/lib/types/request/CommonDeviceCodeRequest.d.ts +0 -23
  177. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +0 -1
  178. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +0 -15
  179. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +0 -1
  180. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +0 -16
  181. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +0 -1
  182. package/lib/types/request/DeviceCodeRequest.d.ts +0 -17
  183. package/lib/types/request/DeviceCodeRequest.d.ts.map +0 -1
  184. package/lib/types/request/InteractiveRequest.d.ts +0 -35
  185. package/lib/types/request/InteractiveRequest.d.ts.map +0 -1
  186. package/lib/types/request/ManagedIdentityRequest.d.ts +0 -16
  187. package/lib/types/request/ManagedIdentityRequest.d.ts.map +0 -1
  188. package/lib/types/request/ManagedIdentityRequestParams.d.ts +0 -19
  189. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +0 -1
  190. package/lib/types/request/OnBehalfOfRequest.d.ts +0 -16
  191. package/lib/types/request/OnBehalfOfRequest.d.ts.map +0 -1
  192. package/lib/types/request/RefreshTokenRequest.d.ts +0 -20
  193. package/lib/types/request/RefreshTokenRequest.d.ts.map +0 -1
  194. package/lib/types/request/SignOutRequest.d.ts +0 -7
  195. package/lib/types/request/SignOutRequest.d.ts.map +0 -1
  196. package/lib/types/request/SilentFlowRequest.d.ts +0 -16
  197. package/lib/types/request/SilentFlowRequest.d.ts.map +0 -1
  198. package/lib/types/request/UsernamePasswordRequest.d.ts +0 -21
  199. package/lib/types/request/UsernamePasswordRequest.d.ts.map +0 -1
  200. package/lib/types/response/ManagedIdentityTokenResponse.d.ts +0 -35
  201. package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +0 -1
  202. package/lib/types/retry/DefaultManagedIdentityRetryPolicy.d.ts +0 -11
  203. package/lib/types/retry/DefaultManagedIdentityRetryPolicy.d.ts.map +0 -1
  204. package/lib/types/retry/ExponentialRetryStrategy.d.ts +0 -23
  205. package/lib/types/retry/ExponentialRetryStrategy.d.ts.map +0 -1
  206. package/lib/types/retry/IHttpRetryPolicy.d.ts +0 -16
  207. package/lib/types/retry/IHttpRetryPolicy.d.ts.map +0 -1
  208. package/lib/types/retry/ImdsRetryPolicy.d.ts +0 -22
  209. package/lib/types/retry/ImdsRetryPolicy.d.ts.map +0 -1
  210. package/lib/types/retry/LinearRetryStrategy.d.ts +0 -14
  211. package/lib/types/retry/LinearRetryStrategy.d.ts.map +0 -1
  212. package/lib/types/utils/EncodingUtils.d.ts +0 -27
  213. package/lib/types/utils/EncodingUtils.d.ts.map +0 -1
  214. package/lib/types/utils/NetworkUtils.d.ts +0 -17
  215. package/lib/types/utils/NetworkUtils.d.ts.map +0 -1
  216. package/lib/types/utils/TimeUtils.d.ts +0 -9
  217. package/lib/types/utils/TimeUtils.d.ts.map +0 -1
  218. /package/{dist → types}/cache/CacheHelpers.d.ts +0 -0
  219. /package/{dist → types}/cache/CacheHelpers.d.ts.map +0 -0
  220. /package/{dist → types}/cache/ITokenCache.d.ts +0 -0
  221. /package/{dist → types}/cache/ITokenCache.d.ts.map +0 -0
  222. /package/{dist → types}/cache/NodeStorage.d.ts +0 -0
  223. /package/{dist → types}/cache/NodeStorage.d.ts.map +0 -0
  224. /package/{dist → types}/cache/TokenCache.d.ts +0 -0
  225. /package/{dist → types}/cache/TokenCache.d.ts.map +0 -0
  226. /package/{dist → types}/cache/distributed/DistributedCachePlugin.d.ts +0 -0
  227. /package/{dist → types}/cache/distributed/DistributedCachePlugin.d.ts.map +0 -0
  228. /package/{dist → types}/cache/distributed/ICacheClient.d.ts +0 -0
  229. /package/{dist → types}/cache/distributed/ICacheClient.d.ts.map +0 -0
  230. /package/{dist → types}/cache/distributed/IPartitionManager.d.ts +0 -0
  231. /package/{dist → types}/cache/distributed/IPartitionManager.d.ts.map +0 -0
  232. /package/{dist → types}/cache/serializer/Deserializer.d.ts +0 -0
  233. /package/{dist → types}/cache/serializer/Deserializer.d.ts.map +0 -0
  234. /package/{dist → types}/cache/serializer/Serializer.d.ts +0 -0
  235. /package/{dist → types}/cache/serializer/Serializer.d.ts.map +0 -0
  236. /package/{dist → types}/cache/serializer/SerializerTypes.d.ts +0 -0
  237. /package/{dist → types}/cache/serializer/SerializerTypes.d.ts.map +0 -0
  238. /package/{dist → types}/client/BaseClient.d.ts +0 -0
  239. /package/{dist → types}/client/BaseClient.d.ts.map +0 -0
  240. /package/{dist → types}/client/ClientApplication.d.ts +0 -0
  241. /package/{dist → types}/client/ClientApplication.d.ts.map +0 -0
  242. /package/{dist → types}/client/ClientAssertion.d.ts +0 -0
  243. /package/{dist → types}/client/ClientAssertion.d.ts.map +0 -0
  244. /package/{dist → types}/client/ClientCredentialClient.d.ts +0 -0
  245. /package/{dist → types}/client/ClientCredentialClient.d.ts.map +0 -0
  246. /package/{dist → types}/client/ConfidentialClientApplication.d.ts +0 -0
  247. /package/{dist → types}/client/ConfidentialClientApplication.d.ts.map +0 -0
  248. /package/{dist → types}/client/DeviceCodeClient.d.ts +0 -0
  249. /package/{dist → types}/client/DeviceCodeClient.d.ts.map +0 -0
  250. /package/{dist → types}/client/IConfidentialClientApplication.d.ts +0 -0
  251. /package/{dist → types}/client/IConfidentialClientApplication.d.ts.map +0 -0
  252. /package/{dist → types}/client/IPublicClientApplication.d.ts +0 -0
  253. /package/{dist → types}/client/IPublicClientApplication.d.ts.map +0 -0
  254. /package/{dist → types}/client/ManagedIdentityApplication.d.ts +0 -0
  255. /package/{dist → types}/client/ManagedIdentityApplication.d.ts.map +0 -0
  256. /package/{dist → types}/client/ManagedIdentityClient.d.ts +0 -0
  257. /package/{dist → types}/client/ManagedIdentityClient.d.ts.map +0 -0
  258. /package/{dist → types}/client/ManagedIdentitySources/AppService.d.ts +0 -0
  259. /package/{dist → types}/client/ManagedIdentitySources/AppService.d.ts.map +0 -0
  260. /package/{dist → types}/client/ManagedIdentitySources/AzureArc.d.ts +0 -0
  261. /package/{dist → types}/client/ManagedIdentitySources/AzureArc.d.ts.map +0 -0
  262. /package/{dist → types}/client/ManagedIdentitySources/CloudShell.d.ts +0 -0
  263. /package/{dist → types}/client/ManagedIdentitySources/CloudShell.d.ts.map +0 -0
  264. /package/{dist → types}/client/ManagedIdentitySources/Imds.d.ts +0 -0
  265. /package/{dist → types}/client/ManagedIdentitySources/MachineLearning.d.ts +0 -0
  266. /package/{dist → types}/client/ManagedIdentitySources/MachineLearning.d.ts.map +0 -0
  267. /package/{dist → types}/client/ManagedIdentitySources/ServiceFabric.d.ts +0 -0
  268. /package/{dist → types}/client/ManagedIdentitySources/ServiceFabric.d.ts.map +0 -0
  269. /package/{dist → types}/client/OnBehalfOfClient.d.ts +0 -0
  270. /package/{dist → types}/client/OnBehalfOfClient.d.ts.map +0 -0
  271. /package/{dist → types}/client/PublicClientApplication.d.ts +0 -0
  272. /package/{dist → types}/client/PublicClientApplication.d.ts.map +0 -0
  273. /package/{dist → types}/client/UsernamePasswordClient.d.ts +0 -0
  274. /package/{dist → types}/client/UsernamePasswordClient.d.ts.map +0 -0
  275. /package/{dist → types}/config/Configuration.d.ts +0 -0
  276. /package/{dist → types}/config/Configuration.d.ts.map +0 -0
  277. /package/{dist → types}/config/ManagedIdentityId.d.ts +0 -0
  278. /package/{dist → types}/config/ManagedIdentityId.d.ts.map +0 -0
  279. /package/{dist → types}/config/ManagedIdentityRequestParameters.d.ts +0 -0
  280. /package/{dist → types}/config/ManagedIdentityRequestParameters.d.ts.map +0 -0
  281. /package/{dist → types}/crypto/CryptoProvider.d.ts +0 -0
  282. /package/{dist → types}/crypto/CryptoProvider.d.ts.map +0 -0
  283. /package/{dist → types}/crypto/GuidGenerator.d.ts +0 -0
  284. /package/{dist → types}/crypto/GuidGenerator.d.ts.map +0 -0
  285. /package/{dist → types}/crypto/HashUtils.d.ts +0 -0
  286. /package/{dist → types}/crypto/HashUtils.d.ts.map +0 -0
  287. /package/{dist → types}/crypto/PkceGenerator.d.ts +0 -0
  288. /package/{dist → types}/crypto/PkceGenerator.d.ts.map +0 -0
  289. /package/{dist → types}/error/ClientAuthErrorCodes.d.ts +0 -0
  290. /package/{dist → types}/error/ClientAuthErrorCodes.d.ts.map +0 -0
  291. /package/{dist → types}/error/ManagedIdentityError.d.ts +0 -0
  292. /package/{dist → types}/error/ManagedIdentityError.d.ts.map +0 -0
  293. /package/{dist → types}/error/ManagedIdentityErrorCodes.d.ts +0 -0
  294. /package/{dist → types}/error/ManagedIdentityErrorCodes.d.ts.map +0 -0
  295. /package/{dist → types}/error/NodeAuthError.d.ts +0 -0
  296. /package/{dist → types}/error/NodeAuthError.d.ts.map +0 -0
  297. /package/{dist → types}/index.d.ts +0 -0
  298. /package/{dist → types}/index.d.ts.map +0 -0
  299. /package/{dist → types}/internals.d.ts +0 -0
  300. /package/{dist → types}/internals.d.ts.map +0 -0
  301. /package/{dist → types}/network/HttpClient.d.ts +0 -0
  302. /package/{dist → types}/network/HttpClient.d.ts.map +0 -0
  303. /package/{dist → types}/network/HttpClientWithRetries.d.ts +0 -0
  304. /package/{dist → types}/network/HttpClientWithRetries.d.ts.map +0 -0
  305. /package/{dist → types}/network/ILoopbackClient.d.ts +0 -0
  306. /package/{dist → types}/network/ILoopbackClient.d.ts.map +0 -0
  307. /package/{dist → types}/network/LoopbackClient.d.ts +0 -0
  308. /package/{dist → types}/network/LoopbackClient.d.ts.map +0 -0
  309. /package/{dist → types}/packageMetadata.d.ts.map +0 -0
  310. /package/{dist → types}/protocol/Authorize.d.ts +0 -0
  311. /package/{dist → types}/protocol/Authorize.d.ts.map +0 -0
  312. /package/{dist → types}/request/AuthorizationCodeRequest.d.ts +0 -0
  313. /package/{dist → types}/request/AuthorizationCodeRequest.d.ts.map +0 -0
  314. /package/{dist → types}/request/AuthorizationUrlRequest.d.ts +0 -0
  315. /package/{dist → types}/request/AuthorizationUrlRequest.d.ts.map +0 -0
  316. /package/{dist → types}/request/ClientCredentialRequest.d.ts +0 -0
  317. /package/{dist → types}/request/ClientCredentialRequest.d.ts.map +0 -0
  318. /package/{dist → types}/request/CommonClientCredentialRequest.d.ts +0 -0
  319. /package/{dist → types}/request/CommonClientCredentialRequest.d.ts.map +0 -0
  320. /package/{dist → types}/request/CommonDeviceCodeRequest.d.ts +0 -0
  321. /package/{dist → types}/request/CommonDeviceCodeRequest.d.ts.map +0 -0
  322. /package/{dist → types}/request/CommonOnBehalfOfRequest.d.ts +0 -0
  323. /package/{dist → types}/request/CommonOnBehalfOfRequest.d.ts.map +0 -0
  324. /package/{dist → types}/request/CommonUsernamePasswordRequest.d.ts +0 -0
  325. /package/{dist → types}/request/CommonUsernamePasswordRequest.d.ts.map +0 -0
  326. /package/{dist → types}/request/DeviceCodeRequest.d.ts +0 -0
  327. /package/{dist → types}/request/DeviceCodeRequest.d.ts.map +0 -0
  328. /package/{dist → types}/request/InteractiveRequest.d.ts +0 -0
  329. /package/{dist → types}/request/InteractiveRequest.d.ts.map +0 -0
  330. /package/{dist → types}/request/ManagedIdentityRequest.d.ts +0 -0
  331. /package/{dist → types}/request/ManagedIdentityRequest.d.ts.map +0 -0
  332. /package/{dist → types}/request/ManagedIdentityRequestParams.d.ts +0 -0
  333. /package/{dist → types}/request/ManagedIdentityRequestParams.d.ts.map +0 -0
  334. /package/{dist → types}/request/OnBehalfOfRequest.d.ts +0 -0
  335. /package/{dist → types}/request/OnBehalfOfRequest.d.ts.map +0 -0
  336. /package/{dist → types}/request/RefreshTokenRequest.d.ts +0 -0
  337. /package/{dist → types}/request/RefreshTokenRequest.d.ts.map +0 -0
  338. /package/{dist → types}/request/SignOutRequest.d.ts +0 -0
  339. /package/{dist → types}/request/SignOutRequest.d.ts.map +0 -0
  340. /package/{dist → types}/request/SilentFlowRequest.d.ts +0 -0
  341. /package/{dist → types}/request/SilentFlowRequest.d.ts.map +0 -0
  342. /package/{dist → types}/request/UsernamePasswordRequest.d.ts +0 -0
  343. /package/{dist → types}/request/UsernamePasswordRequest.d.ts.map +0 -0
  344. /package/{dist → types}/response/ManagedIdentityTokenResponse.d.ts +0 -0
  345. /package/{dist → types}/response/ManagedIdentityTokenResponse.d.ts.map +0 -0
  346. /package/{dist → types}/retry/DefaultManagedIdentityRetryPolicy.d.ts +0 -0
  347. /package/{dist → types}/retry/DefaultManagedIdentityRetryPolicy.d.ts.map +0 -0
  348. /package/{dist → types}/retry/ExponentialRetryStrategy.d.ts +0 -0
  349. /package/{dist → types}/retry/ExponentialRetryStrategy.d.ts.map +0 -0
  350. /package/{dist → types}/retry/IHttpRetryPolicy.d.ts +0 -0
  351. /package/{dist → types}/retry/IHttpRetryPolicy.d.ts.map +0 -0
  352. /package/{dist → types}/retry/ImdsRetryPolicy.d.ts +0 -0
  353. /package/{dist → types}/retry/ImdsRetryPolicy.d.ts.map +0 -0
  354. /package/{dist → types}/retry/LinearRetryStrategy.d.ts +0 -0
  355. /package/{dist → types}/retry/LinearRetryStrategy.d.ts.map +0 -0
  356. /package/{dist → types}/utils/EncodingUtils.d.ts +0 -0
  357. /package/{dist → types}/utils/EncodingUtils.d.ts.map +0 -0
  358. /package/{dist → types}/utils/NetworkUtils.d.ts +0 -0
  359. /package/{dist → types}/utils/NetworkUtils.d.ts.map +0 -0
  360. /package/{dist → types}/utils/TimeUtils.d.ts +0 -0
  361. /package/{dist → types}/utils/TimeUtils.d.ts.map +0 -0
@@ -1,56 +0,0 @@
1
- import { CryptoProvider } from "../crypto/CryptoProvider.js";
2
- /**
3
- * Client assertion of type jwt-bearer used in confidential client flows
4
- * @public
5
- */
6
- export declare class ClientAssertion {
7
- private jwt;
8
- private privateKey;
9
- private thumbprint;
10
- private useSha256;
11
- private expirationTime;
12
- private issuer;
13
- private jwtAudience;
14
- private publicCertificate;
15
- /**
16
- * Initialize the ClientAssertion class from the clientAssertion passed by the user
17
- * @param assertion - refer https://tools.ietf.org/html/rfc7521
18
- */
19
- static fromAssertion(assertion: string): ClientAssertion;
20
- /**
21
- * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
22
- * Initialize the ClientAssertion class from the certificate passed by the user
23
- * @param thumbprint - identifier of a certificate
24
- * @param privateKey - secret key
25
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
26
- */
27
- static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
28
- /**
29
- * Initialize the ClientAssertion class from the certificate passed by the user
30
- * @param thumbprint - identifier of a certificate
31
- * @param privateKey - secret key
32
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
33
- */
34
- static fromCertificateWithSha256Thumbprint(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
35
- /**
36
- * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
37
- * @param cryptoProvider - library's crypto helper
38
- * @param issuer - iss claim
39
- * @param jwtAudience - aud claim
40
- */
41
- getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string;
42
- /**
43
- * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
44
- */
45
- private createJwt;
46
- /**
47
- * Utility API to check expiration
48
- */
49
- private isExpired;
50
- /**
51
- * Extracts the raw certs from a given certificate string and returns them in an array.
52
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
53
- */
54
- static parseCertificate(publicCertificate: string): Array<string>;
55
- }
56
- //# sourceMappingURL=ClientAssertion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientAssertion.d.ts","sourceRoot":"","sources":["../../../src/client/ClientAssertion.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,iBAAiB,CAAgB;IAEzC;;;OAGG;WACW,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe;IAM/D;;;;;;OAMG;WACW,eAAe,CACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;WACW,mCAAmC,CAC7C,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;IACI,MAAM,CACT,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GACpB,MAAM;IA0BT;;OAEG;IACH,OAAO,CAAC,SAAS;IA8CjB;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB;;;OAGG;WACW,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;CAoB3E"}
@@ -1,37 +0,0 @@
1
- import { AuthenticationResult, Authority, CacheManager, ClientConfiguration, Constants, IAppTokenProvider, ICrypto, ServerTelemetryManager } from "@azure/msal-common/node";
2
- import { ManagedIdentityConfiguration } from "../config/Configuration.js";
3
- import { CommonClientCredentialRequest } from "../request/CommonClientCredentialRequest.js";
4
- import { BaseClient } from "./BaseClient.js";
5
- /**
6
- * OAuth2.0 client credential grant
7
- * @public
8
- */
9
- export declare class ClientCredentialClient extends BaseClient {
10
- private readonly appTokenProvider?;
11
- constructor(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider);
12
- /**
13
- * Public API to acquire a token with ClientCredential Flow for Confidential clients
14
- * @param request - CommonClientCredentialRequest provided by the developer
15
- */
16
- acquireToken(request: CommonClientCredentialRequest): Promise<AuthenticationResult | null>;
17
- /**
18
- * looks up cache if the tokens are cached already
19
- */
20
- getCachedAuthenticationResult(request: CommonClientCredentialRequest, config: ClientConfiguration | ManagedIdentityConfiguration, cryptoUtils: ICrypto, authority: Authority, cacheManager: CacheManager, serverTelemetryManager?: ServerTelemetryManager | null): Promise<[AuthenticationResult | null, Constants.CacheOutcome]>;
21
- /**
22
- * Reads access token from the cache
23
- */
24
- private readAccessTokenFromCache;
25
- /**
26
- * Makes a network call to request the token from the service
27
- * @param request - CommonClientCredentialRequest provided by the developer
28
- * @param authority - authority object
29
- */
30
- private executeTokenRequest;
31
- /**
32
- * generate the request to the server in the acceptable format
33
- * @param request - CommonClientCredentialRequest provided by the developer
34
- */
35
- private createTokenRequestBody;
36
- }
37
- //# sourceMappingURL=ClientCredentialClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientCredentialClient.d.ts","sourceRoot":"","sources":["../../../src/client/ClientCredentialClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EACpB,SAAS,EACT,YAAY,EAEZ,mBAAmB,EACnB,SAAS,EAET,iBAAiB,EACjB,OAAO,EAMP,sBAAsB,EASzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACH,4BAA4B,EAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAoB;gBAGlD,aAAa,EAAE,mBAAmB,EAClC,gBAAgB,CAAC,EAAE,iBAAiB;IAMxC;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA0CvC;;OAEG;IACU,6BAA6B,CACtC,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,mBAAmB,GAAG,4BAA4B,EAC1D,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,IAAI,GACvD,OAAO,CAAC,CAAC,oBAAoB,GAAG,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IA8FjE;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA+BhC;;;;OAIG;YACW,mBAAmB;IAoGjC;;;OAGG;YACW,sBAAsB;CAiFvC"}
@@ -1,58 +0,0 @@
1
- import { ClientApplication } from "./ClientApplication.js";
2
- import { Configuration } from "../config/Configuration.js";
3
- import { AuthenticationResult, IAppTokenProvider } from "@azure/msal-common/node";
4
- import { IConfidentialClientApplication } from "./IConfidentialClientApplication.js";
5
- import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js";
6
- import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js";
7
- /**
8
- * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications
9
- * will configure application secrets, client certificates/assertions as applicable
10
- * @public
11
- */
12
- export declare class ConfidentialClientApplication extends ClientApplication implements IConfidentialClientApplication {
13
- private appTokenProvider?;
14
- /**
15
- * Constructor for the ConfidentialClientApplication
16
- *
17
- * Required attributes in the Configuration object are:
18
- * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal
19
- * - authority: the authority URL for your application.
20
- * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal.
21
- *
22
- * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
23
- * 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).
24
- * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
25
- * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
26
- * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
27
- *
28
- * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/
29
- * Full B2C functionality will be available in this library in future versions.
30
- *
31
- * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance
32
- */
33
- constructor(configuration: Configuration);
34
- /**
35
- * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and
36
- * is meant for Azure SDK to enhance Managed Identity support.
37
- *
38
- * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source.
39
- */
40
- SetAppTokenProvider(provider: IAppTokenProvider): void;
41
- /**
42
- * Acquires tokens from the authority for the application (not for an end user).
43
- */
44
- acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<AuthenticationResult | null>;
45
- /**
46
- * Acquires tokens from the authority for the application.
47
- *
48
- * Used in scenarios where the current app is a middle-tier service which was called with a token
49
- * representing an end user. The current app can use the token (oboAssertion) to request another
50
- * token to access downstream web API, on behalf of that user.
51
- *
52
- * The current middle-tier app has no user interaction to obtain consent.
53
- * See how to gain consent upfront for your middle-tier app from this article.
54
- * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application
55
- */
56
- acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>;
57
- }
58
- //# sourceMappingURL=ConfidentialClientApplication.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EACH,oBAAoB,EAGpB,iBAAiB,EAOpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKhF;;;;GAIG;AACH,qBAAa,6BACT,SAAQ,iBACR,YAAW,8BAA8B;IAEzC,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAE7C;;;;;;;;;;;;;;;;;;OAkBG;gBACS,aAAa,EAAE,aAAa;IA8DxC;;;;;OAKG;IACH,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAItD;;OAEG;IACU,8BAA8B,CACvC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA8GvC;;;;;;;;;;OAUG;IACU,sBAAsB,CAC/B,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;CAmC1C"}
@@ -1,60 +0,0 @@
1
- import { AuthenticationResult, ClientConfiguration } from "@azure/msal-common/node";
2
- import { CommonDeviceCodeRequest } from "../request/CommonDeviceCodeRequest.js";
3
- import { BaseClient } from "./BaseClient.js";
4
- /**
5
- * OAuth2.0 Device code client
6
- * @public
7
- */
8
- export declare class DeviceCodeClient extends BaseClient {
9
- constructor(configuration: ClientConfiguration);
10
- /**
11
- * Gets device code from device code endpoint, calls back to with device code response, and
12
- * polls token endpoint to exchange device code for tokens
13
- * @param request - developer provided CommonDeviceCodeRequest
14
- */
15
- acquireToken(request: CommonDeviceCodeRequest): Promise<AuthenticationResult | null>;
16
- /**
17
- * Creates device code request and executes http GET
18
- * @param request - developer provided CommonDeviceCodeRequest
19
- */
20
- private getDeviceCode;
21
- /**
22
- * Creates query string for the device code request
23
- * @param request - developer provided CommonDeviceCodeRequest
24
- */
25
- createExtraQueryParameters(request: CommonDeviceCodeRequest): string;
26
- /**
27
- * Executes POST request to device code endpoint
28
- * @param deviceCodeEndpoint - token endpoint
29
- * @param queryString - string to be used in the body of the request
30
- * @param headers - headers for the request
31
- * @param thumbprint - unique request thumbprint
32
- * @param correlationId - correlation id to be used in the request
33
- */
34
- private executePostRequestToDeviceCodeEndpoint;
35
- /**
36
- * Create device code endpoint query parameters and returns string
37
- * @param request - developer provided CommonDeviceCodeRequest
38
- */
39
- private createQueryString;
40
- /**
41
- * Breaks the polling with specific conditions
42
- * @param deviceCodeExpirationTime - expiration time for the device code request
43
- * @param userSpecifiedTimeout - developer provided timeout, to be compared against deviceCodeExpirationTime
44
- * @param userSpecifiedCancelFlag - boolean indicating the developer would like to cancel the request
45
- */
46
- private continuePolling;
47
- /**
48
- * Creates token request with device code response and polls token endpoint at interval set by the device code response
49
- * @param request - developer provided CommonDeviceCodeRequest
50
- * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint
51
- */
52
- private acquireTokenWithDeviceCode;
53
- /**
54
- * Creates query parameters and converts to string.
55
- * @param request - developer provided CommonDeviceCodeRequest
56
- * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint
57
- */
58
- private createTokenRequestBody;
59
- }
60
- //# sourceMappingURL=DeviceCodeClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeviceCodeClient.d.ts","sourceRoot":"","sources":["../../../src/client/DeviceCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EACpB,mBAAmB,EActB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAChC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA8BvC;;;OAGG;YACW,aAAa;IA+B3B;;;OAGG;IACI,0BAA0B,CAC7B,OAAO,EAAE,uBAAuB,GACjC,MAAM;IAaT;;;;;;;OAOG;YACW,sCAAsC;IAoCpD;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IA+BzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IA2CvB;;;;OAIG;YACW,0BAA0B;IA8FxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAqDjC"}
@@ -1,43 +0,0 @@
1
- import { AuthenticationResult, IAppTokenProvider, Logger } from "@azure/msal-common/node";
2
- import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
3
- import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
4
- import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js";
5
- import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js";
6
- import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js";
7
- import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
8
- import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js";
9
- import { TokenCache } from "../cache/TokenCache.js";
10
- /**
11
- * Interface for the ConfidentialClientApplication class defining the public API signatures
12
- * @public
13
- */
14
- export interface IConfidentialClientApplication {
15
- /** Creates the URL of the authorization request */
16
- getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
17
- /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */
18
- acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
19
- /** Acquires a token silently when a user specifies the account the token is requested for */
20
- acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult | null>;
21
- /** Acquires a token by exchanging the refresh token provided for a new set of tokens */
22
- acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
23
- /** Acquires tokens from the authority for the application (not for an end user) */
24
- acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<AuthenticationResult | null>;
25
- /** Acquires tokens from the authority for the application */
26
- acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>;
27
- /**
28
- * Acquires tokens with password grant by exchanging client applications username and password for credentials
29
- * @deprecated - Use a more secure flow instead
30
- */
31
- acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
32
- /** Gets the token cache for the application */
33
- getTokenCache(): TokenCache;
34
- /** Returns the logger instance */
35
- getLogger(): Logger;
36
- /** Replaces the default logger set in configurations with new Logger with new configurations */
37
- setLogger(logger: Logger): void;
38
- /** Clear the cache except for authority metadata. */
39
- clearCache(): void;
40
- /** This extensibility point is meant for Azure SDK to enhance Managed Identity support */
41
- SetAppTokenProvider(provider: IAppTokenProvider): void;
42
- }
43
- //# sourceMappingURL=IConfidentialClientApplication.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/IConfidentialClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC3C,mDAAmD;IACnD,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,+HAA+H;IAC/H,kBAAkB,CACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,8FAA8F;IAC9F,kBAAkB,CACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,wFAAwF;IACxF,0BAA0B,CACtB,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,mFAAmF;IACnF,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,6DAA6D;IAC7D,sBAAsB,CAClB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC;;;OAGG;IACH,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,qDAAqD;IACrD,UAAU,IAAI,IAAI,CAAC;IAEnB,0FAA0F;IAC1F,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1D"}
@@ -1,46 +0,0 @@
1
- import { AccountInfo, AuthenticationResult, Logger } from "@azure/msal-common/node";
2
- import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
3
- import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
4
- import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js";
5
- import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js";
6
- import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
7
- import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js";
8
- import { TokenCache } from "../cache/TokenCache.js";
9
- import { InteractiveRequest } from "../request/InteractiveRequest.js";
10
- import { SignOutRequest } from "../request/SignOutRequest.js";
11
- /**
12
- * Interface for the PublicClientApplication class defining the public API signatures
13
- * @public
14
- */
15
- export interface IPublicClientApplication {
16
- /** Creates the URL of the authorization request */
17
- getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
18
- /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */
19
- acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
20
- /** Acquires a token interactively */
21
- acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult>;
22
- /** Acquires a token silently when a user specifies the account the token is requested for */
23
- acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
24
- /** Acquires a token by exchanging the refresh token provided for a new set of tokens */
25
- acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
26
- /** Acquires a token from the authority using OAuth2.0 device code flow */
27
- acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise<AuthenticationResult | null>;
28
- /**
29
- * Acquires tokens with password grant by exchanging client applications username and password for credentials
30
- * @deprecated - Use a more secure flow instead
31
- */
32
- acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
33
- /** Gets the token cache for the application */
34
- getTokenCache(): TokenCache;
35
- /** Returns the logger instance */
36
- getLogger(): Logger;
37
- /** Replaces the default logger set in configurations with new Logger with new configurations */
38
- setLogger(logger: Logger): void;
39
- /** Clear the cache except for authority metadata, which is not included in the serialized cache and would otherwise be lost. */
40
- clearCache(): void;
41
- /** Gets all cached accounts */
42
- getAllAccounts(): Promise<AccountInfo[]>;
43
- /** Removes cache artifacts associated with the given account */
44
- signOut(request: SignOutRequest): Promise<void>;
45
- }
46
- //# sourceMappingURL=IPublicClientApplication.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,WAAW,EACX,oBAAoB,EACpB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC,mDAAmD;IACnD,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,8HAA8H;IAC9H,kBAAkB,CACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,qCAAqC;IACrC,uBAAuB,CACnB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,6FAA6F;IAC7F,kBAAkB,CACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,wFAAwF;IACxF,0BAA0B,CACtB,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,0EAA0E;IAC1E,wBAAwB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC;;;OAGG;IACH,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,gIAAgI;IAChI,UAAU,IAAI,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,gEAAgE;IAChE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
@@ -1,42 +0,0 @@
1
- import { AuthenticationResult } from "@azure/msal-common/node";
2
- import { ManagedIdentityConfiguration } from "../config/Configuration.js";
3
- import { ManagedIdentityRequestParams } from "../request/ManagedIdentityRequestParams.js";
4
- import { ManagedIdentitySourceNames } from "../utils/Constants.js";
5
- /**
6
- * Class to initialize a managed identity and identify the service
7
- * @public
8
- */
9
- export declare class ManagedIdentityApplication {
10
- private config;
11
- private logger;
12
- private static nodeStorage?;
13
- private networkClient;
14
- private cryptoProvider;
15
- private fakeAuthority;
16
- private fakeClientCredentialClient;
17
- private managedIdentityClient;
18
- private hashUtils;
19
- constructor(configuration?: ManagedIdentityConfiguration);
20
- /**
21
- * Acquire an access token from the cache or the managed identity
22
- * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer
23
- * @returns the access token
24
- */
25
- acquireToken(managedIdentityRequestParams: ManagedIdentityRequestParams): Promise<AuthenticationResult>;
26
- /**
27
- * Acquires a token from a managed identity endpoint.
28
- *
29
- * @param managedIdentityRequest - The request object containing parameters for the managed identity token request.
30
- * @param managedIdentityId - The identifier for the managed identity (e.g., client ID or resource ID).
31
- * @param fakeAuthority - A placeholder authority used for the token request.
32
- * @param refreshAccessToken - Optional flag indicating whether to force a refresh of the access token.
33
- * @returns A promise that resolves to an AuthenticationResult containing the acquired token and related information.
34
- */
35
- private acquireTokenFromManagedIdentity;
36
- /**
37
- * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK.
38
- * @returns ManagedIdentitySourceNames - The Managed Identity source's name
39
- */
40
- getManagedIdentitySource(): ManagedIdentitySourceNames;
41
- }
42
- //# sourceMappingURL=ManagedIdentityApplication.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAUH,oBAAoB,EAKvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAG/B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAEH,0BAA0B,EAC7B,MAAM,uBAAuB,CAAC;AAO/B;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAmC;IAEjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAc;IACzC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,aAAa,CAAY;IAGjC,OAAO,CAAC,0BAA0B,CAAyB;IAE3D,OAAO,CAAC,qBAAqB,CAAwB;IAErD,OAAO,CAAC,SAAS,CAAY;gBAEjB,aAAa,CAAC,EAAE,4BAA4B;IA8DxD;;;;OAIG;IACU,YAAY,CACrB,4BAA4B,EAAE,4BAA4B,GAC3D,OAAO,CAAC,oBAAoB,CAAC;IAoGhC;;;;;;;;OAQG;YACW,+BAA+B;IAe7C;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;CAMhE"}
@@ -1,29 +0,0 @@
1
- import { Authority, INetworkModule, Logger, AuthenticationResult } from "@azure/msal-common/node";
2
- import { CryptoProvider } from "../crypto/CryptoProvider.js";
3
- import { ManagedIdentityRequest } from "../request/ManagedIdentityRequest.js";
4
- import { ManagedIdentityId } from "../config/ManagedIdentityId.js";
5
- import { NodeStorage } from "../cache/NodeStorage.js";
6
- import { ManagedIdentitySourceNames } from "../utils/Constants.js";
7
- export declare class ManagedIdentityClient {
8
- private logger;
9
- private nodeStorage;
10
- private networkClient;
11
- private cryptoProvider;
12
- private disableInternalRetries;
13
- private static identitySource?;
14
- static sourceName?: ManagedIdentitySourceNames;
15
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean);
16
- sendManagedIdentityTokenRequest(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise<AuthenticationResult>;
17
- private allEnvironmentVariablesAreDefined;
18
- /**
19
- * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource.
20
- * @returns ManagedIdentitySourceNames - The Managed Identity source's name
21
- */
22
- getManagedIdentitySource(): ManagedIdentitySourceNames;
23
- /**
24
- * Tries to create a managed identity source for all sources
25
- * @returns the managed identity Source
26
- */
27
- private selectManagedIdentitySource;
28
- }
29
- //# sourceMappingURL=ManagedIdentityClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityClient.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EACT,cAAc,EACd,MAAM,EACN,oBAAoB,EACvB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAOnE,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,sBAAsB,CAAU;IAExC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAA4B;IAC1D,OAAc,UAAU,CAAC,EAAE,0BAA0B,CAAC;gBAGlD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO;IAStB,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IAqBhC,OAAO,CAAC,iCAAiC;IAUzC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;IA2B7D;;;OAGG;IACH,OAAO,CAAC,2BAA2B;CA6DtC"}
@@ -1,72 +0,0 @@
1
- import { INetworkModule, Logger } from "@azure/msal-common/node";
2
- import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
3
- import { CryptoProvider } from "../../crypto/CryptoProvider.js";
4
- import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
5
- import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
6
- import { NodeStorage } from "../../cache/NodeStorage.js";
7
- /**
8
- * Azure App Service Managed Identity Source implementation.
9
- *
10
- * This class provides managed identity authentication for applications running in Azure App Service.
11
- * It uses the local metadata service endpoint available within App Service environments to obtain
12
- * access tokens without requiring explicit credentials.
13
- *
14
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs
15
- */
16
- export declare class AppService extends BaseManagedIdentitySource {
17
- private identityEndpoint;
18
- private identityHeader;
19
- /**
20
- * Creates a new instance of the AppService managed identity source.
21
- *
22
- * @param logger - Logger instance for diagnostic output
23
- * @param nodeStorage - Node.js storage implementation for caching
24
- * @param networkClient - Network client for making HTTP requests
25
- * @param cryptoProvider - Cryptographic operations provider
26
- * @param disableInternalRetries - Whether to disable internal retry logic
27
- * @param identityEndpoint - The App Service identity endpoint URL
28
- * @param identityHeader - The secret header value required for authentication
29
- */
30
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, identityEndpoint: string, identityHeader: string);
31
- /**
32
- * Retrieves the required environment variables for App Service managed identity.
33
- *
34
- * App Service managed identity requires two environment variables:
35
- * - IDENTITY_ENDPOINT: The URL of the local metadata service
36
- * - IDENTITY_HEADER: A secret header value for authentication
37
- *
38
- * @returns An array containing [identityEndpoint, identityHeader] values from environment variables.
39
- * Either value may be undefined if the environment variable is not set.
40
- */
41
- static getEnvironmentVariables(): Array<string | undefined>;
42
- /**
43
- * Attempts to create an AppService managed identity source if the environment supports it.
44
- *
45
- * This method checks for the presence of required environment variables and validates
46
- * the identity endpoint URL. If the environment is not suitable for App Service managed
47
- * identity (missing environment variables or invalid endpoint), it returns null.
48
- *
49
- * @param logger - Logger instance for diagnostic output
50
- * @param nodeStorage - Node.js storage implementation for caching
51
- * @param networkClient - Network client for making HTTP requests
52
- * @param cryptoProvider - Cryptographic operations provider
53
- * @param disableInternalRetries - Whether to disable internal retry logic
54
- *
55
- * @returns A new AppService instance if the environment is suitable, null otherwise
56
- */
57
- static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean): AppService | null;
58
- /**
59
- * Creates a managed identity token request for the App Service environment.
60
- *
61
- * This method constructs an HTTP GET request to the App Service identity endpoint
62
- * with the required headers, query parameters, and managed identity configuration.
63
- * The request includes the secret header for authentication and appropriate API version.
64
- *
65
- * @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
66
- * @param managedIdentityId - The managed identity configuration specifying whether to use system-assigned or user-assigned identity
67
- *
68
- * @returns A configured ManagedIdentityRequestParameters object ready for network execution
69
- */
70
- createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
71
- }
72
- //# sourceMappingURL=AppService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppService.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/AppService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAS3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKzD;;;;;;;;GAQG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;IAE/B;;;;;;;;;;OAUG;gBAEC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,EAC/B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM;IAc1B;;;;;;;;;OASG;WACW,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAalE;;;;;;;;;;;;;;OAcG;WACW,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,GAChC,UAAU,GAAG,IAAI;IAqCpB;;;;;;;;;;;OAWG;IACI,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA6BtC"}
@@ -1,109 +0,0 @@
1
- import { INetworkModule, NetworkResponse, NetworkRequestOptions, Logger, ServerAuthorizationTokenResponse } from "@azure/msal-common/node";
2
- import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
3
- import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
4
- import { CryptoProvider } from "../../crypto/CryptoProvider.js";
5
- import { NodeStorage } from "../../cache/NodeStorage.js";
6
- import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js";
7
- import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
8
- export declare const ARC_API_VERSION: string;
9
- export declare const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT: string;
10
- type FilePathMap = {
11
- win32: string;
12
- linux: string;
13
- };
14
- export declare const SUPPORTED_AZURE_ARC_PLATFORMS: FilePathMap;
15
- export declare const AZURE_ARC_FILE_DETECTION: FilePathMap;
16
- /**
17
- * Azure Arc managed identity source implementation for acquiring tokens from Azure Arc-enabled servers.
18
- *
19
- * This class provides managed identity authentication for applications running on Azure Arc-enabled servers
20
- * by communicating with the local Hybrid Instance Metadata Service (HIMDS). It supports both environment
21
- * variable-based configuration and automatic detection through the HIMDS executable.
22
- *
23
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
24
- */
25
- export declare class AzureArc extends BaseManagedIdentitySource {
26
- private identityEndpoint;
27
- /**
28
- * Creates a new instance of the AzureArc managed identity source.
29
- *
30
- * @param logger - Logger instance for capturing telemetry and diagnostic information
31
- * @param nodeStorage - Storage implementation for caching tokens and metadata
32
- * @param networkClient - Network client for making HTTP requests to the identity endpoint
33
- * @param cryptoProvider - Cryptographic operations provider for token validation and encryption
34
- * @param disableInternalRetries - Flag to disable automatic retry logic for failed requests
35
- * @param identityEndpoint - The Azure Arc identity endpoint URL for token requests
36
- */
37
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, identityEndpoint: string);
38
- /**
39
- * Retrieves and validates Azure Arc environment variables for managed identity configuration.
40
- *
41
- * This method checks for IDENTITY_ENDPOINT and IMDS_ENDPOINT environment variables.
42
- * If either is missing, it attempts to detect the Azure Arc environment by checking for
43
- * the HIMDS executable at platform-specific paths. On successful detection, it returns
44
- * the default identity endpoint and a helper string indicating file-based detection.
45
- *
46
- * @returns An array containing [identityEndpoint, imdsEndpoint] where both values are
47
- * strings if Azure Arc is available, or undefined if not available.
48
- */
49
- static getEnvironmentVariables(): Array<string | undefined>;
50
- /**
51
- * Attempts to create an AzureArc managed identity source instance.
52
- *
53
- * Validates the Azure Arc environment by checking environment variables
54
- * and performing file-based detection. It ensures that only system-assigned managed identities
55
- * are supported for Azure Arc scenarios. The method performs comprehensive validation of
56
- * endpoint URLs and logs detailed information about the detection process.
57
- *
58
- * @param logger - Logger instance for capturing creation and validation steps
59
- * @param nodeStorage - Storage implementation for the managed identity source
60
- * @param networkClient - Network client for HTTP communication
61
- * @param cryptoProvider - Cryptographic operations provider
62
- * @param disableInternalRetries - Whether to disable automatic retry mechanisms
63
- * @param managedIdentityId - The managed identity configuration, must be system-assigned
64
- *
65
- * @returns AzureArc instance if the environment supports Azure Arc managed identity, null otherwise
66
- *
67
- * @throws {ManagedIdentityError} When a user-assigned managed identity is specified (not supported for Azure Arc)
68
- */
69
- static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, managedIdentityId: ManagedIdentityId): AzureArc | null;
70
- /**
71
- * Creates a properly formatted HTTP request for acquiring tokens from the Azure Arc identity endpoint.
72
- *
73
- * This method constructs a GET request to the Azure Arc HIMDS endpoint with the required metadata header
74
- * and query parameters. The endpoint URL is normalized to use 127.0.0.1 instead of localhost for
75
- * consistency. Additional body parameters are calculated by the base class during token acquisition.
76
- *
77
- * @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
78
- *
79
- * @returns A configured ManagedIdentityRequestParameters object ready for network execution
80
- */
81
- createRequest(resource: string): ManagedIdentityRequestParameters;
82
- /**
83
- * Processes the server response and handles Azure Arc-specific authentication challenges.
84
- *
85
- * This method implements the Azure Arc authentication flow which may require reading a secret file
86
- * for authorization. When the initial request returns HTTP 401 Unauthorized, it extracts the file
87
- * path from the WWW-Authenticate header, validates the file location and size, reads the secret,
88
- * and retries the request with Basic authentication. The method includes comprehensive security
89
- * validations to prevent path traversal and ensure file integrity.
90
- *
91
- * @param originalResponse - The initial HTTP response from the identity endpoint
92
- * @param networkClient - Network client for making the retry request if needed
93
- * @param networkRequest - The original request parameters (modified with auth header for retry)
94
- * @param networkRequestOptions - Additional options for network requests
95
- *
96
- * @returns A promise that resolves to the server token response with access token and metadata
97
- *
98
- * @throws {ManagedIdentityError} When:
99
- * - WWW-Authenticate header is missing or has unsupported format
100
- * - Platform is not supported (not Windows or Linux)
101
- * - Secret file has invalid extension (not .key)
102
- * - Secret file path doesn't match expected platform path
103
- * - Secret file cannot be read or is too large (>4096 bytes)
104
- * @throws {ClientAuthError} When network errors occur during retry request
105
- */
106
- getServerTokenResponseAsync(originalResponse: NetworkResponse<ManagedIdentityTokenResponse>, networkClient: INetworkModule, networkRequest: ManagedIdentityRequestParameters, networkRequestOptions: NetworkRequestOptions): Promise<ServerAuthorizationTokenResponse>;
107
- }
108
- export {};
109
- //# sourceMappingURL=AzureArc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AzureArc.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/AzureArc.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,gCAAgC,EAEnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAchE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAOzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,eAAO,MAAM,eAAe,EAAE,MAAqB,CAAC;AACpD,eAAO,MAAM,mCAAmC,EAAE,MACS,CAAC;AAG5D,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,WAG3C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,WAGtC,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,QAAS,SAAQ,yBAAyB;IACnD,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;;;;;;;;OASG;gBAEC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,EAC/B,gBAAgB,EAAE,MAAM;IAa5B;;;;;;;;;;OAUG;WACW,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAoClE;;;;;;;;;;;;;;;;;;OAkBG;WACW,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,EAC/B,iBAAiB,EAAE,iBAAiB,GACrC,QAAQ,GAAG,IAAI;IAkElB;;;;;;;;;;OAUG;IACI,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;IAmBxE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACU,2BAA2B,CACpC,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAC/D,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,gCAAgC,EAChD,qBAAqB,EAAE,qBAAqB,GAC7C,OAAO,CAAC,gCAAgC,CAAC;CAgH/C"}