@azure/identity 4.13.1 → 4.13.3

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 (562) 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/errors.d.ts.map +1 -1
  88. package/dist/browser/errors.js +1 -4
  89. package/dist/browser/errors.js.map +1 -1
  90. package/dist/browser/index.d.ts +51 -51
  91. package/dist/browser/index.d.ts.map +1 -1
  92. package/dist/browser/index.js +19 -19
  93. package/dist/browser/index.js.map +1 -1
  94. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  95. package/dist/browser/msal/utils.d.ts +1 -1
  96. package/dist/browser/msal/utils.d.ts.map +1 -1
  97. package/dist/browser/msal/utils.js +1 -1
  98. package/dist/browser/msal/utils.js.map +1 -1
  99. package/dist/browser/package.json +6 -1
  100. package/dist/browser/util/tenantIdUtils.d.ts +1 -1
  101. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -1
  102. package/dist/browser/util/tenantIdUtils.js +1 -1
  103. package/dist/browser/util/tenantIdUtils.js.map +1 -1
  104. package/dist/commonjs/client/identityClient.js +263 -252
  105. package/dist/commonjs/client/identityClient.js.map +7 -1
  106. package/dist/commonjs/constants.d.ts +1 -1
  107. package/dist/commonjs/constants.js +61 -78
  108. package/dist/commonjs/constants.js.map +7 -1
  109. package/dist/commonjs/credentials/authorityValidationOptions.js +16 -5
  110. package/dist/commonjs/credentials/authorityValidationOptions.js.map +7 -1
  111. package/dist/commonjs/credentials/authorizationCodeCredential.js +99 -75
  112. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +7 -1
  113. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  114. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +16 -5
  115. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +7 -1
  116. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -1
  117. package/dist/commonjs/credentials/azureCliCredential.js +228 -214
  118. package/dist/commonjs/credentials/azureCliCredential.js.map +7 -1
  119. package/dist/commonjs/credentials/azureCliCredentialOptions.js +16 -5
  120. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +7 -1
  121. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  122. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +192 -202
  123. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +7 -1
  124. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +16 -5
  125. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +7 -1
  126. package/dist/commonjs/credentials/azurePipelinesCredential.d.ts.map +1 -1
  127. package/dist/commonjs/credentials/azurePipelinesCredential.js +178 -134
  128. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +7 -1
  129. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  130. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +16 -5
  131. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +7 -1
  132. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts +10 -0
  133. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -1
  134. package/dist/commonjs/credentials/azurePowerShellCredential.js +231 -208
  135. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +7 -1
  136. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +16 -5
  137. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +7 -1
  138. package/dist/commonjs/credentials/brokerAuthOptions.js +16 -3
  139. package/dist/commonjs/credentials/brokerAuthOptions.js.map +7 -1
  140. package/dist/commonjs/credentials/brokerCredential.d.ts +2 -2
  141. package/dist/commonjs/credentials/brokerCredential.d.ts.map +1 -1
  142. package/dist/commonjs/credentials/brokerCredential.js +104 -71
  143. package/dist/commonjs/credentials/brokerCredential.js.map +7 -1
  144. package/dist/commonjs/credentials/browserCustomizationOptions.js +16 -5
  145. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +7 -1
  146. package/dist/commonjs/credentials/chainedTokenCredential.js +113 -93
  147. package/dist/commonjs/credentials/chainedTokenCredential.js.map +7 -1
  148. package/dist/commonjs/credentials/clientAssertionCredential.js +102 -64
  149. package/dist/commonjs/credentials/clientAssertionCredential.js.map +7 -1
  150. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  151. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +16 -5
  152. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +7 -1
  153. package/dist/commonjs/credentials/clientCertificateCredential.js +139 -134
  154. package/dist/commonjs/credentials/clientCertificateCredential.js.map +7 -1
  155. package/dist/commonjs/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  156. package/dist/commonjs/credentials/clientCertificateCredentialModels.js +16 -5
  157. package/dist/commonjs/credentials/clientCertificateCredentialModels.js.map +7 -1
  158. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  159. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +16 -5
  160. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +7 -1
  161. package/dist/commonjs/credentials/clientSecretCredential.js +97 -68
  162. package/dist/commonjs/credentials/clientSecretCredential.js.map +7 -1
  163. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  164. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +16 -5
  165. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +7 -1
  166. package/dist/commonjs/credentials/credentialPersistenceOptions.js +16 -5
  167. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +7 -1
  168. package/dist/commonjs/credentials/defaultAzureCredential.d.ts.map +1 -1
  169. package/dist/commonjs/credentials/defaultAzureCredential.js +124 -159
  170. package/dist/commonjs/credentials/defaultAzureCredential.js.map +7 -1
  171. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +110 -140
  172. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +7 -1
  173. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  174. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +16 -5
  175. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +7 -1
  176. package/dist/commonjs/credentials/deviceCodeCredential.js +133 -104
  177. package/dist/commonjs/credentials/deviceCodeCredential.js.map +7 -1
  178. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  179. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +16 -5
  180. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +7 -1
  181. package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -1
  182. package/dist/commonjs/credentials/environmentCredential.js +157 -123
  183. package/dist/commonjs/credentials/environmentCredential.js.map +7 -1
  184. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -1
  185. package/dist/commonjs/credentials/environmentCredentialOptions.js +16 -5
  186. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +7 -1
  187. package/dist/commonjs/credentials/interactiveBrowserCredential.js +145 -108
  188. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +7 -1
  189. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  190. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +16 -5
  191. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +7 -1
  192. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  193. package/dist/commonjs/credentials/interactiveCredentialOptions.js +16 -5
  194. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +7 -1
  195. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +92 -91
  196. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +7 -1
  197. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +51 -44
  198. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +7 -1
  199. package/dist/commonjs/credentials/managedIdentityCredential/index.js +256 -242
  200. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +7 -1
  201. package/dist/commonjs/credentials/managedIdentityCredential/models.js +16 -5
  202. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +7 -1
  203. package/dist/commonjs/credentials/managedIdentityCredential/options.js +16 -5
  204. package/dist/commonjs/credentials/managedIdentityCredential/options.js.map +7 -1
  205. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +56 -39
  206. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +7 -1
  207. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +79 -75
  208. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +7 -1
  209. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +16 -5
  210. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +7 -1
  211. package/dist/commonjs/credentials/onBehalfOfCredential.js +169 -127
  212. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +7 -1
  213. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +16 -5
  214. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +7 -1
  215. package/dist/commonjs/credentials/usernamePasswordCredential.js +113 -76
  216. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +7 -1
  217. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  218. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +16 -5
  219. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +7 -1
  220. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  221. package/dist/commonjs/credentials/visualStudioCodeCredential.js +144 -132
  222. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +7 -1
  223. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +16 -5
  224. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +7 -1
  225. package/dist/commonjs/credentials/workloadIdentityCredential.js +123 -109
  226. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +7 -1
  227. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  228. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +16 -5
  229. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +7 -1
  230. package/dist/commonjs/errors.d.ts.map +1 -1
  231. package/dist/commonjs/errors.js +128 -132
  232. package/dist/commonjs/errors.js.map +7 -1
  233. package/dist/commonjs/index.d.ts +33 -33
  234. package/dist/commonjs/index.d.ts.map +1 -1
  235. package/dist/commonjs/index.js +115 -67
  236. package/dist/commonjs/index.js.map +7 -1
  237. package/dist/commonjs/msal/msal.js +38 -9
  238. package/dist/commonjs/msal/msal.js.map +7 -1
  239. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +16 -3
  240. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +7 -1
  241. package/dist/commonjs/msal/nodeFlows/msalClient.js +449 -478
  242. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +7 -1
  243. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  244. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +140 -147
  245. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +7 -1
  246. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +16 -5
  247. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +7 -1
  248. package/dist/commonjs/msal/types.js +16 -5
  249. package/dist/commonjs/msal/types.js.map +7 -1
  250. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  251. package/dist/commonjs/msal/utils.js +179 -224
  252. package/dist/commonjs/msal/utils.js.map +7 -1
  253. package/dist/commonjs/package.json +6 -1
  254. package/dist/commonjs/plugins/consumer.js +32 -40
  255. package/dist/commonjs/plugins/consumer.js.map +7 -1
  256. package/dist/commonjs/plugins/provider.js +16 -5
  257. package/dist/commonjs/plugins/provider.js.map +7 -1
  258. package/dist/commonjs/regionalAuthority.js +93 -141
  259. package/dist/commonjs/regionalAuthority.js.map +7 -1
  260. package/dist/commonjs/tokenCredentialOptions.js +16 -5
  261. package/dist/commonjs/tokenCredentialOptions.js.map +7 -1
  262. package/dist/commonjs/tokenProvider.js +52 -52
  263. package/dist/commonjs/tokenProvider.js.map +7 -1
  264. package/dist/commonjs/tsdoc-metadata.json +1 -1
  265. package/dist/commonjs/util/identityTokenEndpoint.js +32 -12
  266. package/dist/commonjs/util/identityTokenEndpoint.js.map +7 -1
  267. package/dist/commonjs/util/logging.js +91 -97
  268. package/dist/commonjs/util/logging.js.map +7 -1
  269. package/dist/commonjs/util/processMultiTenantRequest.js +43 -33
  270. package/dist/commonjs/util/processMultiTenantRequest.js.map +7 -1
  271. package/dist/commonjs/util/processUtils.d.ts +14 -3
  272. package/dist/commonjs/util/processUtils.d.ts.map +1 -1
  273. package/dist/commonjs/util/processUtils.js +67 -35
  274. package/dist/commonjs/util/processUtils.js.map +7 -1
  275. package/dist/commonjs/util/scopeUtils.js +39 -28
  276. package/dist/commonjs/util/scopeUtils.js.map +7 -1
  277. package/dist/commonjs/util/subscriptionUtils.js +35 -17
  278. package/dist/commonjs/util/subscriptionUtils.js.map +7 -1
  279. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -1
  280. package/dist/commonjs/util/tenantIdUtils.js +61 -45
  281. package/dist/commonjs/util/tenantIdUtils.js.map +7 -1
  282. package/dist/commonjs/util/tracing.js +33 -16
  283. package/dist/commonjs/util/tracing.js.map +7 -1
  284. package/dist/esm/constants.d.ts +1 -1
  285. package/dist/esm/constants.js +1 -1
  286. package/dist/esm/constants.js.map +1 -1
  287. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  288. package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  289. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -1
  290. package/dist/esm/credentials/azureCliCredential.js +21 -24
  291. package/dist/esm/credentials/azureCliCredential.js.map +1 -1
  292. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  293. package/dist/esm/credentials/azureDeveloperCliCredential.js +16 -24
  294. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -1
  295. package/dist/esm/credentials/azurePipelinesCredential.d.ts.map +1 -1
  296. package/dist/esm/credentials/azurePipelinesCredential.js +16 -6
  297. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -1
  298. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  299. package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  300. package/dist/esm/credentials/azurePowerShellCredential.d.ts +10 -0
  301. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -1
  302. package/dist/esm/credentials/azurePowerShellCredential.js +29 -7
  303. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -1
  304. package/dist/esm/credentials/brokerCredential.d.ts +2 -2
  305. package/dist/esm/credentials/brokerCredential.d.ts.map +1 -1
  306. package/dist/esm/credentials/brokerCredential.js.map +1 -1
  307. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  308. package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -1
  309. package/dist/esm/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  310. package/dist/esm/credentials/clientCertificateCredentialModels.js.map +1 -1
  311. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  312. package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -1
  313. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  314. package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -1
  315. package/dist/esm/credentials/defaultAzureCredential.d.ts.map +1 -1
  316. package/dist/esm/credentials/defaultAzureCredential.js +5 -2
  317. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -1
  318. package/dist/esm/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  319. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  320. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -1
  321. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  322. package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -1
  323. package/dist/esm/credentials/environmentCredential.d.ts.map +1 -1
  324. package/dist/esm/credentials/environmentCredential.js.map +1 -1
  325. package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -1
  326. package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -1
  327. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  328. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  329. package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  330. package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -1
  331. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  332. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  333. package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  334. package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  335. package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -1
  336. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -1
  337. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  338. package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  339. package/dist/esm/errors.d.ts.map +1 -1
  340. package/dist/esm/errors.js +1 -4
  341. package/dist/esm/errors.js.map +1 -1
  342. package/dist/esm/index.d.ts +33 -33
  343. package/dist/esm/index.d.ts.map +1 -1
  344. package/dist/esm/index.js.map +1 -1
  345. package/dist/esm/msal/nodeFlows/msalClient.js +1 -1
  346. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -1
  347. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  348. package/dist/esm/msal/nodeFlows/msalPlugins.js.map +1 -1
  349. package/dist/esm/msal/utils.d.ts.map +1 -1
  350. package/dist/esm/msal/utils.js.map +1 -1
  351. package/dist/esm/package.json +6 -1
  352. package/dist/esm/util/processUtils.d.ts +14 -3
  353. package/dist/esm/util/processUtils.d.ts.map +1 -1
  354. package/dist/esm/util/processUtils.js +36 -19
  355. package/dist/esm/util/processUtils.js.map +1 -1
  356. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -1
  357. package/dist/esm/util/tenantIdUtils.js.map +1 -1
  358. package/dist/workerd/constants.d.ts +1 -1
  359. package/dist/workerd/constants.js +1 -1
  360. package/dist/workerd/constants.js.map +1 -1
  361. package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  362. package/dist/workerd/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  363. package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -1
  364. package/dist/workerd/credentials/azureCliCredential.js +21 -24
  365. package/dist/workerd/credentials/azureCliCredential.js.map +1 -1
  366. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  367. package/dist/workerd/credentials/azureDeveloperCliCredential.js +16 -24
  368. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -1
  369. package/dist/workerd/credentials/azurePipelinesCredential.d.ts.map +1 -1
  370. package/dist/workerd/credentials/azurePipelinesCredential.js +16 -6
  371. package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -1
  372. package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  373. package/dist/workerd/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  374. package/dist/workerd/credentials/azurePowerShellCredential.d.ts +10 -0
  375. package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -1
  376. package/dist/workerd/credentials/azurePowerShellCredential.js +29 -7
  377. package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -1
  378. package/dist/workerd/credentials/brokerCredential.d.ts +2 -2
  379. package/dist/workerd/credentials/brokerCredential.d.ts.map +1 -1
  380. package/dist/workerd/credentials/brokerCredential.js.map +1 -1
  381. package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  382. package/dist/workerd/credentials/clientAssertionCredentialOptions.js.map +1 -1
  383. package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  384. package/dist/workerd/credentials/clientCertificateCredentialModels.js.map +1 -1
  385. package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  386. package/dist/workerd/credentials/clientCertificateCredentialOptions.js.map +1 -1
  387. package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  388. package/dist/workerd/credentials/clientSecretCredentialOptions.js.map +1 -1
  389. package/dist/workerd/credentials/defaultAzureCredential.d.ts.map +1 -1
  390. package/dist/workerd/credentials/defaultAzureCredential.js +5 -2
  391. package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -1
  392. package/dist/workerd/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  393. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  394. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -1
  395. package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  396. package/dist/workerd/credentials/deviceCodeCredentialOptions.js.map +1 -1
  397. package/dist/workerd/credentials/environmentCredential.d.ts.map +1 -1
  398. package/dist/workerd/credentials/environmentCredential.js.map +1 -1
  399. package/dist/workerd/credentials/environmentCredentialOptions.d.ts.map +1 -1
  400. package/dist/workerd/credentials/environmentCredentialOptions.js.map +1 -1
  401. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  402. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  403. package/dist/workerd/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  404. package/dist/workerd/credentials/interactiveCredentialOptions.js.map +1 -1
  405. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  406. package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  407. package/dist/workerd/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  408. package/dist/workerd/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  409. package/dist/workerd/credentials/visualStudioCodeCredential.js.map +1 -1
  410. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -1
  411. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  412. package/dist/workerd/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  413. package/dist/workerd/errors.d.ts.map +1 -1
  414. package/dist/workerd/errors.js +1 -4
  415. package/dist/workerd/errors.js.map +1 -1
  416. package/dist/workerd/index.d.ts +33 -33
  417. package/dist/workerd/index.d.ts.map +1 -1
  418. package/dist/workerd/index.js.map +1 -1
  419. package/dist/workerd/msal/nodeFlows/msalClient.js +1 -1
  420. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -1
  421. package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  422. package/dist/workerd/msal/nodeFlows/msalPlugins.js.map +1 -1
  423. package/dist/workerd/msal/utils.d.ts.map +1 -1
  424. package/dist/workerd/msal/utils.js.map +1 -1
  425. package/dist/workerd/package.json +6 -1
  426. package/dist/workerd/util/processUtils.d.ts +14 -3
  427. package/dist/workerd/util/processUtils.d.ts.map +1 -1
  428. package/dist/workerd/util/processUtils.js +36 -19
  429. package/dist/workerd/util/processUtils.js.map +1 -1
  430. package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -1
  431. package/dist/workerd/util/tenantIdUtils.js.map +1 -1
  432. package/package.json +37 -39
  433. package/dist/browser/credentials/azureCliCredential.d.ts +0 -13
  434. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +0 -13
  435. package/dist/browser/credentials/azurePipelinesCredential.d.ts +0 -13
  436. package/dist/browser/credentials/azurePowerShellCredential.d.ts +0 -12
  437. package/dist/browser/credentials/brokerCredential.d.ts +0 -35
  438. package/dist/browser/credentials/brokerCredential.d.ts.map +0 -1
  439. package/dist/browser/credentials/brokerCredential.js +0 -69
  440. package/dist/browser/credentials/brokerCredential.js.map +0 -1
  441. package/dist/browser/credentials/clientAssertionCredential.d.ts +0 -12
  442. package/dist/browser/credentials/clientCertificateCredential.d.ts +0 -13
  443. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts +0 -64
  444. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts.map +0 -1
  445. package/dist/browser/credentials/defaultAzureCredentialFunctions.js +0 -147
  446. package/dist/browser/credentials/defaultAzureCredentialFunctions.js.map +0 -1
  447. package/dist/browser/credentials/deviceCodeCredential.d.ts +0 -13
  448. package/dist/browser/credentials/environmentCredential.d.ts +0 -13
  449. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +0 -18
  450. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +0 -1
  451. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +0 -97
  452. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  453. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +0 -13
  454. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +0 -1
  455. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -43
  456. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  457. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +0 -6
  458. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +0 -24
  459. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +0 -1
  460. package/dist/browser/credentials/managedIdentityCredential/models.js +0 -4
  461. package/dist/browser/credentials/managedIdentityCredential/models.js.map +0 -1
  462. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +0 -14
  463. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +0 -1
  464. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -38
  465. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  466. package/dist/browser/credentials/onBehalfOfCredential.d.ts +0 -12
  467. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  468. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  469. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  470. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  471. package/dist/browser/msal/nodeFlows/msalClient.d.ts +0 -199
  472. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +0 -1
  473. package/dist/browser/msal/nodeFlows/msalClient.js +0 -499
  474. package/dist/browser/msal/nodeFlows/msalClient.js.map +0 -1
  475. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +0 -109
  476. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +0 -1
  477. package/dist/browser/msal/nodeFlows/msalPlugins.js +0 -160
  478. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +0 -1
  479. package/dist/browser/regionalAuthority.d.ts +0 -122
  480. package/dist/browser/regionalAuthority.d.ts.map +0 -1
  481. package/dist/browser/regionalAuthority.js +0 -139
  482. package/dist/browser/regionalAuthority.js.map +0 -1
  483. package/dist/browser/util/authHostEnv-browser.d.mts +0 -4
  484. package/dist/browser/util/authHostEnv-browser.d.mts.map +0 -1
  485. package/dist/browser/util/authHostEnv-browser.mjs +0 -7
  486. package/dist/browser/util/authHostEnv-browser.mjs.map +0 -1
  487. package/dist/browser/util/processUtils.d.ts +0 -13
  488. package/dist/browser/util/processUtils.d.ts.map +0 -1
  489. package/dist/browser/util/processUtils.js +0 -32
  490. package/dist/browser/util/processUtils.js.map +0 -1
  491. package/dist/browser/util/subscriptionUtils.d.ts +0 -6
  492. package/dist/browser/util/subscriptionUtils.d.ts.map +0 -1
  493. package/dist/browser/util/subscriptionUtils.js +0 -16
  494. package/dist/browser/util/subscriptionUtils.js.map +0 -1
  495. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  496. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  497. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +0 -5
  498. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  499. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  500. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  501. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +0 -264
  502. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  503. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  504. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  505. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +0 -5
  506. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  507. package/dist/commonjs/msal/credentials.d.ts +0 -52
  508. package/dist/commonjs/msal/credentials.d.ts.map +0 -1
  509. package/dist/commonjs/msal/credentials.js +0 -5
  510. package/dist/commonjs/msal/credentials.js.map +0 -1
  511. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  512. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  513. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  514. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  515. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  516. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  517. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +0 -261
  518. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  519. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  520. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  521. package/dist/esm/msal/browserFlows/msalBrowserOptions.js +0 -4
  522. package/dist/esm/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  523. package/dist/esm/msal/credentials.d.ts +0 -52
  524. package/dist/esm/msal/credentials.d.ts.map +0 -1
  525. package/dist/esm/msal/credentials.js +0 -4
  526. package/dist/esm/msal/credentials.js.map +0 -1
  527. package/dist/esm/util/authHostEnv-browser.d.mts +0 -4
  528. package/dist/esm/util/authHostEnv-browser.d.mts.map +0 -1
  529. package/dist/esm/util/authHostEnv-browser.mjs +0 -7
  530. package/dist/esm/util/authHostEnv-browser.mjs.map +0 -1
  531. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  532. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  533. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  534. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  535. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  536. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  537. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +0 -261
  538. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  539. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  540. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  541. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +0 -4
  542. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  543. package/dist/workerd/msal/credentials.d.ts +0 -52
  544. package/dist/workerd/msal/credentials.d.ts.map +0 -1
  545. package/dist/workerd/msal/credentials.js +0 -4
  546. package/dist/workerd/msal/credentials.js.map +0 -1
  547. package/dist/workerd/util/authHostEnv-browser.d.mts +0 -4
  548. package/dist/workerd/util/authHostEnv-browser.d.mts.map +0 -1
  549. package/dist/workerd/util/authHostEnv-browser.mjs +0 -7
  550. package/dist/workerd/util/authHostEnv-browser.mjs.map +0 -1
  551. /package/dist/browser/credentials/{clientSecretCredential.d.ts → clientSecretCredential-browser.d.mts} +0 -0
  552. /package/dist/browser/credentials/{clientSecretCredential.js → clientSecretCredential-browser.mjs} +0 -0
  553. /package/dist/browser/credentials/{interactiveBrowserCredential.d.ts → interactiveBrowserCredential-browser.d.mts} +0 -0
  554. /package/dist/browser/credentials/{interactiveBrowserCredential.js → interactiveBrowserCredential-browser.mjs} +0 -0
  555. /package/dist/browser/credentials/{usernamePasswordCredential.d.ts → usernamePasswordCredential-browser.d.mts} +0 -0
  556. /package/dist/browser/credentials/{usernamePasswordCredential.js → usernamePasswordCredential-browser.mjs} +0 -0
  557. /package/dist/browser/msal/{msal.d.ts → msal-browser.d.mts} +0 -0
  558. /package/dist/browser/msal/{msal.js → msal-browser.mjs} +0 -0
  559. /package/dist/browser/plugins/{consumer.d.ts → consumer-browser.d.mts} +0 -0
  560. /package/dist/browser/plugins/{consumer.js → consumer-browser.mjs} +0 -0
  561. /package/dist/browser/util/{processMultiTenantRequest.d.ts → processMultiTenantRequest-browser.d.mts} +0 -0
  562. /package/dist/browser/util/{processMultiTenantRequest.js → processMultiTenantRequest-browser.mjs} +0 -0
