@azure/msal-node 5.1.5 → 5.2.1

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 +228 -66
  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,125 +0,0 @@
1
- import { Authority, INetworkModule, Logger, NetworkRequestOptions, NetworkResponse, ServerAuthorizationTokenResponse, AuthenticationResult } from "@azure/msal-common/node";
2
- import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
3
- import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
4
- import { CryptoProvider } from "../../crypto/CryptoProvider.js";
5
- import { ManagedIdentityRequest } from "../../request/ManagedIdentityRequest.js";
6
- import { ManagedIdentityIdType } from "../../utils/Constants.js";
7
- import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js";
8
- import { NodeStorage } from "../../cache/NodeStorage.js";
9
- import { ManagedIdentityErrorCodes } from "../../error/ManagedIdentityError.js";
10
- /**
11
- * Managed Identity User Assigned Id Query Parameter Names
12
- */
13
- export declare const ManagedIdentityUserAssignedIdQueryParameterNames: {
14
- readonly MANAGED_IDENTITY_CLIENT_ID_2017: "clientid";
15
- readonly MANAGED_IDENTITY_CLIENT_ID: "client_id";
16
- readonly MANAGED_IDENTITY_OBJECT_ID: "object_id";
17
- readonly MANAGED_IDENTITY_RESOURCE_ID_IMDS: "msi_res_id";
18
- readonly MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS: "mi_res_id";
19
- };
20
- export type ManagedIdentityUserAssignedIdQueryParameterNames = (typeof ManagedIdentityUserAssignedIdQueryParameterNames)[keyof typeof ManagedIdentityUserAssignedIdQueryParameterNames];
21
- /**
22
- * Base class for all Managed Identity sources. Provides common functionality for
23
- * authenticating with Azure Managed Identity endpoints across different Azure services
24
- * including IMDS, App Service, Azure Arc, Service Fabric, Cloud Shell, and Machine Learning.
25
- *
26
- * This abstract class handles token acquisition, response processing, and network communication
27
- * while allowing concrete implementations to define source-specific request creation logic.
28
- */
29
- export declare abstract class BaseManagedIdentitySource {
30
- protected logger: Logger;
31
- private nodeStorage;
32
- private networkClient;
33
- private cryptoProvider;
34
- private disableInternalRetries;
35
- /**
36
- * Creates an instance of BaseManagedIdentitySource.
37
- *
38
- * @param logger - Logger instance for diagnostic information
39
- * @param nodeStorage - Storage interface for caching tokens
40
- * @param networkClient - Network client for making HTTP requests
41
- * @param cryptoProvider - Cryptographic provider for token operations
42
- * @param disableInternalRetries - Whether to disable automatic retry logic
43
- */
44
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean);
45
- /**
46
- * Creates a managed identity request with source-specific parameters.
47
- * This method must be implemented by concrete managed identity sources to define
48
- * how requests are constructed for their specific endpoint requirements.
49
- *
50
- * @param resource - The Azure resource URI for which the access token is requested (e.g., "https://vault.azure.net/")
51
- * @param managedIdentityId - The managed identity configuration specifying system-assigned or user-assigned identity details
52
- *
53
- * @returns Request parameters configured for the specific managed identity source
54
- */
55
- abstract createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
56
- /**
57
- * Processes the network response and converts it to a standardized server token response.
58
- * This async version allows for source-specific response processing logic while maintaining
59
- * backward compatibility with the synchronous version.
60
- *
61
- * @param response - The network response containing the managed identity token
62
- * @param _networkClient - Network client used for the request (unused in base implementation)
63
- * @param _networkRequest - The original network request parameters (unused in base implementation)
64
- * @param _networkRequestOptions - The network request options (unused in base implementation)
65
- *
66
- * @returns Promise resolving to a standardized server authorization token response
67
- */
68
- getServerTokenResponseAsync(response: NetworkResponse<ManagedIdentityTokenResponse>, _networkClient: INetworkModule, _networkRequest: ManagedIdentityRequestParameters, _networkRequestOptions: NetworkRequestOptions): Promise<ServerAuthorizationTokenResponse>;
69
- /**
70
- * Converts a managed identity token response to a standardized server authorization token response.
71
- * Handles time format conversion, expiration calculation, and error mapping to ensure
72
- * compatibility with the MSAL response handling pipeline.
73
- *
74
- * @param response - The network response containing the managed identity token
75
- *
76
- * @returns Standardized server authorization token response with normalized fields
77
- */
78
- getServerTokenResponse(response: NetworkResponse<ManagedIdentityTokenResponse>): ServerAuthorizationTokenResponse;
79
- /**
80
- * Acquires an access token using the managed identity endpoint for the specified resource.
81
- * This is the primary method for token acquisition, handling the complete flow from
82
- * request creation through response processing and token caching.
83
- *
84
- * @param managedIdentityRequest - The managed identity request containing resource and optional parameters
85
- * @param managedIdentityId - The managed identity configuration (system or user-assigned)
86
- * @param fakeAuthority - Authority instance used for token caching (managed identity uses a placeholder authority)
87
- * @param refreshAccessToken - Whether this is a token refresh operation
88
- *
89
- * @returns Promise resolving to an authentication result containing the access token and metadata
90
- *
91
- * @throws {AuthError} When network requests fail or token validation fails
92
- * @throws {ClientAuthError} When network errors occur during the request
93
- */
94
- acquireTokenWithManagedIdentity(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise<AuthenticationResult>;
95
- /**
96
- * Determines the appropriate query parameter name for user-assigned managed identity
97
- * based on the identity type, API version, and endpoint characteristics.
98
- * Different Azure services and API versions use different parameter names for the same identity types.
99
- *
100
- * @param managedIdentityIdType - The type of user-assigned managed identity (client ID, object ID, or resource ID)
101
- * @param isImds - Whether the request is being made to the IMDS (Instance Metadata Service) endpoint
102
- * @param usesApi2017 - Whether the endpoint uses the 2017-09-01 API version (affects client ID parameter name)
103
- *
104
- * @returns The correct query parameter name for the specified identity type and endpoint
105
- *
106
- * @throws {ManagedIdentityError} When an invalid managed identity ID type is provided
107
- */
108
- getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType: ManagedIdentityIdType, isImds?: boolean, usesApi2017?: boolean): string;
109
- /**
110
- * Validates and normalizes an environment variable containing a URL string.
111
- * This static utility method ensures that environment variables used for managed identity
112
- * endpoints contain properly formatted URLs and provides informative error messages when validation fails.
113
- *
114
- * @param envVariableStringName - The name of the environment variable being validated (for error reporting)
115
- * @param envVariable - The environment variable value containing the URL string
116
- * @param sourceName - The name of the managed identity source (for error reporting)
117
- * @param logger - Logger instance for diagnostic information
118
- *
119
- * @returns The validated and normalized URL string
120
- *
121
- * @throws {ManagedIdentityError} When the environment variable contains a malformed URL
122
- */
123
- static getValidatedEnvVariableUrlString: (envVariableStringName: keyof typeof ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes, envVariable: string, sourceName: string, logger: Logger) => string;
124
- }
125
- //# sourceMappingURL=BaseManagedIdentitySource.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseManagedIdentitySource.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,SAAS,EAET,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,eAAe,EAEf,gCAAgC,EAGhC,oBAAoB,EAIvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAGH,qBAAqB,EAExB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EACH,yBAAyB,EAE5B,MAAM,qCAAqC,CAAC;AAI7C;;GAEG;AACH,eAAO,MAAM,gDAAgD;;;;;;CAMnD,CAAC;AACX,MAAM,MAAM,gDAAgD,GACxD,CAAC,OAAO,gDAAgD,CAAC,CAAC,MAAM,OAAO,gDAAgD,CAAC,CAAC;AAE7H;;;;;;;GAOG;AACH,8BAAsB,yBAAyB;IAC3C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,sBAAsB,CAAU;IAExC;;;;;;;;OAQG;gBAEC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO;IASnC;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,CAClB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;IAEnC;;;;;;;;;;;OAWG;IACU,2BAA2B,CACpC,QAAQ,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAEvD,cAAc,EAAE,cAAc,EAE9B,eAAe,EAAE,gCAAgC,EAEjD,sBAAsB,EAAE,qBAAqB,GAC9C,OAAO,CAAC,gCAAgC,CAAC;IAI5C;;;;;;;;OAQG;IACI,sBAAsB,CACzB,QAAQ,EAAE,eAAe,CAAC,4BAA4B,CAAC,GACxD,gCAAgC;IA+CnC;;;;;;;;;;;;;;OAcG;IACU,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IAoHhC;;;;;;;;;;;;OAYG;IACI,iDAAiD,CACpD,qBAAqB,EAAE,qBAAqB,EAC5C,MAAM,CAAC,EAAE,OAAO,EAChB,WAAW,CAAC,EAAE,OAAO,GACtB,MAAM;IAoCT;;;;;;;;;;;;;OAaG;IACH,OAAc,gCAAgC,0BACnB,MAAM,OAAO,0BAA0B,4CAA4C,eAC7F,MAAM,cACP,MAAM,UACV,MAAM,KACf,MAAM,CAgBP;CACL"}
@@ -1,71 +0,0 @@
1
- import { INetworkModule, Logger } from "@azure/msal-common/node";
2
- import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
3
- import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
4
- import { NodeStorage } from "../../cache/NodeStorage.js";
5
- import { CryptoProvider } from "../../crypto/CryptoProvider.js";
6
- import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
7
- /**
8
- * Azure Cloud Shell managed identity source implementation.
9
- *
10
- * This class handles authentication for applications running in Azure Cloud Shell environment.
11
- * Cloud Shell provides a browser-accessible shell for managing Azure resources and includes
12
- * a pre-configured managed identity for authentication.
13
- *
14
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs
15
- */
16
- export declare class CloudShell extends BaseManagedIdentitySource {
17
- private msiEndpoint;
18
- /**
19
- * Creates a new CloudShell managed identity source instance.
20
- *
21
- * @param logger - Logger instance for diagnostic logging
22
- * @param nodeStorage - Node.js storage implementation for caching
23
- * @param networkClient - HTTP client for making requests to the managed identity endpoint
24
- * @param cryptoProvider - Cryptographic operations provider
25
- * @param disableInternalRetries - Whether to disable automatic retry logic for failed requests
26
- * @param msiEndpoint - The MSI endpoint URL obtained from environment variables
27
- */
28
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, msiEndpoint: string);
29
- /**
30
- * Retrieves the required environment variables for Cloud Shell managed identity.
31
- *
32
- * Cloud Shell requires the MSI_ENDPOINT environment variable to be set, which
33
- * contains the URL of the managed identity service endpoint.
34
- *
35
- * @returns An array containing the MSI_ENDPOINT environment variable value (or undefined if not set)
36
- */
37
- static getEnvironmentVariables(): Array<string | undefined>;
38
- /**
39
- * Attempts to create a CloudShell managed identity source instance.
40
- *
41
- * This method validates that the required environment variables are present and
42
- * creates a CloudShell instance if the environment is properly configured.
43
- * Cloud Shell only supports system-assigned managed identities.
44
- *
45
- * @param logger - Logger instance for diagnostic logging
46
- * @param nodeStorage - Node.js storage implementation for caching
47
- * @param networkClient - HTTP client for making requests
48
- * @param cryptoProvider - Cryptographic operations provider
49
- * @param disableInternalRetries - Whether to disable automatic retry logic
50
- * @param managedIdentityId - The managed identity configuration (must be system-assigned)
51
- *
52
- * @returns A CloudShell instance if the environment is valid, null otherwise
53
- *
54
- * @throws {ManagedIdentityError} When a user-assigned managed identity is requested,
55
- * as Cloud Shell only supports system-assigned identities
56
- */
57
- static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, managedIdentityId: ManagedIdentityId): CloudShell | null;
58
- /**
59
- * Creates an HTTP request to acquire an access token from the Cloud Shell managed identity endpoint.
60
- *
61
- * This method constructs a POST request to the MSI endpoint with the required headers and
62
- * body parameters for Cloud Shell authentication. The request includes the target resource
63
- * for which the access token is being requested.
64
- *
65
- * @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
66
- *
67
- * @returns A configured ManagedIdentityRequestParameters object ready for network execution
68
- */
69
- createRequest(resource: string): ManagedIdentityRequestParameters;
70
- }
71
- //# sourceMappingURL=CloudShell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CloudShell.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/CloudShell.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAahE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;;;;;;;GAQG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,WAAW,CAAS;IAE5B;;;;;;;;;OASG;gBAEC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,EAC/B,WAAW,EAAE,MAAM;IAavB;;;;;;;OAOG;WACW,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAOlE;;;;;;;;;;;;;;;;;;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,UAAU,GAAG,IAAI;IA2CpB;;;;;;;;;;OAUG;IACI,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;CAc3E"}
@@ -1,67 +0,0 @@
1
- import { INetworkModule, Logger } from "@azure/msal-common/node";
2
- import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
3
- import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
4
- import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
5
- import { CryptoProvider } from "../../crypto/CryptoProvider.js";
6
- import { NodeStorage } from "../../cache/NodeStorage.js";
7
- /**
8
- * Managed Identity source implementation for Azure Instance Metadata Service (IMDS).
9
- *
10
- * IMDS is available on Azure Virtual Machines and Virtual Machine Scale Sets and provides
11
- * a REST endpoint to obtain OAuth tokens for managed identities. This implementation
12
- * handles both system-assigned and user-assigned managed identities.
13
- *
14
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs
15
- */
16
- export declare class Imds extends BaseManagedIdentitySource {
17
- private identityEndpoint;
18
- /**
19
- * Constructs an Imds instance with the specified configuration.
20
- *
21
- * @param logger - Logger instance for recording debug information and errors
22
- * @param nodeStorage - NodeStorage instance used for token caching operations
23
- * @param networkClient - Network client implementation for making HTTP requests to IMDS
24
- * @param cryptoProvider - CryptoProvider for generating correlation IDs and other cryptographic operations
25
- * @param disableInternalRetries - When true, disables the built-in retry logic for IMDS requests
26
- * @param identityEndpoint - The complete IMDS endpoint URL including the token path
27
- */
28
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, identityEndpoint: string);
29
- /**
30
- * Creates an Imds instance with the appropriate endpoint configuration.
31
- *
32
- * This method checks for the presence of the AZURE_POD_IDENTITY_AUTHORITY_HOST environment
33
- * variable, which is used in Azure Kubernetes Service (AKS) environments with Azure AD
34
- * Pod Identity. If found, it uses that endpoint; otherwise, it falls back to the standard
35
- * IMDS endpoint (169.254.169.254).
36
- *
37
- * @param logger - Logger instance for recording endpoint discovery and validation
38
- * @param nodeStorage - NodeStorage instance for token caching
39
- * @param networkClient - Network client for HTTP requests
40
- * @param cryptoProvider - CryptoProvider for cryptographic operations
41
- * @param disableInternalRetries - Whether to disable built-in retry logic
42
- *
43
- * @returns A configured Imds instance ready to make token requests
44
- */
45
- static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean): Imds;
46
- /**
47
- * Creates a properly configured HTTP request for acquiring an access token from IMDS.
48
- *
49
- * This method builds a complete request object with all necessary headers, query parameters,
50
- * and retry policies required by the Azure Instance Metadata Service.
51
- *
52
- * Key request components:
53
- * - HTTP GET method to the IMDS token endpoint
54
- * - Metadata header set to "true" (required by IMDS)
55
- * - API version parameter (currently "2018-02-01")
56
- * - Resource parameter specifying the target audience
57
- * - Identity-specific parameters for user-assigned managed identities
58
- * - IMDS-specific retry policy
59
- *
60
- * @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
61
- * @param managedIdentityId - The managed identity configuration specifying whether to use system-assigned or user-assigned identity
62
- *
63
- * @returns A configured ManagedIdentityRequestParameters object ready for network execution
64
- */
65
- createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
66
- }
67
- //# sourceMappingURL=Imds.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Imds.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/Imds.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAShE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AASzD;;;;;;;;GAQG;AACH,qBAAa,IAAK,SAAQ,yBAAyB;IAC/C,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;;;;;;;;;;;;;;;OAeG;WACW,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,GAChC,IAAI;IAiDP;;;;;;;;;;;;;;;;;;OAkBG;IACI,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA+BtC"}
@@ -1,81 +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
- export declare const MANAGED_IDENTITY_MACHINE_LEARNING_UNSUPPORTED_ID_TYPE_ERROR: string;
8
- /**
9
- * Machine Learning Managed Identity Source implementation for Azure Machine Learning environments.
10
- *
11
- * This class handles managed identity authentication specifically for Azure Machine Learning services.
12
- * It supports both system-assigned and user-assigned managed identities, using the MSI_ENDPOINT
13
- * and MSI_SECRET environment variables that are automatically provided in Azure ML environments.
14
- */
15
- export declare class MachineLearning extends BaseManagedIdentitySource {
16
- private msiEndpoint;
17
- private secret;
18
- /**
19
- * Creates a new MachineLearning managed identity source instance.
20
- *
21
- * @param logger - Logger instance for diagnostic information
22
- * @param nodeStorage - Node storage implementation for caching
23
- * @param networkClient - Network client for making HTTP requests
24
- * @param cryptoProvider - Cryptographic operations provider
25
- * @param disableInternalRetries - Whether to disable automatic request retries
26
- * @param msiEndpoint - The MSI endpoint URL from environment variables
27
- * @param secret - The MSI secret from environment variables
28
- */
29
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, msiEndpoint: string, secret: string);
30
- /**
31
- * Retrieves the required environment variables for Azure Machine Learning managed identity.
32
- *
33
- * This method checks for the presence of MSI_ENDPOINT and MSI_SECRET environment variables
34
- * that are automatically set by the Azure Machine Learning platform when managed identity
35
- * is enabled for the compute instance or cluster.
36
- *
37
- * @returns An array containing [msiEndpoint, secret] where either value may be undefined
38
- * if the corresponding environment variable is not set
39
- */
40
- static getEnvironmentVariables(): Array<string | undefined>;
41
- /**
42
- * Attempts to create a MachineLearning managed identity source.
43
- *
44
- * This method validates the Azure Machine Learning environment by checking for the required
45
- * MSI_ENDPOINT and MSI_SECRET environment variables. If both are present and valid,
46
- * it creates and returns a MachineLearning instance. If either is missing or invalid,
47
- * it returns null, indicating that this managed identity source is not available
48
- * in the current environment.
49
- *
50
- * @param logger - Logger instance for diagnostic information
51
- * @param nodeStorage - Node storage implementation for caching
52
- * @param networkClient - Network client for making HTTP requests
53
- * @param cryptoProvider - Cryptographic operations provider
54
- * @param disableInternalRetries - Whether to disable automatic request retries
55
- *
56
- * @returns A new MachineLearning instance if the environment is valid, null otherwise
57
- */
58
- static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean): MachineLearning | null;
59
- /**
60
- * Creates a managed identity token request for Azure Machine Learning environments.
61
- *
62
- * This method constructs the HTTP request parameters needed to acquire an access token
63
- * from the Azure Machine Learning managed identity endpoint. It handles both system-assigned
64
- * and user-assigned managed identities with specific logic for each type:
65
- *
66
- * - System-assigned: Uses the DEFAULT_IDENTITY_CLIENT_ID environment variable
67
- * - User-assigned: Only supports client ID-based identification (not object ID or resource ID)
68
- *
69
- * The request uses the 2017-09-01 API version and includes the required secret header
70
- * for authentication with the MSI endpoint.
71
- *
72
- * @param resource - The target resource/scope for which to request an access token (e.g., "https://graph.microsoft.com/.default")
73
- * @param managedIdentityId - The managed identity configuration specifying whether to use system-assigned or user-assigned identity
74
- *
75
- * @returns A configured ManagedIdentityRequestParameters object ready for network execution
76
- *
77
- * @throws Error if an unsupported managed identity ID type is specified (only client ID is supported for user-assigned)
78
- */
79
- createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
80
- }
81
- //# sourceMappingURL=MachineLearning.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MachineLearning.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/MachineLearning.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EACH,yBAAyB,EAE5B,MAAM,gCAAgC,CAAC;AASxC,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;AAIzD,eAAO,MAAM,2DAA2D,QAAsH,CAAC;AAE/L;;;;;;GAMG;AACH,qBAAa,eAAgB,SAAQ,yBAAyB;IAC1D,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;;;;;;OAUG;gBAEC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,EAC/B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM;IAclB;;;;;;;;;OASG;WACW,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAUlE;;;;;;;;;;;;;;;;OAgBG;WACW,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,OAAO,GAChC,eAAe,GAAG,IAAI;IAoCzB;;;;;;;;;;;;;;;;;;;OAmBG;IACI,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA8CtC"}
@@ -1,82 +0,0 @@
1
- import { INetworkModule, Logger } from "@azure/msal-common/node";
2
- import { ManagedIdentityId } from "../../config/ManagedIdentityId.js";
3
- import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js";
4
- import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js";
5
- import { NodeStorage } from "../../cache/NodeStorage.js";
6
- import { CryptoProvider } from "../../crypto/CryptoProvider.js";
7
- /**
8
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs
9
- */
10
- export declare class ServiceFabric extends BaseManagedIdentitySource {
11
- private identityEndpoint;
12
- private identityHeader;
13
- /**
14
- * Constructs a new ServiceFabric managed identity source for acquiring tokens from Azure Service Fabric clusters.
15
- *
16
- * Service Fabric managed identity allows applications running in Service Fabric clusters to authenticate
17
- * without storing credentials in code. This source handles token acquisition using the Service Fabric
18
- * Managed Identity Token Service (MITS).
19
- *
20
- * @param logger - Logger instance for logging authentication events and debugging information
21
- * @param nodeStorage - NodeStorage instance for caching tokens and other authentication artifacts
22
- * @param networkClient - Network client for making HTTP requests to the Service Fabric identity endpoint
23
- * @param cryptoProvider - Crypto provider for cryptographic operations like token validation
24
- * @param disableInternalRetries - Whether to disable internal retry logic for failed requests
25
- * @param identityEndpoint - The Service Fabric managed identity endpoint URL
26
- * @param identityHeader - The Service Fabric managed identity secret header value
27
- */
28
- constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, identityEndpoint: string, identityHeader: string);
29
- /**
30
- * Retrieves the environment variables required for Service Fabric managed identity authentication.
31
- *
32
- * Service Fabric managed identity requires three specific environment variables to be set by the
33
- * Service Fabric runtime:
34
- * - IDENTITY_ENDPOINT: The endpoint URL for the Managed Identity Token Service (MITS)
35
- * - IDENTITY_HEADER: A secret value used for authentication with the MITS
36
- * - IDENTITY_SERVER_THUMBPRINT: The thumbprint of the MITS server certificate for secure communication
37
- *
38
- * @returns An array containing the identity endpoint, identity header, and identity server thumbprint values.
39
- * Elements will be undefined if the corresponding environment variables are not set.
40
- */
41
- static getEnvironmentVariables(): Array<string | undefined>;
42
- /**
43
- * Attempts to create a ServiceFabric managed identity source if the runtime environment supports it.
44
- *
45
- * Checks for the presence of all required Service Fabric environment variables
46
- * and validates the endpoint URL format. It will only create a ServiceFabric instance if the application
47
- * is running in a properly configured Service Fabric cluster with managed identity enabled.
48
- *
49
- * Note: User-assigned managed identities must be configured at the cluster level, not at runtime.
50
- * This method will log a warning if a user-assigned identity is requested.
51
- *
52
- * @param logger - Logger instance for logging creation events and validation results
53
- * @param nodeStorage - NodeStorage instance for caching tokens and authentication artifacts
54
- * @param networkClient - Network client for making HTTP requests to the identity endpoint
55
- * @param cryptoProvider - Crypto provider for cryptographic operations
56
- * @param disableInternalRetries - Whether to disable internal retry logic for failed requests
57
- * @param managedIdentityId - Managed identity identifier specifying system-assigned or user-assigned identity
58
- *
59
- * @returns A ServiceFabric instance if all environment variables are valid and present, otherwise null
60
- */
61
- static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, disableInternalRetries: boolean, managedIdentityId: ManagedIdentityId): ServiceFabric | null;
62
- /**
63
- * Creates HTTP request parameters for acquiring an access token from the Service Fabric Managed Identity Token Service (MITS).
64
- *
65
- * This method constructs a properly formatted HTTP GET request that includes:
66
- * - The secret header for authentication with MITS
67
- * - API version parameter for the Service Fabric MSI endpoint
68
- * - Resource parameter specifying the target Azure service
69
- * - Optional identity parameters for user-assigned managed identities
70
- *
71
- * The request follows the Service Fabric managed identity protocol and uses the 2019-07-01-preview API version.
72
- * For user-assigned identities, the appropriate query parameter (client_id, object_id, or resource_id) is added
73
- * based on the identity type.
74
- *
75
- * @param resource - The Azure resource URI for which the access token is requested (e.g., "https://vault.azure.net/")
76
- * @param managedIdentityId - The managed identity configuration specifying system-assigned or user-assigned identity details
77
- *
78
- * @returns A configured ManagedIdentityRequestParameters object ready for network execution
79
- */
80
- createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters;
81
- }
82
- //# sourceMappingURL=ServiceFabric.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServiceFabric.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/ServiceFabric.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAYhE;;GAEG;AACH,qBAAa,aAAc,SAAQ,yBAAyB;IACxD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;IAE/B;;;;;;;;;;;;;;OAcG;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;;;;;;;;;;;OAWG;WACW,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAkBlE;;;;;;;;;;;;;;;;;;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,aAAa,GAAG,IAAI;IA6CvB;;;;;;;;;;;;;;;;;OAiBG;IACI,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA6BtC"}
@@ -1,50 +0,0 @@
1
- import { AuthenticationResult, ClientConfiguration } from "@azure/msal-common/node";
2
- import { CommonOnBehalfOfRequest } from "../request/CommonOnBehalfOfRequest.js";
3
- import { BaseClient } from "./BaseClient.js";
4
- /**
5
- * On-Behalf-Of client
6
- * @public
7
- */
8
- export declare class OnBehalfOfClient extends BaseClient {
9
- private scopeSet;
10
- private userAssertionHash;
11
- constructor(configuration: ClientConfiguration);
12
- /**
13
- * Public API to acquire tokens with on behalf of flow
14
- * @param request - developer provided CommonOnBehalfOfRequest
15
- */
16
- acquireToken(request: CommonOnBehalfOfRequest): Promise<AuthenticationResult | null>;
17
- /**
18
- * look up cache for tokens
19
- * Find idtoken in the cache
20
- * Find accessToken based on user assertion and account info in the cache
21
- * Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires
22
- * This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session
23
- * @param request - developer provided CommonOnBehalfOfRequest
24
- */
25
- private getCachedAuthenticationResult;
26
- /**
27
- * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager
28
- * Certain use cases of OBO flow do not expect an idToken in the cache/or from the service
29
- * @param atHomeAccountId - account id
30
- */
31
- private readIdTokenFromCacheForOBO;
32
- /**
33
- * Fetches the cached access token based on incoming assertion
34
- * @param clientId - client id
35
- * @param request - developer provided CommonOnBehalfOfRequest
36
- */
37
- private readAccessTokenFromCacheForOBO;
38
- /**
39
- * Make a network call to the server requesting credentials
40
- * @param request - developer provided CommonOnBehalfOfRequest
41
- * @param authority - authority object
42
- */
43
- private executeTokenRequest;
44
- /**
45
- * generate a server request in accepable format
46
- * @param request - developer provided CommonOnBehalfOfRequest
47
- */
48
- private createTokenRequestBody;
49
- }
50
- //# sourceMappingURL=OnBehalfOfClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OnBehalfOfClient.d.ts","sourceRoot":"","sources":["../../../src/client/OnBehalfOfClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,oBAAoB,EAIpB,mBAAmB,EAetB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,aAAa,EAAE,mBAAmB;IAI9C;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;;;;;OAOG;YACW,6BAA6B;IAwF3C;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;;OAIG;IACH,OAAO,CAAC,8BAA8B;IA4CtC;;;;OAIG;YACW,mBAAmB;IA6DjC;;;OAGG;YACW,sBAAsB;CA0FvC"}
@@ -1,85 +0,0 @@
1
- import { AuthenticationResult, AccountInfo, AuthorizationCodePayload } from "@azure/msal-common/node";
2
- import { Configuration } from "../config/Configuration.js";
3
- import { ClientApplication } from "./ClientApplication.js";
4
- import { IPublicClientApplication } from "./IPublicClientApplication.js";
5
- import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js";
6
- import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
7
- import { InteractiveRequest } from "../request/InteractiveRequest.js";
8
- import { SilentFlowRequest } from "../request/SilentFlowRequest.js";
9
- import { SignOutRequest } from "../request/SignOutRequest.js";
10
- import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js";
11
- /**
12
- * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications
13
- * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user.
14
- * @public
15
- */
16
- export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication {
17
- private nativeBrokerPlugin?;
18
- private readonly skus;
19
- /**
20
- * Important attributes in the Configuration object for auth are:
21
- * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal.
22
- * - authority: the authority URL for your application.
23
- *
24
- * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
25
- * - 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).
26
- * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
27
- * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
28
- * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
29
- *
30
- * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered
31
- * its own authority. You will have to set the all of the knownAuthorities at the time of the client application
32
- * construction.
33
- *
34
- * ADFS authorities are of the form https://\{instance\}/adfs.
35
- */
36
- constructor(configuration: Configuration);
37
- /**
38
- * Acquires a token from the authority using OAuth2.0 device code flow.
39
- * This flow is designed for devices that do not have access to a browser or have input constraints.
40
- * The authorization server issues a DeviceCode object with a verification code, an end-user code,
41
- * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be
42
- * instructed to use another device to navigate to the verification URI to input credentials.
43
- * Since the client cannot receive incoming requests, it polls the authorization server repeatedly
44
- * until the end-user completes input of credentials.
45
- */
46
- acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise<AuthenticationResult | null>;
47
- /**
48
- * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token.
49
- */
50
- acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult>;
51
- /**
52
- * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker.
53
- * @param request - developer provided SilentFlowRequest
54
- * @returns
55
- */
56
- acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
57
- /**
58
- * Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow.
59
- * In MCP mode, a resource parameter is required on the request.
60
- */
61
- acquireTokenByCode(request: AuthorizationCodeRequest, authCodePayLoad?: AuthorizationCodePayload): Promise<AuthenticationResult>;
62
- /**
63
- * Acquires a token by exchanging the refresh token provided for a new set of tokens.
64
- * In MCP mode, a resource parameter is required on the request.
65
- */
66
- acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
67
- /**
68
- * Removes cache artifacts associated with the given account
69
- * @param request - developer provided SignOutRequest
70
- * @returns
71
- */
72
- signOut(request: SignOutRequest): Promise<void>;
73
- /**
74
- * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker.
75
- * @returns
76
- */
77
- getAllAccounts(): Promise<AccountInfo[]>;
78
- /**
79
- * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw.
80
- * @param loopbackClient - developer provided custom loopback server implementation
81
- * @returns
82
- */
83
- private waitForRedirectUri;
84
- }
85
- //# sourceMappingURL=PublicClientApplication.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAMpB,WAAW,EAKX,wBAAwB,EAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAKxE;;;;GAIG;AACH,qBAAa,uBACT,SAAQ,iBACR,YAAW,wBAAwB;IAEnC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAqBxC;;;;;;;;OAQG;IACU,wBAAwB,CACjC,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA0CvC;;OAEG;IACG,uBAAuB,CACzB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IA2GhC;;;;OAIG;IACG,kBAAkB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IAoChC;;;OAGG;IACG,kBAAkB,CACpB,OAAO,EAAE,wBAAwB,EACjC,eAAe,CAAC,EAAE,wBAAwB,GAC3C,OAAO,CAAC,oBAAoB,CAAC;IAKhC;;;OAGG;IACG,0BAA0B,CAC5B,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAKvC;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBrD;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAY9C;;;;OAIG;YACW,kBAAkB;CAsCnC"}
@@ -1,30 +0,0 @@
1
- import { AuthenticationResult, ClientConfiguration } from "@azure/msal-common/node";
2
- import { CommonUsernamePasswordRequest } from "../request/CommonUsernamePasswordRequest.js";
3
- import { BaseClient } from "./BaseClient.js";
4
- /**
5
- * Oauth2.0 Password grant client
6
- * Note: We are only supporting public clients for password grant and for purely testing purposes
7
- * @public
8
- * @deprecated - Use a more secure flow instead
9
- */
10
- export declare class UsernamePasswordClient extends BaseClient {
11
- constructor(configuration: ClientConfiguration);
12
- /**
13
- * API to acquire a token by passing the username and password to the service in exchage of credentials
14
- * password_grant
15
- * @param request - CommonUsernamePasswordRequest
16
- */
17
- acquireToken(request: CommonUsernamePasswordRequest): Promise<AuthenticationResult | null>;
18
- /**
19
- * Executes POST request to token endpoint
20
- * @param authority - authority object
21
- * @param request - CommonUsernamePasswordRequest provided by the developer
22
- */
23
- private executeTokenRequest;
24
- /**
25
- * Generates a map for all the params to be sent to the service
26
- * @param request - CommonUsernamePasswordRequest provided by the developer
27
- */
28
- private createTokenRequestBody;
29
- }
30
- //# sourceMappingURL=UsernamePasswordClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UsernamePasswordClient.d.ts","sourceRoot":"","sources":["../../../src/client/UsernamePasswordClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EAIpB,mBAAmB,EAYtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;gBACtC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACG,YAAY,CACd,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAsCvC;;;;OAIG;YACW,mBAAmB;IAmCjC;;;OAGG;YACW,sBAAsB;CA6FvC"}