@azure/identity 4.13.0 → 4.13.2

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 (540) hide show
  1. package/dist/browser/constants.d.ts +1 -1
  2. package/dist/browser/constants.js +1 -1
  3. package/dist/browser/constants.js.map +1 -1
  4. package/dist/browser/credentials/{authorizationCodeCredential.d.ts → authorizationCodeCredential-browser.d.mts} +2 -2
  5. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -1
  6. package/dist/browser/credentials/{authorizationCodeCredential.js → authorizationCodeCredential-browser.mjs} +1 -1
  7. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -1
  8. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  9. package/dist/browser/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  10. package/dist/browser/credentials/azureCliCredential-browser.d.mts +14 -0
  11. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -1
  12. package/dist/browser/credentials/{azureCliCredential.js → azureCliCredential-browser.mjs} +2 -2
  13. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -1
  14. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts +14 -0
  15. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -1
  16. package/dist/browser/credentials/{azureDeveloperCliCredential.js → azureDeveloperCliCredential-browser.mjs} +2 -2
  17. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -1
  18. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts +14 -0
  19. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -1
  20. package/dist/browser/credentials/{azurePipelinesCredential.js → azurePipelinesCredential-browser.mjs} +2 -2
  21. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -1
  22. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  23. package/dist/browser/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  24. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts +13 -0
  25. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -1
  26. package/dist/browser/credentials/{azurePowerShellCredential.js → azurePowerShellCredential-browser.mjs} +2 -2
  27. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -1
  28. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts +13 -0
  29. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -1
  30. package/dist/browser/credentials/{clientAssertionCredential.js → clientAssertionCredential-browser.mjs} +2 -2
  31. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -1
  32. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  33. package/dist/browser/credentials/clientAssertionCredentialOptions.js.map +1 -1
  34. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts +15 -0
  35. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -1
  36. package/dist/browser/credentials/{clientCertificateCredential.js → clientCertificateCredential-browser.mjs} +2 -2
  37. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -1
  38. package/dist/browser/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  39. package/dist/browser/credentials/clientCertificateCredentialModels.js.map +1 -1
  40. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  41. package/dist/browser/credentials/clientCertificateCredentialOptions.js.map +1 -1
  42. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  43. package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -1
  44. package/dist/browser/credentials/{defaultAzureCredential.d.ts → defaultAzureCredential-browser.d.mts} +2 -2
  45. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -1
  46. package/dist/browser/credentials/{defaultAzureCredential.js → defaultAzureCredential-browser.mjs} +1 -1
  47. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -1
  48. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  49. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -1
  50. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts +14 -0
  51. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -1
  52. package/dist/browser/credentials/{deviceCodeCredential.js → deviceCodeCredential-browser.mjs} +2 -2
  53. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -1
  54. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  55. package/dist/browser/credentials/deviceCodeCredentialOptions.js.map +1 -1
  56. package/dist/browser/credentials/environmentCredential-browser.d.mts +14 -0
  57. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -1
  58. package/dist/browser/credentials/{environmentCredential.js → environmentCredential-browser.mjs} +2 -2
  59. package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -1
  60. package/dist/browser/credentials/environmentCredentialOptions.d.ts.map +1 -1
  61. package/dist/browser/credentials/environmentCredentialOptions.js.map +1 -1
  62. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  63. package/dist/browser/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  64. package/dist/browser/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  65. package/dist/browser/credentials/interactiveCredentialOptions.js.map +1 -1
  66. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts +11 -0
  67. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -1
  68. package/dist/browser/credentials/managedIdentityCredential/{index.js → index-browser.mjs} +2 -2
  69. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -1
  70. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts +13 -0
  71. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -1
  72. package/dist/browser/credentials/{onBehalfOfCredential.js → onBehalfOfCredential-browser.mjs} +2 -2
  73. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -1
  74. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -1
  75. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  76. package/dist/browser/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  77. package/dist/browser/credentials/{visualStudioCodeCredential.d.ts → visualStudioCodeCredential-browser.d.mts} +4 -3
  78. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -1
  79. package/dist/browser/credentials/{visualStudioCodeCredential.js → visualStudioCodeCredential-browser.mjs} +2 -2
  80. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -1
  81. package/dist/browser/credentials/{workloadIdentityCredential.d.ts → workloadIdentityCredential-browser.d.mts} +4 -3
  82. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -1
  83. package/dist/browser/credentials/{workloadIdentityCredential.js → workloadIdentityCredential-browser.mjs} +2 -2
  84. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -1
  85. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  86. package/dist/browser/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  87. package/dist/browser/index.d.ts +51 -51
  88. package/dist/browser/index.d.ts.map +1 -1
  89. package/dist/browser/index.js +19 -19
  90. package/dist/browser/index.js.map +1 -1
  91. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  92. package/dist/browser/msal/browserFlows/msalBrowserCommon.js +4 -4
  93. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  94. package/dist/browser/msal/utils.d.ts +1 -1
  95. package/dist/browser/msal/utils.d.ts.map +1 -1
  96. package/dist/browser/msal/utils.js +1 -1
  97. package/dist/browser/msal/utils.js.map +1 -1
  98. package/dist/browser/util/tenantIdUtils.d.ts +1 -1
  99. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -1
  100. package/dist/browser/util/tenantIdUtils.js +1 -1
  101. package/dist/browser/util/tenantIdUtils.js.map +1 -1
  102. package/dist/commonjs/client/identityClient.js +263 -252
  103. package/dist/commonjs/client/identityClient.js.map +7 -1
  104. package/dist/commonjs/constants.d.ts +1 -1
  105. package/dist/commonjs/constants.js +61 -78
  106. package/dist/commonjs/constants.js.map +7 -1
  107. package/dist/commonjs/credentials/authorityValidationOptions.js +16 -5
  108. package/dist/commonjs/credentials/authorityValidationOptions.js.map +7 -1
  109. package/dist/commonjs/credentials/authorizationCodeCredential.js +99 -75
  110. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +7 -1
  111. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  112. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +16 -5
  113. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +7 -1
  114. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -1
  115. package/dist/commonjs/credentials/azureCliCredential.js +228 -214
  116. package/dist/commonjs/credentials/azureCliCredential.js.map +7 -1
  117. package/dist/commonjs/credentials/azureCliCredentialOptions.js +16 -5
  118. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +7 -1
  119. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  120. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +192 -202
  121. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +7 -1
  122. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +16 -5
  123. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +7 -1
  124. package/dist/commonjs/credentials/azurePipelinesCredential.js +173 -135
  125. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +7 -1
  126. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  127. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +16 -5
  128. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +7 -1
  129. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts +10 -0
  130. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -1
  131. package/dist/commonjs/credentials/azurePowerShellCredential.js +229 -208
  132. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +7 -1
  133. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +16 -5
  134. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +7 -1
  135. package/dist/commonjs/credentials/brokerAuthOptions.js +16 -3
  136. package/dist/commonjs/credentials/brokerAuthOptions.js.map +7 -1
  137. package/dist/commonjs/credentials/brokerCredential.d.ts +2 -2
  138. package/dist/commonjs/credentials/brokerCredential.d.ts.map +1 -1
  139. package/dist/commonjs/credentials/brokerCredential.js +104 -71
  140. package/dist/commonjs/credentials/brokerCredential.js.map +7 -1
  141. package/dist/commonjs/credentials/browserCustomizationOptions.js +16 -5
  142. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +7 -1
  143. package/dist/commonjs/credentials/chainedTokenCredential.js +113 -93
  144. package/dist/commonjs/credentials/chainedTokenCredential.js.map +7 -1
  145. package/dist/commonjs/credentials/clientAssertionCredential.js +102 -64
  146. package/dist/commonjs/credentials/clientAssertionCredential.js.map +7 -1
  147. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  148. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +16 -5
  149. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +7 -1
  150. package/dist/commonjs/credentials/clientCertificateCredential.js +139 -134
  151. package/dist/commonjs/credentials/clientCertificateCredential.js.map +7 -1
  152. package/dist/commonjs/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  153. package/dist/commonjs/credentials/clientCertificateCredentialModels.js +16 -5
  154. package/dist/commonjs/credentials/clientCertificateCredentialModels.js.map +7 -1
  155. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  156. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +16 -5
  157. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +7 -1
  158. package/dist/commonjs/credentials/clientSecretCredential.js +97 -68
  159. package/dist/commonjs/credentials/clientSecretCredential.js.map +7 -1
  160. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  161. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +16 -5
  162. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +7 -1
  163. package/dist/commonjs/credentials/credentialPersistenceOptions.js +16 -5
  164. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +7 -1
  165. package/dist/commonjs/credentials/defaultAzureCredential.js +121 -159
  166. package/dist/commonjs/credentials/defaultAzureCredential.js.map +7 -1
  167. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +110 -140
  168. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +7 -1
  169. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  170. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +16 -5
  171. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +7 -1
  172. package/dist/commonjs/credentials/deviceCodeCredential.js +133 -104
  173. package/dist/commonjs/credentials/deviceCodeCredential.js.map +7 -1
  174. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  175. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +16 -5
  176. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +7 -1
  177. package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -1
  178. package/dist/commonjs/credentials/environmentCredential.js +157 -123
  179. package/dist/commonjs/credentials/environmentCredential.js.map +7 -1
  180. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -1
  181. package/dist/commonjs/credentials/environmentCredentialOptions.js +16 -5
  182. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +7 -1
  183. package/dist/commonjs/credentials/interactiveBrowserCredential.js +145 -108
  184. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +7 -1
  185. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  186. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +16 -5
  187. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +7 -1
  188. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  189. package/dist/commonjs/credentials/interactiveCredentialOptions.js +16 -5
  190. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +7 -1
  191. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +92 -91
  192. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +7 -1
  193. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +51 -44
  194. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +7 -1
  195. package/dist/commonjs/credentials/managedIdentityCredential/index.js +256 -242
  196. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +7 -1
  197. package/dist/commonjs/credentials/managedIdentityCredential/models.js +16 -5
  198. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +7 -1
  199. package/dist/commonjs/credentials/managedIdentityCredential/options.js +16 -5
  200. package/dist/commonjs/credentials/managedIdentityCredential/options.js.map +7 -1
  201. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +56 -39
  202. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +7 -1
  203. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +79 -75
  204. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +7 -1
  205. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +16 -5
  206. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +7 -1
  207. package/dist/commonjs/credentials/onBehalfOfCredential.js +169 -127
  208. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +7 -1
  209. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +16 -5
  210. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +7 -1
  211. package/dist/commonjs/credentials/usernamePasswordCredential.js +113 -76
  212. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +7 -1
  213. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  214. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +16 -5
  215. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +7 -1
  216. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  217. package/dist/commonjs/credentials/visualStudioCodeCredential.js +144 -132
  218. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +7 -1
  219. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +16 -5
  220. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +7 -1
  221. package/dist/commonjs/credentials/workloadIdentityCredential.js +123 -109
  222. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +7 -1
  223. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  224. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +16 -5
  225. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +7 -1
  226. package/dist/commonjs/errors.js +131 -132
  227. package/dist/commonjs/errors.js.map +7 -1
  228. package/dist/commonjs/index.d.ts +33 -33
  229. package/dist/commonjs/index.d.ts.map +1 -1
  230. package/dist/commonjs/index.js +115 -67
  231. package/dist/commonjs/index.js.map +7 -1
  232. package/dist/commonjs/msal/msal.js +38 -9
  233. package/dist/commonjs/msal/msal.js.map +7 -1
  234. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +16 -3
  235. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +7 -1
  236. package/dist/commonjs/msal/nodeFlows/msalClient.js +449 -478
  237. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +7 -1
  238. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  239. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +140 -147
  240. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +7 -1
  241. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +16 -5
  242. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +7 -1
  243. package/dist/commonjs/msal/types.js +16 -5
  244. package/dist/commonjs/msal/types.js.map +7 -1
  245. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  246. package/dist/commonjs/msal/utils.js +179 -224
  247. package/dist/commonjs/msal/utils.js.map +7 -1
  248. package/dist/commonjs/plugins/consumer.js +32 -40
  249. package/dist/commonjs/plugins/consumer.js.map +7 -1
  250. package/dist/commonjs/plugins/provider.js +16 -5
  251. package/dist/commonjs/plugins/provider.js.map +7 -1
  252. package/dist/commonjs/regionalAuthority.js +93 -141
  253. package/dist/commonjs/regionalAuthority.js.map +7 -1
  254. package/dist/commonjs/tokenCredentialOptions.js +16 -5
  255. package/dist/commonjs/tokenCredentialOptions.js.map +7 -1
  256. package/dist/commonjs/tokenProvider.js +52 -52
  257. package/dist/commonjs/tokenProvider.js.map +7 -1
  258. package/dist/commonjs/tsdoc-metadata.json +1 -1
  259. package/dist/commonjs/util/identityTokenEndpoint.js +32 -12
  260. package/dist/commonjs/util/identityTokenEndpoint.js.map +7 -1
  261. package/dist/commonjs/util/logging.js +91 -97
  262. package/dist/commonjs/util/logging.js.map +7 -1
  263. package/dist/commonjs/util/processMultiTenantRequest.js +43 -33
  264. package/dist/commonjs/util/processMultiTenantRequest.js.map +7 -1
  265. package/dist/commonjs/util/processUtils.d.ts +14 -3
  266. package/dist/commonjs/util/processUtils.d.ts.map +1 -1
  267. package/dist/commonjs/util/processUtils.js +67 -35
  268. package/dist/commonjs/util/processUtils.js.map +7 -1
  269. package/dist/commonjs/util/scopeUtils.js +39 -28
  270. package/dist/commonjs/util/scopeUtils.js.map +7 -1
  271. package/dist/commonjs/util/subscriptionUtils.js +35 -17
  272. package/dist/commonjs/util/subscriptionUtils.js.map +7 -1
  273. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -1
  274. package/dist/commonjs/util/tenantIdUtils.js +61 -45
  275. package/dist/commonjs/util/tenantIdUtils.js.map +7 -1
  276. package/dist/commonjs/util/tracing.js +33 -16
  277. package/dist/commonjs/util/tracing.js.map +7 -1
  278. package/dist/esm/constants.d.ts +1 -1
  279. package/dist/esm/constants.js +1 -1
  280. package/dist/esm/constants.js.map +1 -1
  281. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  282. package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  283. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -1
  284. package/dist/esm/credentials/azureCliCredential.js +21 -24
  285. package/dist/esm/credentials/azureCliCredential.js.map +1 -1
  286. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  287. package/dist/esm/credentials/azureDeveloperCliCredential.js +16 -24
  288. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -1
  289. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -1
  290. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  291. package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  292. package/dist/esm/credentials/azurePowerShellCredential.d.ts +10 -0
  293. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -1
  294. package/dist/esm/credentials/azurePowerShellCredential.js +26 -6
  295. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -1
  296. package/dist/esm/credentials/brokerCredential.d.ts +2 -2
  297. package/dist/esm/credentials/brokerCredential.d.ts.map +1 -1
  298. package/dist/esm/credentials/brokerCredential.js.map +1 -1
  299. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  300. package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -1
  301. package/dist/esm/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  302. package/dist/esm/credentials/clientCertificateCredentialModels.js.map +1 -1
  303. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  304. package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -1
  305. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  306. package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -1
  307. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -1
  308. package/dist/esm/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  309. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  310. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -1
  311. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  312. package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -1
  313. package/dist/esm/credentials/environmentCredential.d.ts.map +1 -1
  314. package/dist/esm/credentials/environmentCredential.js.map +1 -1
  315. package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -1
  316. package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -1
  317. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  318. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  319. package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  320. package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -1
  321. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  322. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  323. package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  324. package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  325. package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -1
  326. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -1
  327. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  328. package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  329. package/dist/esm/index.d.ts +33 -33
  330. package/dist/esm/index.d.ts.map +1 -1
  331. package/dist/esm/index.js.map +1 -1
  332. package/dist/esm/msal/nodeFlows/msalClient.js +3 -3
  333. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -1
  334. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  335. package/dist/esm/msal/nodeFlows/msalPlugins.js.map +1 -1
  336. package/dist/esm/msal/utils.d.ts.map +1 -1
  337. package/dist/esm/msal/utils.js.map +1 -1
  338. package/dist/esm/util/processUtils.d.ts +14 -3
  339. package/dist/esm/util/processUtils.d.ts.map +1 -1
  340. package/dist/esm/util/processUtils.js +36 -19
  341. package/dist/esm/util/processUtils.js.map +1 -1
  342. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -1
  343. package/dist/esm/util/tenantIdUtils.js.map +1 -1
  344. package/dist/workerd/constants.d.ts +1 -1
  345. package/dist/workerd/constants.js +1 -1
  346. package/dist/workerd/constants.js.map +1 -1
  347. package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  348. package/dist/workerd/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  349. package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -1
  350. package/dist/workerd/credentials/azureCliCredential.js +21 -24
  351. package/dist/workerd/credentials/azureCliCredential.js.map +1 -1
  352. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  353. package/dist/workerd/credentials/azureDeveloperCliCredential.js +16 -24
  354. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -1
  355. package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -1
  356. package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  357. package/dist/workerd/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  358. package/dist/workerd/credentials/azurePowerShellCredential.d.ts +10 -0
  359. package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -1
  360. package/dist/workerd/credentials/azurePowerShellCredential.js +26 -6
  361. package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -1
  362. package/dist/workerd/credentials/brokerCredential.d.ts +2 -2
  363. package/dist/workerd/credentials/brokerCredential.d.ts.map +1 -1
  364. package/dist/workerd/credentials/brokerCredential.js.map +1 -1
  365. package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  366. package/dist/workerd/credentials/clientAssertionCredentialOptions.js.map +1 -1
  367. package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  368. package/dist/workerd/credentials/clientCertificateCredentialModels.js.map +1 -1
  369. package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  370. package/dist/workerd/credentials/clientCertificateCredentialOptions.js.map +1 -1
  371. package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  372. package/dist/workerd/credentials/clientSecretCredentialOptions.js.map +1 -1
  373. package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -1
  374. package/dist/workerd/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  375. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  376. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -1
  377. package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  378. package/dist/workerd/credentials/deviceCodeCredentialOptions.js.map +1 -1
  379. package/dist/workerd/credentials/environmentCredential.d.ts.map +1 -1
  380. package/dist/workerd/credentials/environmentCredential.js.map +1 -1
  381. package/dist/workerd/credentials/environmentCredentialOptions.d.ts.map +1 -1
  382. package/dist/workerd/credentials/environmentCredentialOptions.js.map +1 -1
  383. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  384. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  385. package/dist/workerd/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  386. package/dist/workerd/credentials/interactiveCredentialOptions.js.map +1 -1
  387. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  388. package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  389. package/dist/workerd/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  390. package/dist/workerd/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  391. package/dist/workerd/credentials/visualStudioCodeCredential.js.map +1 -1
  392. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -1
  393. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  394. package/dist/workerd/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  395. package/dist/workerd/index.d.ts +33 -33
  396. package/dist/workerd/index.d.ts.map +1 -1
  397. package/dist/workerd/index.js.map +1 -1
  398. package/dist/workerd/msal/nodeFlows/msalClient.js +3 -3
  399. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -1
  400. package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  401. package/dist/workerd/msal/nodeFlows/msalPlugins.js.map +1 -1
  402. package/dist/workerd/msal/utils.d.ts.map +1 -1
  403. package/dist/workerd/msal/utils.js.map +1 -1
  404. package/dist/workerd/util/processUtils.d.ts +14 -3
  405. package/dist/workerd/util/processUtils.d.ts.map +1 -1
  406. package/dist/workerd/util/processUtils.js +36 -19
  407. package/dist/workerd/util/processUtils.js.map +1 -1
  408. package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -1
  409. package/dist/workerd/util/tenantIdUtils.js.map +1 -1
  410. package/package.json +36 -38
  411. package/dist/browser/credentials/azureCliCredential.d.ts +0 -13
  412. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +0 -13
  413. package/dist/browser/credentials/azurePipelinesCredential.d.ts +0 -13
  414. package/dist/browser/credentials/azurePowerShellCredential.d.ts +0 -12
  415. package/dist/browser/credentials/brokerCredential.d.ts +0 -35
  416. package/dist/browser/credentials/brokerCredential.d.ts.map +0 -1
  417. package/dist/browser/credentials/brokerCredential.js +0 -69
  418. package/dist/browser/credentials/brokerCredential.js.map +0 -1
  419. package/dist/browser/credentials/clientAssertionCredential.d.ts +0 -12
  420. package/dist/browser/credentials/clientCertificateCredential.d.ts +0 -13
  421. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts +0 -64
  422. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts.map +0 -1
  423. package/dist/browser/credentials/defaultAzureCredentialFunctions.js +0 -147
  424. package/dist/browser/credentials/defaultAzureCredentialFunctions.js.map +0 -1
  425. package/dist/browser/credentials/deviceCodeCredential.d.ts +0 -13
  426. package/dist/browser/credentials/environmentCredential.d.ts +0 -13
  427. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +0 -18
  428. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +0 -1
  429. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +0 -97
  430. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  431. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +0 -13
  432. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +0 -1
  433. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -43
  434. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  435. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +0 -6
  436. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +0 -24
  437. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +0 -1
  438. package/dist/browser/credentials/managedIdentityCredential/models.js +0 -4
  439. package/dist/browser/credentials/managedIdentityCredential/models.js.map +0 -1
  440. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +0 -14
  441. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +0 -1
  442. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -38
  443. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  444. package/dist/browser/credentials/onBehalfOfCredential.d.ts +0 -12
  445. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  446. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  447. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  448. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  449. package/dist/browser/msal/nodeFlows/msalClient.d.ts +0 -199
  450. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +0 -1
  451. package/dist/browser/msal/nodeFlows/msalClient.js +0 -499
  452. package/dist/browser/msal/nodeFlows/msalClient.js.map +0 -1
  453. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +0 -109
  454. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +0 -1
  455. package/dist/browser/msal/nodeFlows/msalPlugins.js +0 -160
  456. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +0 -1
  457. package/dist/browser/regionalAuthority.d.ts +0 -122
  458. package/dist/browser/regionalAuthority.d.ts.map +0 -1
  459. package/dist/browser/regionalAuthority.js +0 -139
  460. package/dist/browser/regionalAuthority.js.map +0 -1
  461. package/dist/browser/util/authHostEnv-browser.d.mts +0 -4
  462. package/dist/browser/util/authHostEnv-browser.d.mts.map +0 -1
  463. package/dist/browser/util/authHostEnv-browser.mjs +0 -7
  464. package/dist/browser/util/authHostEnv-browser.mjs.map +0 -1
  465. package/dist/browser/util/processUtils.d.ts +0 -13
  466. package/dist/browser/util/processUtils.d.ts.map +0 -1
  467. package/dist/browser/util/processUtils.js +0 -32
  468. package/dist/browser/util/processUtils.js.map +0 -1
  469. package/dist/browser/util/subscriptionUtils.d.ts +0 -6
  470. package/dist/browser/util/subscriptionUtils.d.ts.map +0 -1
  471. package/dist/browser/util/subscriptionUtils.js +0 -16
  472. package/dist/browser/util/subscriptionUtils.js.map +0 -1
  473. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  474. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  475. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +0 -5
  476. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  477. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  478. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  479. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +0 -265
  480. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  481. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  482. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  483. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +0 -5
  484. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  485. package/dist/commonjs/msal/credentials.d.ts +0 -52
  486. package/dist/commonjs/msal/credentials.d.ts.map +0 -1
  487. package/dist/commonjs/msal/credentials.js +0 -5
  488. package/dist/commonjs/msal/credentials.js.map +0 -1
  489. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  490. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  491. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  492. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  493. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  494. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  495. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +0 -261
  496. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  497. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  498. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  499. package/dist/esm/msal/browserFlows/msalBrowserOptions.js +0 -4
  500. package/dist/esm/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  501. package/dist/esm/msal/credentials.d.ts +0 -52
  502. package/dist/esm/msal/credentials.d.ts.map +0 -1
  503. package/dist/esm/msal/credentials.js +0 -4
  504. package/dist/esm/msal/credentials.js.map +0 -1
  505. package/dist/esm/util/authHostEnv-browser.d.mts +0 -4
  506. package/dist/esm/util/authHostEnv-browser.d.mts.map +0 -1
  507. package/dist/esm/util/authHostEnv-browser.mjs +0 -7
  508. package/dist/esm/util/authHostEnv-browser.mjs.map +0 -1
  509. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  510. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  511. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  512. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  513. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  514. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  515. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +0 -261
  516. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  517. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  518. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  519. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +0 -4
  520. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  521. package/dist/workerd/msal/credentials.d.ts +0 -52
  522. package/dist/workerd/msal/credentials.d.ts.map +0 -1
  523. package/dist/workerd/msal/credentials.js +0 -4
  524. package/dist/workerd/msal/credentials.js.map +0 -1
  525. package/dist/workerd/util/authHostEnv-browser.d.mts +0 -4
  526. package/dist/workerd/util/authHostEnv-browser.d.mts.map +0 -1
  527. package/dist/workerd/util/authHostEnv-browser.mjs +0 -7
  528. package/dist/workerd/util/authHostEnv-browser.mjs.map +0 -1
  529. /package/dist/browser/credentials/{clientSecretCredential.d.ts → clientSecretCredential-browser.d.mts} +0 -0
  530. /package/dist/browser/credentials/{clientSecretCredential.js → clientSecretCredential-browser.mjs} +0 -0
  531. /package/dist/browser/credentials/{interactiveBrowserCredential.d.ts → interactiveBrowserCredential-browser.d.mts} +0 -0
  532. /package/dist/browser/credentials/{interactiveBrowserCredential.js → interactiveBrowserCredential-browser.mjs} +0 -0
  533. /package/dist/browser/credentials/{usernamePasswordCredential.d.ts → usernamePasswordCredential-browser.d.mts} +0 -0
  534. /package/dist/browser/credentials/{usernamePasswordCredential.js → usernamePasswordCredential-browser.mjs} +0 -0
  535. /package/dist/browser/msal/{msal.d.ts → msal-browser.d.mts} +0 -0
  536. /package/dist/browser/msal/{msal.js → msal-browser.mjs} +0 -0
  537. /package/dist/browser/plugins/{consumer.d.ts → consumer-browser.d.mts} +0 -0
  538. /package/dist/browser/plugins/{consumer.js → consumer-browser.mjs} +0 -0
  539. /package/dist/browser/util/{processMultiTenantRequest.d.ts → processMultiTenantRequest-browser.d.mts} +0 -0
  540. /package/dist/browser/util/{processMultiTenantRequest.js → processMultiTenantRequest-browser.mjs} +0 -0