@@ -1,150 +1,194 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.AzurePipelinesCredential = void 0;
6
- exports.handleOidcResponse = handleOidcResponse;
7
- const errors_js_1 = require("../errors.js");
8
- const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
9
- const clientAssertionCredential_js_1 = require("./clientAssertionCredential.js");
10
- const identityClient_js_1 = require("../client/identityClient.js");
11
- const tenantIdUtils_js_1 = require("../util/tenantIdUtils.js");
12
- const logging_js_1 = require("../util/logging.js");
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var azurePipelinesCredential_exports = {};
19
+ __export(azurePipelinesCredential_exports, {
20
+ AzurePipelinesCredential: () => AzurePipelinesCredential,
21
+ handleOidcResponse: () => handleOidcResponse
22
+ });
23
+ module.exports = __toCommonJS(azurePipelinesCredential_exports);
24
+ var import_errors = require("../errors.js");
25
+ var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
26
+ var import_clientAssertionCredential = require("./clientAssertionCredential.js");
27
+ var import_identityClient = require("../client/identityClient.js");
28
+ var import_tenantIdUtils = require("../util/tenantIdUtils.js");
29
+ var import_logging = require("../util/logging.js");
13
30
  const credentialName = "AzurePipelinesCredential";
14
- const logger = (0, logging_js_1.credentialLogger)(credentialName);
31
+ const logger = (0, import_logging.credentialLogger)(credentialName);
15
32
  const OIDC_API_VERSION = "7.1";
16
- /**
17
- * This credential is designed to be used in Azure Pipelines with service connections
18
- * as a setup for workload identity federation.
19
- */
20
33
  class AzurePipelinesCredential {
21
- clientAssertionCredential;
22
- identityClient;
23
- /**
24
- * AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.
25
- * @param tenantId - tenantId associated with the service connection
26
- * @param clientId - clientId associated with the service connection
27
- * @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key
28
- * @param systemAccessToken - The pipeline's <see href="https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken">System.AccessToken</see> value.
29
- * @param options - The identity client options to use for authentication.
30
- */
31
- constructor(tenantId, clientId, serviceConnectionId, systemAccessToken, options = {}) {
32
- if (!clientId) {
33
- throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. clientId is a required parameter.`);
34
- }
35
- if (!tenantId) {
36
- throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. tenantId is a required parameter.`);
37
- }
38
- if (!serviceConnectionId) {
39
- throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. serviceConnectionId is a required parameter.`);
40
- }
41
- if (!systemAccessToken) {
42
- throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. systemAccessToken is a required parameter.`);
43
- }
44
- // Allow these headers to be logged for troubleshooting by AzurePipelines.
45
- options.loggingOptions = {
46
- ...options?.loggingOptions,
47
- additionalAllowedHeaderNames: [
48
- ...(options.loggingOptions?.additionalAllowedHeaderNames ?? []),
49
- "x-vss-e2eid",
50
- "x-msedge-ref",
51
- ],
52
- };
53
- this.identityClient = new identityClient_js_1.IdentityClient(options);
54
- (0, tenantIdUtils_js_1.checkTenantId)(logger, tenantId);
55
- logger.info(`Invoking AzurePipelinesCredential with tenant ID: ${tenantId}, client ID: ${clientId}, and service connection ID: ${serviceConnectionId}`);
56
- if (!process.env.SYSTEM_OIDCREQUESTURI) {
57
- throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- "SYSTEM_OIDCREQUESTURI"`);
58
- }
59
- const oidcRequestUrl = `${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${OIDC_API_VERSION}&serviceConnectionId=${serviceConnectionId}`;
60
- logger.info(`Invoking ClientAssertionCredential with tenant ID: ${tenantId}, client ID: ${clientId} and service connection ID: ${serviceConnectionId}`);
61
- this.clientAssertionCredential = new clientAssertionCredential_js_1.ClientAssertionCredential(tenantId, clientId, this.requestOidcToken.bind(this, oidcRequestUrl, systemAccessToken), options);
34
+ clientAssertionCredential;
35
+ identityClient;
36
+ /**
37
+ * AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.
38
+ * @param tenantId - tenantId associated with the service connection
39
+ * @param clientId - clientId associated with the service connection
40
+ * @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key
41
+ * @param systemAccessToken - The pipeline's <see href="https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken">System.AccessToken</see> value.
42
+ * @param options - The identity client options to use for authentication.
43
+ */
44
+ constructor(tenantId, clientId, serviceConnectionId, systemAccessToken, options = {}) {
45
+ if (!clientId) {
46
+ throw new import_errors.CredentialUnavailableError(
47
+ `${credentialName}: is unavailable. clientId is a required parameter.`
48
+ );
62
49
  }
63
- /**
64
- * Authenticates with Microsoft Entra ID and returns an access token if successful.
65
- * If authentication fails, a {@link CredentialUnavailableError} or {@link AuthenticationError} will be thrown with the details of the failure.
66
- *
67
- * @param scopes - The list of scopes for which the token will have access.
68
- * @param options - The options used to configure any requests this
69
- * TokenCredential implementation might make.
70
- */
71
- async getToken(scopes, options) {
72
- if (!this.clientAssertionCredential) {
73
- const errorMessage = `${credentialName}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required -
50
+ if (!tenantId) {
51
+ throw new import_errors.CredentialUnavailableError(
52
+ `${credentialName}: is unavailable. tenantId is a required parameter.`
53
+ );
54
+ }
55
+ if (!serviceConnectionId) {
56
+ throw new import_errors.CredentialUnavailableError(
57
+ `${credentialName}: is unavailable. serviceConnectionId is a required parameter.`
58
+ );
59
+ }
60
+ if (!systemAccessToken) {
61
+ throw new import_errors.CredentialUnavailableError(
62
+ `${credentialName}: is unavailable. systemAccessToken is a required parameter.`
63
+ );
64
+ }
65
+ options.loggingOptions = {
66
+ ...options?.loggingOptions,
67
+ additionalAllowedHeaderNames: [
68
+ ...options.loggingOptions?.additionalAllowedHeaderNames ?? [],
69
+ "x-vss-e2eid",
70
+ "x-msedge-ref"
71
+ ]
72
+ };
73
+ this.identityClient = new import_identityClient.IdentityClient(options);
74
+ (0, import_tenantIdUtils.checkTenantId)(logger, tenantId);
75
+ logger.info(
76
+ `Invoking AzurePipelinesCredential with tenant ID: ${tenantId}, client ID: ${clientId}, and service connection ID: ${serviceConnectionId}`
77
+ );
78
+ if (!process.env.SYSTEM_OIDCREQUESTURI) {
79
+ throw new import_errors.CredentialUnavailableError(
80
+ `${credentialName}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- "SYSTEM_OIDCREQUESTURI"`
81
+ );
82
+ }
83
+ const oidcRequestUrl = `${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${OIDC_API_VERSION}&serviceConnectionId=${serviceConnectionId}`;
84
+ logger.info(
85
+ `Invoking ClientAssertionCredential with tenant ID: ${tenantId}, client ID: ${clientId} and service connection ID: ${serviceConnectionId}`
86
+ );
87
+ this.clientAssertionCredential = new import_clientAssertionCredential.ClientAssertionCredential(
88
+ tenantId,
89
+ clientId,
90
+ this.requestOidcToken.bind(this, oidcRequestUrl, systemAccessToken),
91
+ options
92
+ );
93
+ }
94
+ /**
95
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
96
+ * If authentication fails, a {@link CredentialUnavailableError} or {@link AuthenticationError} will be thrown with the details of the failure.
97
+ *
98
+ * @param scopes - The list of scopes for which the token will have access.
99
+ * @param options - The options used to configure any requests this
100
+ * TokenCredential implementation might make.
101
+ */
102
+ async getToken(scopes, options) {
103
+ if (!this.clientAssertionCredential) {
104
+ const errorMessage = `${credentialName}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required -
74
105
  tenantId,
75
106
  clientId,
76
107
  serviceConnectionId,
77
108
  systemAccessToken,
78
109
  "SYSTEM_OIDCREQUESTURI".
79
110
  See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;
80
- logger.error(errorMessage);
81
- throw new errors_js_1.CredentialUnavailableError(errorMessage);
82
- }
83
- logger.info("Invoking getToken() of Client Assertion Credential");
84
- return this.clientAssertionCredential.getToken(scopes, options);
85
- }
86
- /**
87
- *
88
- * @param oidcRequestUrl - oidc request url
89
- * @param systemAccessToken - system access token
90
- * @returns OIDC token from Azure Pipelines
91
- */
92
- async requestOidcToken(oidcRequestUrl, systemAccessToken) {
93
- logger.info("Requesting OIDC token from Azure Pipelines...");
94
- logger.info(oidcRequestUrl);
95
- const request = (0, core_rest_pipeline_1.createPipelineRequest)({
96
- url: oidcRequestUrl,
97
- method: "POST",
98
- headers: (0, core_rest_pipeline_1.createHttpHeaders)({
99
- "Content-Type": "application/json",
100
- Authorization: `Bearer ${systemAccessToken}`,
101
- // Prevents the service from responding with a redirect HTTP status code (useful for automation).
102
- "X-TFS-FedAuthRedirect": "Suppress",
103
- }),
104
- });
105
- const response = await this.identityClient.sendRequest(request);
106
- return handleOidcResponse(response);
111
+ logger.error(errorMessage);
112
+ throw new import_errors.CredentialUnavailableError(errorMessage);
107
113
  }
114
+ logger.info("Invoking getToken() of Client Assertion Credential");
115
+ return this.clientAssertionCredential.getToken(scopes, options);
116
+ }
117
+ /**
118
+ *
119
+ * @param oidcRequestUrl - oidc request url
120
+ * @param systemAccessToken - system access token
121
+ * @returns OIDC token from Azure Pipelines
122
+ */
123
+ async requestOidcToken(oidcRequestUrl, systemAccessToken) {
124
+ logger.info("Requesting OIDC token from Azure Pipelines...");
125
+ logger.info(oidcRequestUrl);
126
+ const request = (0, import_core_rest_pipeline.createPipelineRequest)({
127
+ url: oidcRequestUrl,
128
+ method: "POST",
129
+ headers: (0, import_core_rest_pipeline.createHttpHeaders)({
130
+ "Content-Type": "application/json",
131
+ Authorization: `Bearer ${systemAccessToken}`,
132
+ // Prevents the service from responding with a redirect HTTP status code (useful for automation).
133
+ "X-TFS-FedAuthRedirect": "Suppress"
134
+ })
135
+ });
136
+ const response = await this.identityClient.sendRequest(request);
137
+ return handleOidcResponse(response);
138
+ }
108
139
  }
109
- exports.AzurePipelinesCredential = AzurePipelinesCredential;
110
140
  function handleOidcResponse(response) {
111
- // OIDC token is present in `bodyAsText` field
112
- const text = response.bodyAsText;
113
- if (!text) {
114
- logger.error(`${credentialName}: Authentication Failed. Received null token from OIDC request. Response status- ${response.status}. Complete response - ${JSON.stringify(response)}`);
115
- throw new errors_js_1.AuthenticationError(response.status, {
116
- error: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,
117
- error_description: `${JSON.stringify(response)}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,
118
- });
141
+ const text = response.bodyAsText;
142
+ const responseDetails = stringifyOidcResponse(response);
143
+ if (!text) {
144
+ logger.error(
145
+ `${credentialName}: Authentication Failed. Received null token from OIDC request. Response status- ${response.status}. Complete response - ${responseDetails}`
146
+ );
147
+ throw new import_errors.AuthenticationError(response.status, {
148
+ error: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,
149
+ error_description: `Complete response - ${responseDetails}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`
150
+ });
151
+ }
152
+ try {
153
+ const result = JSON.parse(text);
154
+ if (result?.oidcToken) {
155
+ return result.oidcToken;
156
+ } else {
157
+ const errorMessage = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;
158
+ let errorDescription = ``;
159
+ if (response.status !== 200) {
160
+ errorDescription = `${responseDetails}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;
161
+ }
162
+ logger.error(errorMessage);
163
+ logger.error(errorDescription);
164
+ throw new import_errors.AuthenticationError(response.status, {
165
+ error: errorMessage,
166
+ error_description: errorDescription
167
+ });
119
168
  }
120
- try {
121
- const result = JSON.parse(text);
122
- if (result?.oidcToken) {
123
- return result.oidcToken;
124
- }
125
- else {
126
- const errorMessage = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;
127
- let errorDescription = ``;
128
- if (response.status !== 200) {
129
- errorDescription = `Response body = ${text}. Response Headers ["x-vss-e2eid"] = ${response.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${response.headers.get("x-msedge-ref")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;
130
- }
131
- logger.error(errorMessage);
132
- logger.error(errorDescription);
133
- throw new errors_js_1.AuthenticationError(response.status, {
134
- error: errorMessage,
135
- error_description: errorDescription,
136
- });
137
- }
138
- }
139
- catch (e) {
140
- const errorDetails = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;
141
- logger.error(`Response from service = ${text}, Response Headers ["x-vss-e2eid"] = ${response.headers.get("x-vss-e2eid")}
142
- and ["x-msedge-ref"] = ${response.headers.get("x-msedge-ref")}, error message = ${e.message}`);
143
- logger.error(errorDetails);
144
- throw new errors_js_1.AuthenticationError(response.status, {
145
- error: errorDetails,
146
- error_description: `Response = ${text}. Response headers ["x-vss-e2eid"] = ${response.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${response.headers.get("x-msedge-ref")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,
147
- });
169
+ } catch (e) {
170
+ const errorDetails = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;
171
+ logger.error(`Response from service = ${responseDetails}, error message = ${e.message}`);
172
+ logger.error(errorDetails);
173
+ throw new import_errors.AuthenticationError(response.status, {
174
+ error: errorDetails,
175
+ error_description: `Response from service = ${responseDetails}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`
176
+ });
177
+ }
178
+ }
179
+ function stringifyOidcResponse(response) {
180
+ return JSON.stringify({
181
+ status: response.status,
182
+ bodyAsText: response.bodyAsText,
183
+ headers: {
184
+ "x-vss-e2eid": response.headers.get("x-vss-e2eid"),
185
+ "x-msedge-ref": response.headers.get("x-msedge-ref")
148
186
  }
187
+ });
149
188
  }
150
- //# sourceMappingURL=azurePipelinesCredential.js.map
189
+ // Annotate the CommonJS export names for ESM import in node:
190
+ 0 && (module.exports = {
191
+ AzurePipelinesCredential,
192
+ handleOidcResponse
193
+ });
194
+ //# sourceMappingURL=azurePipelinesCredential.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"azurePipelinesCredential.js","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAoJlC,gDA6CC;AA9LD,4CAA+E;AAC/E,kEAAqF;AAGrF,iFAA2E;AAC3E,mEAA6D;AAE7D,+DAAyD;AACzD,mDAAsD;AAEtD,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAClD,MAAM,MAAM,GAAG,IAAA,6BAAgB,EAAC,cAAc,CAAC,CAAC;AAChD,MAAM,gBAAgB,GAAG,KAAK,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C,CAAC;YAC/B,MAAM,IAAI,+BAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC7C,KAAK,EAAE,YAAY;gBACnB,iBAAiB,EAAE,gBAAgB;aACpC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,MAAM,YAAY,GAAG,GAAG,cAAc,wEAAwE,CAAC;QAC/G,MAAM,CAAC,KAAK,CACV,2BAA2B,IAAI,wCAAwC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;+BACjF,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,OAAO,EAAE,CAC9F,CAAC;QACF,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC3B,MAAM,IAAI,+BAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC7C,KAAK,EAAE,YAAY;YACnB,iBAAiB,EAAE,cAAc,IAAI,wCAAwC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,4BAA4B,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,8HAA8H;SAC/S,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { AuthenticationError, CredentialUnavailableError } from \"../errors.js\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\n\nimport type { AzurePipelinesCredentialOptions } from \"./azurePipelinesCredentialOptions.js\";\nimport { ClientAssertionCredential } from \"./clientAssertionCredential.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport { credentialLogger } from \"../util/logging.js\";\n\nconst credentialName = \"AzurePipelinesCredential\";\nconst logger = credentialLogger(credentialName);\nconst OIDC_API_VERSION = \"7.1\";\n\n/**\n * This credential is designed to be used in Azure Pipelines with service connections\n * as a setup for workload identity federation.\n */\nexport class AzurePipelinesCredential implements TokenCredential {\n private clientAssertionCredential: ClientAssertionCredential | undefined;\n private identityClient: IdentityClient;\n\n /**\n * AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.\n * @param tenantId - tenantId associated with the service connection\n * @param clientId - clientId associated with the service connection\n * @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key\n * @param systemAccessToken - The pipeline's <see href=\"https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken\">System.AccessToken</see> value.\n * @param options - The identity client options to use for authentication.\n */\n constructor(\n tenantId: string,\n clientId: string,\n serviceConnectionId: string,\n systemAccessToken: string,\n options: AzurePipelinesCredentialOptions = {},\n ) {\n if (!clientId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. clientId is a required parameter.`,\n );\n }\n if (!tenantId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. tenantId is a required parameter.`,\n );\n }\n if (!serviceConnectionId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. serviceConnectionId is a required parameter.`,\n );\n }\n if (!systemAccessToken) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. systemAccessToken is a required parameter.`,\n );\n }\n\n // Allow these headers to be logged for troubleshooting by AzurePipelines.\n options.loggingOptions = {\n ...options?.loggingOptions,\n additionalAllowedHeaderNames: [\n ...(options.loggingOptions?.additionalAllowedHeaderNames ?? []),\n \"x-vss-e2eid\",\n \"x-msedge-ref\",\n ],\n };\n\n this.identityClient = new IdentityClient(options);\n checkTenantId(logger, tenantId);\n logger.info(\n `Invoking AzurePipelinesCredential with tenant ID: ${tenantId}, client ID: ${clientId}, and service connection ID: ${serviceConnectionId}`,\n );\n if (!process.env.SYSTEM_OIDCREQUESTURI) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- \"SYSTEM_OIDCREQUESTURI\"`,\n );\n }\n\n const oidcRequestUrl = `${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${OIDC_API_VERSION}&serviceConnectionId=${serviceConnectionId}`;\n logger.info(\n `Invoking ClientAssertionCredential with tenant ID: ${tenantId}, client ID: ${clientId} and service connection ID: ${serviceConnectionId}`,\n );\n this.clientAssertionCredential = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.requestOidcToken.bind(this, oidcRequestUrl, systemAccessToken),\n options,\n );\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} or {@link AuthenticationError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options?: GetTokenOptions,\n ): Promise<AccessToken> {\n if (!this.clientAssertionCredential) {\n const errorMessage = `${credentialName}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required - \n tenantId,\n clientId,\n serviceConnectionId,\n systemAccessToken,\n \"SYSTEM_OIDCREQUESTURI\". \n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;\n logger.error(errorMessage);\n throw new CredentialUnavailableError(errorMessage);\n }\n logger.info(\"Invoking getToken() of Client Assertion Credential\");\n return this.clientAssertionCredential.getToken(scopes, options);\n }\n\n /**\n *\n * @param oidcRequestUrl - oidc request url\n * @param systemAccessToken - system access token\n * @returns OIDC token from Azure Pipelines\n */\n private async requestOidcToken(\n oidcRequestUrl: string,\n systemAccessToken: string,\n ): Promise<string> {\n logger.info(\"Requesting OIDC token from Azure Pipelines...\");\n logger.info(oidcRequestUrl);\n const request = createPipelineRequest({\n url: oidcRequestUrl,\n method: \"POST\",\n headers: createHttpHeaders({\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${systemAccessToken}`,\n // Prevents the service from responding with a redirect HTTP status code (useful for automation).\n \"X-TFS-FedAuthRedirect\": \"Suppress\",\n }),\n });\n const response = await this.identityClient.sendRequest(request);\n return handleOidcResponse(response);\n }\n}\n\nexport function handleOidcResponse(response: PipelineResponse): string {\n // OIDC token is present in `bodyAsText` field\n const text = response.bodyAsText;\n if (!text) {\n logger.error(\n `${credentialName}: Authentication Failed. Received null token from OIDC request. Response status- ${\n response.status\n }. Complete response - ${JSON.stringify(response)}`,\n );\n throw new AuthenticationError(response.status, {\n error: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,\n error_description: `${JSON.stringify(\n response,\n )}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,\n });\n }\n try {\n const result = JSON.parse(text);\n if (result?.oidcToken) {\n return result.oidcToken;\n } else {\n const errorMessage = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;\n let errorDescription = ``;\n if (response.status !== 200) {\n errorDescription = `Response body = ${text}. Response Headers [\"x-vss-e2eid\"] = ${response.headers.get(\"x-vss-e2eid\")} and [\"x-msedge-ref\"] = ${response.headers.get(\"x-msedge-ref\")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;\n }\n logger.error(errorMessage);\n logger.error(errorDescription);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: errorDescription,\n });\n }\n } catch (e: any) {\n const errorDetails = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;\n logger.error(\n `Response from service = ${text}, Response Headers [\"x-vss-e2eid\"] = ${response.headers.get(\"x-vss-e2eid\")} \n and [\"x-msedge-ref\"] = ${response.headers.get(\"x-msedge-ref\")}, error message = ${e.message}`,\n );\n logger.error(errorDetails);\n throw new AuthenticationError(response.status, {\n error: errorDetails,\n error_description: `Response = ${text}. Response headers [\"x-vss-e2eid\"] = ${response.headers.get(\"x-vss-e2eid\")} and [\"x-msedge-ref\"] = ${response.headers.get(\"x-msedge-ref\")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,\n });\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/credentials/azurePipelinesCredential.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { AuthenticationError, CredentialUnavailableError } from \"../errors.js\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\n\nimport type { AzurePipelinesCredentialOptions } from \"./azurePipelinesCredentialOptions.js\";\nimport { ClientAssertionCredential } from \"#platform/credentials/clientAssertionCredential\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport { credentialLogger } from \"../util/logging.js\";\n\nconst credentialName = \"AzurePipelinesCredential\";\nconst logger = credentialLogger(credentialName);\nconst OIDC_API_VERSION = \"7.1\";\n\n/**\n * This credential is designed to be used in Azure Pipelines with service connections\n * as a setup for workload identity federation.\n */\nexport class AzurePipelinesCredential implements TokenCredential {\n private clientAssertionCredential: ClientAssertionCredential | undefined;\n private identityClient: IdentityClient;\n\n /**\n * AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.\n * @param tenantId - tenantId associated with the service connection\n * @param clientId - clientId associated with the service connection\n * @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key\n * @param systemAccessToken - The pipeline's <see href=\"https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken\">System.AccessToken</see> value.\n * @param options - The identity client options to use for authentication.\n */\n constructor(\n tenantId: string,\n clientId: string,\n serviceConnectionId: string,\n systemAccessToken: string,\n options: AzurePipelinesCredentialOptions = {},\n ) {\n if (!clientId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. clientId is a required parameter.`,\n );\n }\n if (!tenantId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. tenantId is a required parameter.`,\n );\n }\n if (!serviceConnectionId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. serviceConnectionId is a required parameter.`,\n );\n }\n if (!systemAccessToken) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. systemAccessToken is a required parameter.`,\n );\n }\n\n // Allow these headers to be logged for troubleshooting by AzurePipelines.\n options.loggingOptions = {\n ...options?.loggingOptions,\n additionalAllowedHeaderNames: [\n ...(options.loggingOptions?.additionalAllowedHeaderNames ?? []),\n \"x-vss-e2eid\",\n \"x-msedge-ref\",\n ],\n };\n\n this.identityClient = new IdentityClient(options);\n checkTenantId(logger, tenantId);\n logger.info(\n `Invoking AzurePipelinesCredential with tenant ID: ${tenantId}, client ID: ${clientId}, and service connection ID: ${serviceConnectionId}`,\n );\n if (!process.env.SYSTEM_OIDCREQUESTURI) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- \"SYSTEM_OIDCREQUESTURI\"`,\n );\n }\n\n const oidcRequestUrl = `${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${OIDC_API_VERSION}&serviceConnectionId=${serviceConnectionId}`;\n logger.info(\n `Invoking ClientAssertionCredential with tenant ID: ${tenantId}, client ID: ${clientId} and service connection ID: ${serviceConnectionId}`,\n );\n this.clientAssertionCredential = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.requestOidcToken.bind(this, oidcRequestUrl, systemAccessToken),\n options,\n );\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} or {@link AuthenticationError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options?: GetTokenOptions,\n ): Promise<AccessToken> {\n if (!this.clientAssertionCredential) {\n const errorMessage = `${credentialName}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required - \n tenantId,\n clientId,\n serviceConnectionId,\n systemAccessToken,\n \"SYSTEM_OIDCREQUESTURI\". \n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;\n logger.error(errorMessage);\n throw new CredentialUnavailableError(errorMessage);\n }\n logger.info(\"Invoking getToken() of Client Assertion Credential\");\n return this.clientAssertionCredential.getToken(scopes, options);\n }\n\n /**\n *\n * @param oidcRequestUrl - oidc request url\n * @param systemAccessToken - system access token\n * @returns OIDC token from Azure Pipelines\n */\n private async requestOidcToken(\n oidcRequestUrl: string,\n systemAccessToken: string,\n ): Promise<string> {\n logger.info(\"Requesting OIDC token from Azure Pipelines...\");\n logger.info(oidcRequestUrl);\n const request = createPipelineRequest({\n url: oidcRequestUrl,\n method: \"POST\",\n headers: createHttpHeaders({\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${systemAccessToken}`,\n // Prevents the service from responding with a redirect HTTP status code (useful for automation).\n \"X-TFS-FedAuthRedirect\": \"Suppress\",\n }),\n });\n const response = await this.identityClient.sendRequest(request);\n return handleOidcResponse(response);\n }\n}\n\nexport function handleOidcResponse(response: PipelineResponse): string {\n // OIDC token is present in `bodyAsText` field\n const text = response.bodyAsText;\n const responseDetails = stringifyOidcResponse(response);\n if (!text) {\n logger.error(\n `${credentialName}: Authentication Failed. Received null token from OIDC request. Response status- ${\n response.status\n }. Complete response - ${responseDetails}`,\n );\n throw new AuthenticationError(response.status, {\n error: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,\n error_description: `Complete response - ${responseDetails}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,\n });\n }\n try {\n const result = JSON.parse(text);\n if (result?.oidcToken) {\n return result.oidcToken;\n } else {\n const errorMessage = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;\n let errorDescription = ``;\n if (response.status !== 200) {\n errorDescription = `${responseDetails}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;\n }\n logger.error(errorMessage);\n logger.error(errorDescription);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: errorDescription,\n });\n }\n } catch (e: any) {\n const errorDetails = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;\n logger.error(`Response from service = ${responseDetails}, error message = ${e.message}`);\n logger.error(errorDetails);\n throw new AuthenticationError(response.status, {\n error: errorDetails,\n error_description: `Response from service = ${responseDetails}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,\n });\n }\n}\n\nfunction stringifyOidcResponse(response: PipelineResponse): string {\n return JSON.stringify({\n status: response.status,\n bodyAsText: response.bodyAsText,\n headers: {\n \"x-vss-e2eid\": response.headers.get(\"x-vss-e2eid\"),\n \"x-msedge-ref\": response.headers.get(\"x-msedge-ref\"),\n },\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAAgE;AAChE,gCAAyD;AAGzD,uCAA0C;AAC1C,4BAA+B;AAE/B,2BAA8B;AAC9B,qBAAiC;AAEjC,MAAM,iBAAiB;AACvB,MAAM,aAAS,iCAAiB,cAAc;AAC9C,MAAM,mBAAmB;AAMlB,MAAM,yBAAoD;AAAA,EACvD;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUR,YACE,UACA,UACA,qBACA,mBACA,UAA2C,CAAC,GAC5C;AACA,QAAI,CAAC,UAAU;AACb,YAAM,IAAI;AAAA,QACR,GAAG,cAAc;AAAA,MACnB;AAAA,IACF;AACA,QAAI,CAAC,UAAU;AACb,YAAM,IAAI;AAAA,QACR,GAAG,cAAc;AAAA,MACnB;AAAA,IACF;AACA,QAAI,CAAC,q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WAAO,MAAM,YAAY;AACzB,UAAM,IAAI,kCAAoB,SAAS,QAAQ;AAAA,MAC7C,OAAO;AAAA,MACP,mBAAmB,2BAA2B,eAAe;AAAA,IAC/D,CAAC;AAAA,EACH;AACF;AAEA,SAAS,sBAAsB,UAAoC;AACjE,SAAO,KAAK,UAAU;AAAA,IACpB,QAAQ,SAAS;AAAA,IACjB,YAAY,SAAS;AAAA,IACrB,SAAS;AAAA,MACP,eAAe,SAAS,QAAQ,IAAI,aAAa;AAAA,MACjD,gBAAgB,SAAS,QAAQ,IAAI,cAAc;AAAA,IACrD;AAAA,EACF,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"azurePipelinesCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,+BACf,SAAQ,iCAAiC,EACvC,4BAA4B,EAC5B,0BAA0B;CAAG"}
1
+ {"version":3,"file":"azurePipelinesCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,+BACf,SACE,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B;CAAG"}
@@ -1,5 +1,16 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=azurePipelinesCredentialOptions.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var azurePipelinesCredentialOptions_exports = {};
15
+ module.exports = __toCommonJS(azurePipelinesCredentialOptions_exports);
16
+ //# sourceMappingURL=azurePipelinesCredentialOptions.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"azurePipelinesCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredentialOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Optional parameters for the {@link AzurePipelinesCredential} class.\n */\nexport interface AzurePipelinesCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/credentials/azurePipelinesCredentialOptions.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Optional parameters for the {@link AzurePipelinesCredential} class.\n */\nexport interface AzurePipelinesCredentialOptions\n extends\n MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,5 +1,15 @@
1
1
  import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
2
  import type { AzurePowerShellCredentialOptions } from "./azurePowerShellCredentialOptions.js";
3
+ /**
4
+ * Creates the child environment used to pass private values to PowerShell.
5
+ *
6
+ * @param resource - The resource passed to PowerShell.
7
+ * @param tenantId - The optional tenant ID passed to PowerShell.
8
+ * @param environment - The environment to copy.
9
+ * @returns A child environment containing canonical private variable names.
10
+ * @internal
11
+ */
12
+ export declare function createPowerShellEnvironment(resource: string, tenantId: string | undefined, environment?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
3
13
  /**
4
14
  * Returns a platform-appropriate command name by appending ".exe" on Windows.
5
15
  *
@@ -1 +1 @@
1
- {"version":3,"file":"azurePowerShellCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAStF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAS9F;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAMzD;AAuBD;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;CAI5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;CAOzC,CAAC;AAUF;;;;GAIG;AACH,eAAO,MAAM,YAAY,UAA0B,CAAC;AAMpD;;;;GAIG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,4BAA4B,CAAW;IAC/C,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB;;;;;;;;;;OAUG;gBACS,OAAO,CAAC,EAAE,gCAAgC;IAWtD;;;OAGG;YACW,6BAA6B;IAwE3C;;;;;;OAMG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,WAAW,CAAC;CA0DxB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAyB/C"}
1
+ {"version":3,"file":"azurePowerShellCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAStF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAgB9F;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,WAAW,GAAE,MAAM,CAAC,UAAwB,GAC3C,MAAM,CAAC,UAAU,CASnB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAMzD;AA4BD;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;CAI5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;CAOzC,CAAC;AAUF;;;;GAIG;AACH,eAAO,MAAM,YAAY,UAA0B,CAAC;AAMpD;;;;GAIG;AAC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