@@ -1,13 +0,0 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
2
- /**
3
- * Enables authentication to Microsoft Entra ID using a PEM-encoded
4
- * certificate that is assigned to an App Registration.
5
- */
6
- export declare class ClientCertificateCredential implements TokenCredential {
7
- /**
8
- * Only available in Node.js
9
- */
10
- constructor();
11
- getToken(): Promise<AccessToken | null>;
12
- }
13
- //# sourceMappingURL=clientCertificateCredential-browser.d.mts.map
@@ -1,64 +0,0 @@
1
- import type { TokenCredential } from "@azure/core-auth";
2
- import type { DefaultAzureCredentialClientIdOptions, DefaultAzureCredentialOptions, DefaultAzureCredentialResourceIdOptions } from "./defaultAzureCredentialOptions.js";
3
- /**
4
- * Creates a {@link BrokerCredential} instance with the provided options.
5
- * This credential uses the Windows Authentication Manager (WAM) broker for authentication.
6
- * It will only attempt to authenticate silently using the default broker account
7
- *
8
- * @param options - Options for configuring the credential.
9
- *
10
- * @internal
11
- */
12
- export declare function createDefaultBrokerCredential(options?: DefaultAzureCredentialOptions): TokenCredential;
13
- /**
14
- * Creates a {@link VisualStudioCodeCredential} from the provided options.
15
- * @param options - Options to configure the credential.
16
- *
17
- * @internal
18
- */
19
- export declare function createDefaultVisualStudioCodeCredential(options?: DefaultAzureCredentialOptions): TokenCredential;
20
- /**
21
- * Creates a {@link ManagedIdentityCredential} from the provided options.
22
- * @param options - Options to configure the credential.
23
- *
24
- * @internal
25
- */
26
- export declare function createDefaultManagedIdentityCredential(options?: (DefaultAzureCredentialOptions | DefaultAzureCredentialResourceIdOptions | DefaultAzureCredentialClientIdOptions) & {
27
- sendProbeRequest?: boolean;
28
- }): TokenCredential;
29
- /**
30
- * Creates a {@link WorkloadIdentityCredential} from the provided options.
31
- * @param options - Options to configure the credential.
32
- *
33
- * @internal
34
- */
35
- export declare function createDefaultWorkloadIdentityCredential(options?: DefaultAzureCredentialOptions | DefaultAzureCredentialClientIdOptions): TokenCredential;
36
- /**
37
- * Creates a {@link AzureDeveloperCliCredential} from the provided options.
38
- * @param options - Options to configure the credential.
39
- *
40
- * @internal
41
- */
42
- export declare function createDefaultAzureDeveloperCliCredential(options?: DefaultAzureCredentialOptions): TokenCredential;
43
- /**
44
- * Creates a {@link AzureCliCredential} from the provided options.
45
- * @param options - Options to configure the credential.
46
- *
47
- * @internal
48
- */
49
- export declare function createDefaultAzureCliCredential(options?: DefaultAzureCredentialOptions): TokenCredential;
50
- /**
51
- * Creates a {@link AzurePowerShellCredential} from the provided options.
52
- * @param options - Options to configure the credential.
53
- *
54
- * @internal
55
- */
56
- export declare function createDefaultAzurePowershellCredential(options?: DefaultAzureCredentialOptions): TokenCredential;
57
- /**
58
- * Creates an {@link EnvironmentCredential} from the provided options.
59
- * @param options - Options to configure the credential.
60
- *
61
- * @internal
62
- */
63
- export declare function createDefaultEnvironmentCredential(options?: DefaultAzureCredentialOptions): TokenCredential;
64
- //# sourceMappingURL=defaultAzureCredentialFunctions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultAzureCredentialFunctions.d.ts","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredentialFunctions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EACV,qCAAqC,EACrC,6BAA6B,EAC7B,uCAAuC,EACxC,MAAM,oCAAoC,CAAC;AAe5C;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,GAAE,CACL,6BAA6B,GAC7B,uCAAuC,GACvC,qCAAqC,CACxC,GAAG;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,eAAe,CAkDjB;AAED;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,CAAC,EAAE,6BAA6B,GAAG,qCAAqC,GAC9E,eAAe,CA4BjB;AAED;;;;;GAKG;AACH,wBAAgB,wCAAwC,CACtD,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAEjB"}
@@ -1,147 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { EnvironmentCredential } from "./environmentCredential.js";
4
- import { ManagedIdentityCredential } from "./managedIdentityCredential/index.js";
5
- import { WorkloadIdentityCredential } from "./workloadIdentityCredential.js";
6
- import { AzureDeveloperCliCredential } from "./azureDeveloperCliCredential.js";
7
- import { AzureCliCredential } from "./azureCliCredential.js";
8
- import { AzurePowerShellCredential } from "./azurePowerShellCredential.js";
9
- import { VisualStudioCodeCredential } from "./visualStudioCodeCredential.js";
10
- import { BrokerCredential } from "./brokerCredential.js";
11
- /**
12
- * Creates a {@link BrokerCredential} instance with the provided options.
13
- * This credential uses the Windows Authentication Manager (WAM) broker for authentication.
14
- * It will only attempt to authenticate silently using the default broker account
15
- *
16
- * @param options - Options for configuring the credential.
17
- *
18
- * @internal
19
- */
20
- export function createDefaultBrokerCredential(options = {}) {
21
- return new BrokerCredential(options);
22
- }
23
- /**
24
- * Creates a {@link VisualStudioCodeCredential} from the provided options.
25
- * @param options - Options to configure the credential.
26
- *
27
- * @internal
28
- */
29
- export function createDefaultVisualStudioCodeCredential(options = {}) {
30
- return new VisualStudioCodeCredential(options);
31
- }
32
- /**
33
- * Creates a {@link ManagedIdentityCredential} from the provided options.
34
- * @param options - Options to configure the credential.
35
- *
36
- * @internal
37
- */
38
- export function createDefaultManagedIdentityCredential(options = {}) {
39
- options.retryOptions ??= {
40
- maxRetries: 5,
41
- retryDelayInMs: 800,
42
- };
43
- // ManagedIdentityCredential inside DAC chain should send a probe request by default.
44
- // This is different from standalone ManagedIdentityCredential behavior
45
- // or when AZURE_TOKEN_CREDENTIALS is set to only ManagedIdentityCredential.
46
- options.sendProbeRequest ??= true;
47
- const managedIdentityClientId = options?.managedIdentityClientId ??
48
- process.env.AZURE_CLIENT_ID;
49
- const workloadIdentityClientId = options?.workloadIdentityClientId ??
50
- managedIdentityClientId;
51
- const managedResourceId = options
52
- ?.managedIdentityResourceId;
53
- const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;
54
- const tenantId = options?.tenantId ?? process.env.AZURE_TENANT_ID;
55
- if (managedResourceId) {
56
- const managedIdentityResourceIdOptions = {
57
- ...options,
58
- resourceId: managedResourceId,
59
- };
60
- return new ManagedIdentityCredential(managedIdentityResourceIdOptions);
61
- }
62
- if (workloadFile && workloadIdentityClientId) {
63
- const workloadIdentityCredentialOptions = {
64
- ...options,
65
- tenantId: tenantId,
66
- };
67
- return new ManagedIdentityCredential(workloadIdentityClientId, workloadIdentityCredentialOptions);
68
- }
69
- if (managedIdentityClientId) {
70
- const managedIdentityClientOptions = {
71
- ...options,
72
- clientId: managedIdentityClientId,
73
- };
74
- return new ManagedIdentityCredential(managedIdentityClientOptions);
75
- }
76
- // We may be able to return a UnavailableCredential here, but that may be a breaking change
77
- return new ManagedIdentityCredential(options);
78
- }
79
- /**
80
- * Creates a {@link WorkloadIdentityCredential} from the provided options.
81
- * @param options - Options to configure the credential.
82
- *
83
- * @internal
84
- */
85
- export function createDefaultWorkloadIdentityCredential(options) {
86
- const managedIdentityClientId = options?.managedIdentityClientId ??
87
- process.env.AZURE_CLIENT_ID;
88
- const workloadIdentityClientId = options?.workloadIdentityClientId ??
89
- managedIdentityClientId;
90
- const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;
91
- const tenantId = options?.tenantId ?? process.env.AZURE_TENANT_ID;
92
- if (workloadFile && workloadIdentityClientId) {
93
- const workloadIdentityCredentialOptions = {
94
- ...options,
95
- tenantId,
96
- clientId: workloadIdentityClientId,
97
- tokenFilePath: workloadFile,
98
- };
99
- return new WorkloadIdentityCredential(workloadIdentityCredentialOptions);
100
- }
101
- if (tenantId) {
102
- const workloadIdentityClientTenantOptions = {
103
- ...options,
104
- tenantId,
105
- };
106
- return new WorkloadIdentityCredential(workloadIdentityClientTenantOptions);
107
- }
108
- // We may be able to return a UnavailableCredential here, but that may be a breaking change
109
- return new WorkloadIdentityCredential(options);
110
- }
111
- /**
112
- * Creates a {@link AzureDeveloperCliCredential} from the provided options.
113
- * @param options - Options to configure the credential.
114
- *
115
- * @internal
116
- */
117
- export function createDefaultAzureDeveloperCliCredential(options = {}) {
118
- return new AzureDeveloperCliCredential(options);
119
- }
120
- /**
121
- * Creates a {@link AzureCliCredential} from the provided options.
122
- * @param options - Options to configure the credential.
123
- *
124
- * @internal
125
- */
126
- export function createDefaultAzureCliCredential(options = {}) {
127
- return new AzureCliCredential(options);
128
- }
129
- /**
130
- * Creates a {@link AzurePowerShellCredential} from the provided options.
131
- * @param options - Options to configure the credential.
132
- *
133
- * @internal
134
- */
135
- export function createDefaultAzurePowershellCredential(options = {}) {
136
- return new AzurePowerShellCredential(options);
137
- }
138
- /**
139
- * Creates an {@link EnvironmentCredential} from the provided options.
140
- * @param options - Options to configure the credential.
141
- *
142
- * @internal
143
- */
144
- export function createDefaultEnvironmentCredential(options = {}) {
145
- return new EnvironmentCredential(options);
146
- }
147
- //# sourceMappingURL=defaultAzureCredentialFunctions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultAzureCredentialFunctions.js","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredentialFunctions.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type {\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialResourceIdOptions,\n} from \"./defaultAzureCredentialOptions.js\";\nimport { EnvironmentCredential } from \"./environmentCredential.js\";\nimport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n} from \"./managedIdentityCredential/options.js\";\nimport { ManagedIdentityCredential } from \"./managedIdentityCredential/index.js\";\nimport { WorkloadIdentityCredential } from \"./workloadIdentityCredential.js\";\nimport { AzureDeveloperCliCredential } from \"./azureDeveloperCliCredential.js\";\nimport { AzureCliCredential } from \"./azureCliCredential.js\";\nimport { AzurePowerShellCredential } from \"./azurePowerShellCredential.js\";\nimport type { WorkloadIdentityCredentialOptions } from \"./workloadIdentityCredentialOptions.js\";\nimport { VisualStudioCodeCredential } from \"./visualStudioCodeCredential.js\";\nimport { BrokerCredential } from \"./brokerCredential.js\";\n\n/**\n * Creates a {@link BrokerCredential} instance with the provided options.\n * This credential uses the Windows Authentication Manager (WAM) broker for authentication.\n * It will only attempt to authenticate silently using the default broker account\n *\n * @param options - Options for configuring the credential.\n *\n * @internal\n */\nexport function createDefaultBrokerCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new BrokerCredential(options);\n}\n\n/**\n * Creates a {@link VisualStudioCodeCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultVisualStudioCodeCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new VisualStudioCodeCredential(options);\n}\n\n/**\n * Creates a {@link ManagedIdentityCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultManagedIdentityCredential(\n options: (\n | DefaultAzureCredentialOptions\n | DefaultAzureCredentialResourceIdOptions\n | DefaultAzureCredentialClientIdOptions\n ) & { sendProbeRequest?: boolean } = {},\n): TokenCredential {\n options.retryOptions ??= {\n maxRetries: 5,\n retryDelayInMs: 800,\n };\n // ManagedIdentityCredential inside DAC chain should send a probe request by default.\n // This is different from standalone ManagedIdentityCredential behavior\n // or when AZURE_TOKEN_CREDENTIALS is set to only ManagedIdentityCredential.\n options.sendProbeRequest ??= true;\n const managedIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.managedIdentityClientId ??\n process.env.AZURE_CLIENT_ID;\n const workloadIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.workloadIdentityClientId ??\n managedIdentityClientId;\n const managedResourceId = (options as DefaultAzureCredentialResourceIdOptions)\n ?.managedIdentityResourceId;\n const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;\n const tenantId = options?.tenantId ?? process.env.AZURE_TENANT_ID;\n if (managedResourceId) {\n const managedIdentityResourceIdOptions: ManagedIdentityCredentialResourceIdOptions = {\n ...options,\n resourceId: managedResourceId,\n };\n return new ManagedIdentityCredential(managedIdentityResourceIdOptions);\n }\n\n if (workloadFile && workloadIdentityClientId) {\n const workloadIdentityCredentialOptions: DefaultAzureCredentialOptions = {\n ...options,\n tenantId: tenantId,\n };\n\n return new ManagedIdentityCredential(\n workloadIdentityClientId,\n workloadIdentityCredentialOptions,\n );\n }\n\n if (managedIdentityClientId) {\n const managedIdentityClientOptions: ManagedIdentityCredentialClientIdOptions = {\n ...options,\n clientId: managedIdentityClientId,\n };\n\n return new ManagedIdentityCredential(managedIdentityClientOptions);\n }\n\n // We may be able to return a UnavailableCredential here, but that may be a breaking change\n return new ManagedIdentityCredential(options);\n}\n\n/**\n * Creates a {@link WorkloadIdentityCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultWorkloadIdentityCredential(\n options?: DefaultAzureCredentialOptions | DefaultAzureCredentialClientIdOptions,\n): TokenCredential {\n const managedIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.managedIdentityClientId ??\n process.env.AZURE_CLIENT_ID;\n const workloadIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.workloadIdentityClientId ??\n managedIdentityClientId;\n const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;\n const tenantId = options?.tenantId ?? process.env.AZURE_TENANT_ID;\n if (workloadFile && workloadIdentityClientId) {\n const workloadIdentityCredentialOptions: WorkloadIdentityCredentialOptions = {\n ...options,\n tenantId,\n clientId: workloadIdentityClientId,\n tokenFilePath: workloadFile,\n };\n return new WorkloadIdentityCredential(workloadIdentityCredentialOptions);\n }\n if (tenantId) {\n const workloadIdentityClientTenantOptions: WorkloadIdentityCredentialOptions = {\n ...options,\n tenantId,\n };\n return new WorkloadIdentityCredential(workloadIdentityClientTenantOptions);\n }\n\n // We may be able to return a UnavailableCredential here, but that may be a breaking change\n return new WorkloadIdentityCredential(options);\n}\n\n/**\n * Creates a {@link AzureDeveloperCliCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultAzureDeveloperCliCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new AzureDeveloperCliCredential(options);\n}\n\n/**\n * Creates a {@link AzureCliCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultAzureCliCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new AzureCliCredential(options);\n}\n\n/**\n * Creates a {@link AzurePowerShellCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultAzurePowershellCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new AzurePowerShellCredential(options);\n}\n\n/**\n * Creates an {@link EnvironmentCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultEnvironmentCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new EnvironmentCredential(options);\n}\n"]}
@@ -1,13 +0,0 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
2
- /**
3
- * Enables authentication to Microsoft Entra ID using a device code
4
- * that the user can enter into https://microsoft.com/devicelogin.
5
- */
6
- export declare class DeviceCodeCredential implements TokenCredential {
7
- /**
8
- * Only available in Node.js
9
- */
10
- constructor();
11
- getToken(): Promise<AccessToken | null>;
12
- }
13
- //# sourceMappingURL=deviceCodeCredential-browser.d.mts.map
@@ -1,13 +0,0 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
2
- /**
3
- * Enables authentication to Microsoft Entra ID using client secret
4
- * details configured in environment variables
5
- */
6
- export declare class EnvironmentCredential implements TokenCredential {
7
- /**
8
- * Only available in Node.js
9
- */
10
- constructor();
11
- getToken(): Promise<AccessToken | null>;
12
- }
13
- //# sourceMappingURL=environmentCredential-browser.d.mts.map
@@ -1,18 +0,0 @@
1
- import type { GetTokenOptions } from "@azure/core-auth";
2
- import type { IdentityClient } from "../../client/identityClient.js";
3
- /**
4
- * Defines how to determine whether the Azure IMDS MSI is available.
5
- *
6
- * Actually getting the token once we determine IMDS is available is handled by MSAL.
7
- */
8
- export declare const imdsMsi: {
9
- name: string;
10
- isAvailable(options: {
11
- scopes: string | string[];
12
- identityClient?: IdentityClient;
13
- clientId?: string;
14
- resourceId?: string;
15
- getTokenOptions?: GetTokenOptions;
16
- }): Promise<boolean>;
17
- };
18
- //# sourceMappingURL=imdsMsi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imdsMsi.d.ts","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/imdsMsi.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAmCrE;;;;GAIG;AACH,eAAO,MAAM,OAAO;;yBAES;QACzB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,OAAO,CAAC;CAgErB,CAAC"}
@@ -1,97 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
4
- import { isError } from "@azure/core-util";
5
- import { credentialLogger } from "../../util/logging.js";
6
- import { mapScopesToResource } from "./utils.js";
7
- import { tracingClient } from "../../util/tracing.js";
8
- const msiName = "ManagedIdentityCredential - IMDS";
9
- const logger = credentialLogger(msiName);
10
- const imdsHost = "http://169.254.169.254";
11
- const imdsEndpointPath = "/metadata/identity/oauth2/token";
12
- /**
13
- * Generates an invalid request options to get a response quickly from IMDS endpoint.
14
- * The response indicates the availability of IMSD service; otherwise the request would time out.
15
- */
16
- function prepareInvalidRequestOptions(scopes) {
17
- const resource = mapScopesToResource(scopes);
18
- if (!resource) {
19
- throw new Error(`${msiName}: Multiple scopes are not supported.`);
20
- }
21
- // Pod Identity will try to process this request even if the Metadata header is missing.
22
- // We can exclude the request query to ensure no IMDS endpoint tries to process the ping request.
23
- const url = new URL(imdsEndpointPath, process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST ?? imdsHost);
24
- const rawHeaders = {
25
- Accept: "application/json",
26
- // intentionally leave out the Metadata header to invoke an error from IMDS endpoint.
27
- };
28
- return {
29
- // intentionally not including any query
30
- url: `${url}`,
31
- method: "GET",
32
- headers: createHttpHeaders(rawHeaders),
33
- };
34
- }
35
- /**
36
- * Defines how to determine whether the Azure IMDS MSI is available.
37
- *
38
- * Actually getting the token once we determine IMDS is available is handled by MSAL.
39
- */
40
- export const imdsMsi = {
41
- name: "imdsMsi",
42
- async isAvailable(options) {
43
- const { scopes, identityClient, getTokenOptions } = options;
44
- const resource = mapScopesToResource(scopes);
45
- if (!resource) {
46
- logger.info(`${msiName}: Unavailable. Multiple scopes are not supported.`);
47
- return false;
48
- }
49
- // if the PodIdentityEndpoint environment variable was set no need to probe the endpoint, it can be assumed to exist
50
- if (process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST) {
51
- return true;
52
- }
53
- if (!identityClient) {
54
- throw new Error("Missing IdentityClient");
55
- }
56
- const requestOptions = prepareInvalidRequestOptions(resource);
57
- return tracingClient.withSpan("ManagedIdentityCredential-pingImdsEndpoint", getTokenOptions ?? {}, async (updatedOptions) => {
58
- requestOptions.tracingOptions = updatedOptions.tracingOptions;
59
- // Create a request with a timeout since we expect that
60
- // not having a "Metadata" header should cause an error to be
61
- // returned quickly from the endpoint, proving its availability.
62
- const request = createPipelineRequest(requestOptions);
63
- // Default to 1000 if the default of 0 is used.
64
- // Negative values can still be used to disable the timeout.
65
- request.timeout = updatedOptions.requestOptions?.timeout || 1000;
66
- // This MSI uses the imdsEndpoint to get the token, which only uses http://
67
- request.allowInsecureConnection = true;
68
- let response;
69
- try {
70
- logger.info(`${msiName}: Pinging the Azure IMDS endpoint`);
71
- response = await identityClient.sendRequest(request);
72
- }
73
- catch (err) {
74
- // If the request failed, or Node.js was unable to establish a connection,
75
- // or the host was down, we'll assume the IMDS endpoint isn't available.
76
- if (isError(err)) {
77
- logger.verbose(`${msiName}: Caught error ${err.name}: ${err.message}`);
78
- }
79
- // This is a special case for Docker Desktop which responds with a 403 with a message that contains "A socket operation was attempted to an unreachable network" or "A socket operation was attempted to an unreachable host"
80
- // rather than just timing out, as expected.
81
- logger.info(`${msiName}: The Azure IMDS endpoint is unavailable`);
82
- return false;
83
- }
84
- if (response.status === 403) {
85
- if (response.bodyAsText?.includes("unreachable")) {
86
- logger.info(`${msiName}: The Azure IMDS endpoint is unavailable`);
87
- logger.info(`${msiName}: ${response.bodyAsText}`);
88
- return false;
89
- }
90
- }
91
- // If we received any response, the endpoint is available
92
- logger.info(`${msiName}: The Azure IMDS endpoint is available`);
93
- return true;
94
- });
95
- },
96
- };
97
- //# sourceMappingURL=imdsMsi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imdsMsi.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/imdsMsi.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,MAAM,OAAO,GAAG,kCAAkC,CAAC;AACnD,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAEzC,MAAM,QAAQ,GAAG,wBAAwB,CAAC;AAC1C,MAAM,gBAAgB,GAAG,iCAAiC,CAAC;AAE3D;;;GAGG;AACH,SAAS,4BAA4B,CAAC,MAAyB;IAC7D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,sCAAsC,CAAC,CAAC;IACpE,CAAC;IAED,wFAAwF;IACxF,iGAAiG;IACjG,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,iCAAiC,IAAI,QAAQ,CAAC,CAAC;IAEjG,MAAM,UAAU,GAA2B;QACzC,MAAM,EAAE,kBAAkB;QAC1B,qFAAqF;KACtF,CAAC;IAEF,OAAO;QACL,wCAAwC;QACxC,GAAG,EAAE,GAAG,GAAG,EAAE;QACb,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC;KACvC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,CAAC,WAAW,CAAC,OAMjB;QACC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;QAC5D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,mDAAmD,CAAC,CAAC;YAC3E,OAAO,KAAK,CAAC;QACf,CAAC;QAED,oHAAoH;QACpH,IAAI,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,cAAc,GAAG,4BAA4B,CAAC,QAAQ,CAAC,CAAC;QAE9D,OAAO,aAAa,CAAC,QAAQ,CAC3B,4CAA4C,EAC5C,eAAe,IAAI,EAAE,EACrB,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,cAAc,CAAC,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC;YAE9D,uDAAuD;YACvD,6DAA6D;YAC7D,gEAAgE;YAChE,MAAM,OAAO,GAAG,qBAAqB,CAAC,cAAc,CAAC,CAAC;YAEtD,+CAA+C;YAC/C,4DAA4D;YAC5D,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,OAAO,IAAI,IAAI,CAAC;YAEjE,2EAA2E;YAC3E,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;YACvC,IAAI,QAA0B,CAAC;YAC/B,IAAI,CAAC;gBACH,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,mCAAmC,CAAC,CAAC;gBAC3D,QAAQ,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACvD,CAAC;YAAC,OAAO,GAAY,EAAE,CAAC;gBACtB,0EAA0E;gBAC1E,wEAAwE;gBACxE,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;oBACjB,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,kBAAkB,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;gBACzE,CAAC;gBACD,6NAA6N;gBAC7N,4CAA4C;gBAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,0CAA0C,CAAC,CAAC;gBAClE,OAAO,KAAK,CAAC;YACf,CAAC;YACD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,IAAI,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;oBACjD,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,0CAA0C,CAAC,CAAC;oBAClE,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;oBAClD,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YACD,yDAAyD;YACzD,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,wCAAwC,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PipelineRequestOptions, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { isError } from \"@azure/core-util\";\n\nimport type { GetTokenOptions } from \"@azure/core-auth\";\nimport { credentialLogger } from \"../../util/logging.js\";\nimport { mapScopesToResource } from \"./utils.js\";\nimport { tracingClient } from \"../../util/tracing.js\";\nimport type { IdentityClient } from \"../../client/identityClient.js\";\n\nconst msiName = \"ManagedIdentityCredential - IMDS\";\nconst logger = credentialLogger(msiName);\n\nconst imdsHost = \"http://169.254.169.254\";\nconst imdsEndpointPath = \"/metadata/identity/oauth2/token\";\n\n/**\n * Generates an invalid request options to get a response quickly from IMDS endpoint.\n * The response indicates the availability of IMSD service; otherwise the request would time out.\n */\nfunction prepareInvalidRequestOptions(scopes: string | string[]): PipelineRequestOptions {\n const resource = mapScopesToResource(scopes);\n if (!resource) {\n throw new Error(`${msiName}: Multiple scopes are not supported.`);\n }\n\n // Pod Identity will try to process this request even if the Metadata header is missing.\n // We can exclude the request query to ensure no IMDS endpoint tries to process the ping request.\n const url = new URL(imdsEndpointPath, process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST ?? imdsHost);\n\n const rawHeaders: Record<string, string> = {\n Accept: \"application/json\",\n // intentionally leave out the Metadata header to invoke an error from IMDS endpoint.\n };\n\n return {\n // intentionally not including any query\n url: `${url}`,\n method: \"GET\",\n headers: createHttpHeaders(rawHeaders),\n };\n}\n\n/**\n * Defines how to determine whether the Azure IMDS MSI is available.\n *\n * Actually getting the token once we determine IMDS is available is handled by MSAL.\n */\nexport const imdsMsi = {\n name: \"imdsMsi\",\n async isAvailable(options: {\n scopes: string | string[];\n identityClient?: IdentityClient;\n clientId?: string;\n resourceId?: string;\n getTokenOptions?: GetTokenOptions;\n }): Promise<boolean> {\n const { scopes, identityClient, getTokenOptions } = options;\n const resource = mapScopesToResource(scopes);\n if (!resource) {\n logger.info(`${msiName}: Unavailable. Multiple scopes are not supported.`);\n return false;\n }\n\n // if the PodIdentityEndpoint environment variable was set no need to probe the endpoint, it can be assumed to exist\n if (process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST) {\n return true;\n }\n\n if (!identityClient) {\n throw new Error(\"Missing IdentityClient\");\n }\n\n const requestOptions = prepareInvalidRequestOptions(resource);\n\n return tracingClient.withSpan(\n \"ManagedIdentityCredential-pingImdsEndpoint\",\n getTokenOptions ?? {},\n async (updatedOptions) => {\n requestOptions.tracingOptions = updatedOptions.tracingOptions;\n\n // Create a request with a timeout since we expect that\n // not having a \"Metadata\" header should cause an error to be\n // returned quickly from the endpoint, proving its availability.\n const request = createPipelineRequest(requestOptions);\n\n // Default to 1000 if the default of 0 is used.\n // Negative values can still be used to disable the timeout.\n request.timeout = updatedOptions.requestOptions?.timeout || 1000;\n\n // This MSI uses the imdsEndpoint to get the token, which only uses http://\n request.allowInsecureConnection = true;\n let response: PipelineResponse;\n try {\n logger.info(`${msiName}: Pinging the Azure IMDS endpoint`);\n response = await identityClient.sendRequest(request);\n } catch (err: unknown) {\n // If the request failed, or Node.js was unable to establish a connection,\n // or the host was down, we'll assume the IMDS endpoint isn't available.\n if (isError(err)) {\n logger.verbose(`${msiName}: Caught error ${err.name}: ${err.message}`);\n }\n // This is a special case for Docker Desktop which responds with a 403 with a message that contains \"A socket operation was attempted to an unreachable network\" or \"A socket operation was attempted to an unreachable host\"\n // rather than just timing out, as expected.\n logger.info(`${msiName}: The Azure IMDS endpoint is unavailable`);\n return false;\n }\n if (response.status === 403) {\n if (response.bodyAsText?.includes(\"unreachable\")) {\n logger.info(`${msiName}: The Azure IMDS endpoint is unavailable`);\n logger.info(`${msiName}: ${response.bodyAsText}`);\n return false;\n }\n }\n // If we received any response, the endpoint is available\n logger.info(`${msiName}: The Azure IMDS endpoint is available`);\n return true;\n },\n );\n },\n};\n"]}
@@ -1,13 +0,0 @@
1
- import type { PipelinePolicy } from "@azure/core-rest-pipeline";
2
- import type { MSIConfiguration } from "./models.js";
3
- /**
4
- * An additional policy that retries on 404 and 410 errors. The default retry policy does not retry on
5
- * 404s or 410s, but the IMDS endpoint can return these when the token is not yet available or when
6
- * the identity is still being set up. This policy will retry on 404s and 410s with an exponential backoff.
7
- * For 410 responses, it uses a minimum 3-second initial delay to ensure at least 70 seconds total duration.
8
- *
9
- * @param msiRetryConfig - The retry configuration for the MSI credential.
10
- * @returns - The policy that will retry on 404s and 410s.
11
- */
12
- export declare function imdsRetryPolicy(msiRetryConfig: MSIConfiguration["retryConfig"]): PipelinePolicy;
13
- //# sourceMappingURL=imdsRetryPolicy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imdsRetryPolicy.d.ts","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/imdsRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAYpD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,cAAc,CA2B/F"}
@@ -1,43 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { retryPolicy } from "@azure/core-rest-pipeline";
4
- import { calculateRetryDelay } from "@azure/core-util";
5
- // Matches the default retry configuration in expontentialRetryStrategy.ts
6
- const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;
7
- // For 410 responses, we need at least 70 seconds total retry duration
8
- // With 5 retries using exponential backoff: delays of d, 2d, 4d, 8d, 16d sum to 31d
9
- // Accounting for jitter (which can reduce delays by 20%), we need 31d * 0.8 >= 70
10
- // So we need d >= 70/24.8 = 2.82 seconds. Using 3 seconds to be safe.
11
- const MIN_DELAY_FOR_410_MS = 3000;
12
- /**
13
- * An additional policy that retries on 404 and 410 errors. The default retry policy does not retry on
14
- * 404s or 410s, but the IMDS endpoint can return these when the token is not yet available or when
15
- * the identity is still being set up. This policy will retry on 404s and 410s with an exponential backoff.
16
- * For 410 responses, it uses a minimum 3-second initial delay to ensure at least 70 seconds total duration.
17
- *
18
- * @param msiRetryConfig - The retry configuration for the MSI credential.
19
- * @returns - The policy that will retry on 404s and 410s.
20
- */
21
- export function imdsRetryPolicy(msiRetryConfig) {
22
- return retryPolicy([
23
- {
24
- name: "imdsRetryPolicy",
25
- retry: ({ retryCount, response }) => {
26
- if (response?.status !== 404 && response?.status !== 410) {
27
- return { skipStrategy: true };
28
- }
29
- // For 410 responses, use a minimum 3-second delay to ensure at least 70 seconds total retry duration
30
- const initialDelayMs = response?.status === 410
31
- ? Math.max(MIN_DELAY_FOR_410_MS, msiRetryConfig.startDelayInMs)
32
- : msiRetryConfig.startDelayInMs;
33
- return calculateRetryDelay(retryCount, {
34
- retryDelayInMs: initialDelayMs,
35
- maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL,
36
- });
37
- },
38
- },
39
- ], {
40
- maxRetries: msiRetryConfig.maxRetries,
41
- });
42
- }
43
- //# sourceMappingURL=imdsRetryPolicy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imdsRetryPolicy.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/imdsRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,0EAA0E;AAC1E,MAAM,iCAAiC,GAAG,IAAI,GAAG,EAAE,CAAC;AAEpD,sEAAsE;AACtE,oFAAoF;AACpF,kFAAkF;AAClF,sEAAsE;AACtE,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAElC;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,cAA+C;IAC7E,OAAO,WAAW,CAChB;QACE;YACE,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,MAAM,KAAK,GAAG,IAAI,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;oBACzD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;gBAChC,CAAC;gBAED,qGAAqG;gBACrG,MAAM,cAAc,GAClB,QAAQ,EAAE,MAAM,KAAK,GAAG;oBACtB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE,cAAc,CAAC,cAAc,CAAC;oBAC/D,CAAC,CAAC,cAAc,CAAC,cAAc,CAAC;gBAEpC,OAAO,mBAAmB,CAAC,UAAU,EAAE;oBACrC,cAAc,EAAE,cAAc;oBAC9B,iBAAiB,EAAE,iCAAiC;iBACrD,CAAC,CAAC;YACL,CAAC;SACF;KACF,EACD;QACE,UAAU,EAAE,cAAc,CAAC,UAAU;KACtC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PipelinePolicy } from \"@azure/core-rest-pipeline\";\nimport { retryPolicy } from \"@azure/core-rest-pipeline\";\n\nimport type { MSIConfiguration } from \"./models.js\";\nimport { calculateRetryDelay } from \"@azure/core-util\";\n\n// Matches the default retry configuration in expontentialRetryStrategy.ts\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;\n\n// For 410 responses, we need at least 70 seconds total retry duration\n// With 5 retries using exponential backoff: delays of d, 2d, 4d, 8d, 16d sum to 31d\n// Accounting for jitter (which can reduce delays by 20%), we need 31d * 0.8 >= 70\n// So we need d >= 70/24.8 = 2.82 seconds. Using 3 seconds to be safe.\nconst MIN_DELAY_FOR_410_MS = 3000;\n\n/**\n * An additional policy that retries on 404 and 410 errors. The default retry policy does not retry on\n * 404s or 410s, but the IMDS endpoint can return these when the token is not yet available or when\n * the identity is still being set up. This policy will retry on 404s and 410s with an exponential backoff.\n * For 410 responses, it uses a minimum 3-second initial delay to ensure at least 70 seconds total duration.\n *\n * @param msiRetryConfig - The retry configuration for the MSI credential.\n * @returns - The policy that will retry on 404s and 410s.\n */\nexport function imdsRetryPolicy(msiRetryConfig: MSIConfiguration[\"retryConfig\"]): PipelinePolicy {\n return retryPolicy(\n [\n {\n name: \"imdsRetryPolicy\",\n retry: ({ retryCount, response }) => {\n if (response?.status !== 404 && response?.status !== 410) {\n return { skipStrategy: true };\n }\n\n // For 410 responses, use a minimum 3-second delay to ensure at least 70 seconds total retry duration\n const initialDelayMs =\n response?.status === 410\n ? Math.max(MIN_DELAY_FOR_410_MS, msiRetryConfig.startDelayInMs)\n : msiRetryConfig.startDelayInMs;\n\n return calculateRetryDelay(retryCount, {\n retryDelayInMs: initialDelayMs,\n maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL,\n });\n },\n },\n ],\n {\n maxRetries: msiRetryConfig.maxRetries,\n },\n );\n}\n"]}
@@ -1,6 +0,0 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
2
- export declare class ManagedIdentityCredential implements TokenCredential {
3
- constructor();
4
- getToken(): Promise<AccessToken | null>;
5
- }
6
- //# sourceMappingURL=index-browser.d.mts.map
@@ -1,24 +0,0 @@
1
- import type { AccessToken } from "@azure/core-auth";
2
- import type { IdentityClient } from "../../client/identityClient.js";
3
- /**
4
- * @internal
5
- */
6
- export interface MSIConfiguration {
7
- retryConfig: {
8
- maxRetries: number;
9
- startDelayInMs: number;
10
- intervalIncrement: number;
11
- };
12
- identityClient: IdentityClient;
13
- scopes: string | string[];
14
- clientId?: string;
15
- resourceId?: string;
16
- }
17
- /**
18
- * @internal
19
- * Represents an access token for {@link ManagedIdentity} for internal usage,
20
- * with an expiration time and the time in which token should refresh.
21
- */
22
- export declare interface MSIToken extends AccessToken {
23
- }
24
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE;QACX,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,QAAS,SAAQ,WAAW;CAAG"}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export {};
4
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken } from \"@azure/core-auth\";\n\nimport type { IdentityClient } from \"../../client/identityClient.js\";\n\n/**\n * @internal\n */\nexport interface MSIConfiguration {\n retryConfig: {\n maxRetries: number;\n startDelayInMs: number;\n intervalIncrement: number;\n };\n identityClient: IdentityClient;\n scopes: string | string[];\n clientId?: string;\n resourceId?: string;\n}\n\n/**\n * @internal\n * Represents an access token for {@link ManagedIdentity} for internal usage,\n * with an expiration time and the time in which token should refresh.\n */\nexport declare interface MSIToken extends AccessToken {}\n"]}
@@ -1,14 +0,0 @@
1
- import type { AccessToken, GetTokenOptions } from "@azure/core-auth";
2
- import type { MSIConfiguration } from "./models.js";
3
- /**
4
- * Defines how to determine whether the token exchange MSI is available, and also how to retrieve a token from the token exchange MSI.
5
- *
6
- * Token exchange MSI (used by AKS) is the only MSI implementation handled entirely by Azure Identity.
7
- * The rest have been migrated to MSAL.
8
- */
9
- export declare const tokenExchangeMsi: {
10
- name: string;
11
- isAvailable(clientId?: string): Promise<boolean>;
12
- getToken(configuration: MSIConfiguration, getTokenOptions?: GetTokenOptions): Promise<AccessToken | null>;
13
- };
14
- //# sourceMappingURL=tokenExchangeMsi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenExchangeMsi.d.ts","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/tokenExchangeMsi.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQpD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;2BAEE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;4BAerC,gBAAgB,oBACd,eAAe,GAC/B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAY/B,CAAC"}
@@ -1,38 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { WorkloadIdentityCredential } from "../workloadIdentityCredential.js";
4
- import { credentialLogger } from "../../util/logging.js";
5
- const msiName = "ManagedIdentityCredential - Token Exchange";
6
- const logger = credentialLogger(msiName);
7
- /**
8
- * Defines how to determine whether the token exchange MSI is available, and also how to retrieve a token from the token exchange MSI.
9
- *
10
- * Token exchange MSI (used by AKS) is the only MSI implementation handled entirely by Azure Identity.
11
- * The rest have been migrated to MSAL.
12
- */
13
- export const tokenExchangeMsi = {
14
- name: "tokenExchangeMsi",
15
- async isAvailable(clientId) {
16
- const env = process.env;
17
- const result = Boolean((clientId || env.AZURE_CLIENT_ID) &&
18
- env.AZURE_TENANT_ID &&
19
- process.env.AZURE_FEDERATED_TOKEN_FILE);
20
- if (!result) {
21
- logger.info(`${msiName}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`);
22
- }
23
- return result;
24
- },
25
- async getToken(configuration, getTokenOptions = {}) {
26
- const { scopes, clientId } = configuration;
27
- const identityClientTokenCredentialOptions = {};
28
- const workloadIdentityCredential = new WorkloadIdentityCredential({
29
- clientId,
30
- tenantId: process.env.AZURE_TENANT_ID,
31
- tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE,
32
- ...identityClientTokenCredentialOptions,
33
- disableInstanceDiscovery: true,
34
- });
35
- return workloadIdentityCredential.getToken(scopes, getTokenOptions);
36
- },
37
- };
38
- //# sourceMappingURL=tokenExchangeMsi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenExchangeMsi.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/tokenExchangeMsi.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,OAAO,GAAG,4CAA4C,CAAC;AAC7D,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,kBAAkB;IACxB,KAAK,CAAC,WAAW,CAAC,QAAiB;QACjC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACxB,MAAM,MAAM,GAAG,OAAO,CACpB,CAAC,QAAQ,IAAI,GAAG,CAAC,eAAe,CAAC;YAC/B,GAAG,CAAC,eAAe;YACnB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CACzC,CAAC;QACF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CACT,GAAG,OAAO,qKAAqK,CAChL,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,KAAK,CAAC,QAAQ,CACZ,aAA+B,EAC/B,kBAAmC,EAAE;QAErC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC;QAC3C,MAAM,oCAAoC,GAAG,EAAE,CAAC;QAChD,MAAM,0BAA0B,GAAG,IAAI,0BAA0B,CAAC;YAChE,QAAQ;YACR,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;YACrC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B;YACrD,GAAG,oCAAoC;YACvC,wBAAwB,EAAE,IAAI;SACM,CAAC,CAAC;QACxC,OAAO,0BAA0B,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACtE,CAAC;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport type { MSIConfiguration } from \"./models.js\";\nimport { WorkloadIdentityCredential } from \"../workloadIdentityCredential.js\";\nimport { credentialLogger } from \"../../util/logging.js\";\nimport type { WorkloadIdentityCredentialOptions } from \"../workloadIdentityCredentialOptions.js\";\n\nconst msiName = \"ManagedIdentityCredential - Token Exchange\";\nconst logger = credentialLogger(msiName);\n\n/**\n * Defines how to determine whether the token exchange MSI is available, and also how to retrieve a token from the token exchange MSI.\n *\n * Token exchange MSI (used by AKS) is the only MSI implementation handled entirely by Azure Identity.\n * The rest have been migrated to MSAL.\n */\nexport const tokenExchangeMsi = {\n name: \"tokenExchangeMsi\",\n async isAvailable(clientId?: string): Promise<boolean> {\n const env = process.env;\n const result = Boolean(\n (clientId || env.AZURE_CLIENT_ID) &&\n env.AZURE_TENANT_ID &&\n process.env.AZURE_FEDERATED_TOKEN_FILE,\n );\n if (!result) {\n logger.info(\n `${msiName}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`,\n );\n }\n return result;\n },\n async getToken(\n configuration: MSIConfiguration,\n getTokenOptions: GetTokenOptions = {},\n ): Promise<AccessToken | null> {\n const { scopes, clientId } = configuration;\n const identityClientTokenCredentialOptions = {};\n const workloadIdentityCredential = new WorkloadIdentityCredential({\n clientId,\n tenantId: process.env.AZURE_TENANT_ID,\n tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE,\n ...identityClientTokenCredentialOptions,\n disableInstanceDiscovery: true,\n } as WorkloadIdentityCredentialOptions);\n return workloadIdentityCredential.getToken(scopes, getTokenOptions);\n },\n};\n"]}
@@ -1,12 +0,0 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
2
- /**
3
- * Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow).
4
- */
5
- export declare class OnBehalfOfCredential implements TokenCredential {
6
- /**
7
- * Only available in Node.js
8
- */
9
- constructor();
10
- getToken(): Promise<AccessToken | null>;
11
- }
12
- //# sourceMappingURL=onBehalfOfCredential-browser.d.mts.map