@azure/identity 4.14.0-beta.3 → 4.14.0-beta.4

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 (327) hide show
  1. package/dist/browser/client/identityClient.d.ts.map +1 -1
  2. package/dist/browser/client/identityClient.js +2 -1
  3. package/dist/browser/client/identityClient.js.map +1 -1
  4. package/dist/browser/constants.d.ts +1 -1
  5. package/dist/browser/constants.js +1 -1
  6. package/dist/browser/constants.js.map +1 -1
  7. package/dist/browser/credentials/{authorizationCodeCredential.d.ts → authorizationCodeCredential-browser.d.mts} +1 -1
  8. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -0
  9. package/dist/browser/credentials/{authorizationCodeCredential.js → authorizationCodeCredential-browser.mjs} +1 -1
  10. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -0
  11. package/dist/browser/credentials/{azureCliCredential.d.ts → azureCliCredential-browser.d.mts} +1 -1
  12. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -0
  13. package/dist/browser/credentials/{azureCliCredential.js → azureCliCredential-browser.mjs} +1 -1
  14. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -0
  15. package/dist/browser/credentials/{azureDeveloperCliCredential.d.ts → azureDeveloperCliCredential-browser.d.mts} +1 -1
  16. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -0
  17. package/dist/browser/credentials/{azureDeveloperCliCredential.js → azureDeveloperCliCredential-browser.mjs} +1 -1
  18. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -0
  19. package/dist/browser/credentials/{azurePipelinesCredential.d.ts → azurePipelinesCredential-browser.d.mts} +1 -1
  20. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -0
  21. package/dist/browser/credentials/{azurePipelinesCredential.js → azurePipelinesCredential-browser.mjs} +1 -1
  22. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -0
  23. package/dist/browser/credentials/{azurePowerShellCredential.d.ts → azurePowerShellCredential-browser.d.mts} +1 -1
  24. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -0
  25. package/dist/browser/credentials/{azurePowerShellCredential.js → azurePowerShellCredential-browser.mjs} +1 -1
  26. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -0
  27. package/dist/browser/credentials/{clientAssertionCredential.d.ts → clientAssertionCredential-browser.d.mts} +1 -1
  28. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -0
  29. package/dist/browser/credentials/{clientAssertionCredential.js → clientAssertionCredential-browser.mjs} +1 -1
  30. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -0
  31. package/dist/browser/credentials/{clientCertificateCredential.d.ts → clientCertificateCredential-browser.d.mts} +1 -1
  32. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -0
  33. package/dist/browser/credentials/{clientCertificateCredential.js → clientCertificateCredential-browser.mjs} +1 -1
  34. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -0
  35. package/dist/browser/credentials/{clientSecretCredential.d.ts → clientSecretCredential-browser.d.mts} +1 -1
  36. package/dist/browser/credentials/clientSecretCredential-browser.d.mts.map +1 -0
  37. package/dist/browser/credentials/{clientSecretCredential.js → clientSecretCredential-browser.mjs} +1 -1
  38. package/dist/browser/credentials/clientSecretCredential-browser.mjs.map +1 -0
  39. package/dist/browser/credentials/{defaultAzureCredential.d.ts → defaultAzureCredential-browser.d.mts} +1 -1
  40. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -0
  41. package/dist/browser/credentials/{defaultAzureCredential.js → defaultAzureCredential-browser.mjs} +1 -1
  42. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -0
  43. package/dist/browser/credentials/{deviceCodeCredential.d.ts → deviceCodeCredential-browser.d.mts} +1 -1
  44. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -0
  45. package/dist/browser/credentials/{deviceCodeCredential.js → deviceCodeCredential-browser.mjs} +1 -1
  46. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -0
  47. package/dist/browser/credentials/{environmentCredential.d.ts → environmentCredential-browser.d.mts} +1 -1
  48. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -0
  49. package/dist/browser/credentials/{environmentCredential.js → environmentCredential-browser.mjs} +1 -1
  50. package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -0
  51. package/dist/browser/credentials/{interactiveBrowserCredential.d.ts → interactiveBrowserCredential-browser.d.mts} +1 -1
  52. package/dist/browser/credentials/interactiveBrowserCredential-browser.d.mts.map +1 -0
  53. package/dist/browser/credentials/{interactiveBrowserCredential.js → interactiveBrowserCredential-browser.mjs} +1 -1
  54. package/dist/browser/credentials/interactiveBrowserCredential-browser.mjs.map +1 -0
  55. package/dist/browser/credentials/managedIdentityCredential/{index.d.ts → index-browser.d.mts} +1 -1
  56. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -0
  57. package/dist/browser/credentials/managedIdentityCredential/{index.js → index-browser.mjs} +1 -1
  58. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -0
  59. package/dist/browser/credentials/{onBehalfOfCredential.d.ts → onBehalfOfCredential-browser.d.mts} +1 -1
  60. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -0
  61. package/dist/browser/credentials/{onBehalfOfCredential.js → onBehalfOfCredential-browser.mjs} +1 -1
  62. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -0
  63. package/dist/browser/credentials/{usernamePasswordCredential.d.ts → usernamePasswordCredential-browser.d.mts} +1 -1
  64. package/dist/browser/credentials/usernamePasswordCredential-browser.d.mts.map +1 -0
  65. package/dist/browser/credentials/{usernamePasswordCredential.js → usernamePasswordCredential-browser.mjs} +1 -1
  66. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -0
  67. package/dist/browser/credentials/{visualStudioCodeCredential.d.ts → visualStudioCodeCredential-browser.d.mts} +1 -1
  68. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -0
  69. package/dist/browser/credentials/{visualStudioCodeCredential.js → visualStudioCodeCredential-browser.mjs} +1 -1
  70. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -0
  71. package/dist/browser/credentials/{workloadIdentityCredential.d.ts → workloadIdentityCredential-browser.d.mts} +1 -1
  72. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -0
  73. package/dist/browser/credentials/{workloadIdentityCredential.js → workloadIdentityCredential-browser.mjs} +1 -1
  74. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -0
  75. package/dist/browser/index.d.ts +18 -18
  76. package/dist/browser/index.d.ts.map +1 -1
  77. package/dist/browser/index.js +19 -19
  78. package/dist/browser/index.js.map +1 -1
  79. package/dist/browser/msal/{msal.d.ts → msal-browser.d.mts} +1 -1
  80. package/dist/browser/msal/msal-browser.d.mts.map +1 -0
  81. package/dist/browser/msal/{msal.js → msal-browser.mjs} +1 -1
  82. package/dist/browser/msal/msal-browser.mjs.map +1 -0
  83. package/dist/browser/msal/utils.d.ts +2 -2
  84. package/dist/browser/msal/utils.d.ts.map +1 -1
  85. package/dist/browser/msal/utils.js +7 -2
  86. package/dist/browser/msal/utils.js.map +1 -1
  87. package/dist/browser/plugins/{consumer.d.ts → consumer-browser.d.mts} +1 -1
  88. package/dist/browser/plugins/consumer-browser.d.mts.map +1 -0
  89. package/dist/browser/plugins/{consumer.js → consumer-browser.mjs} +1 -1
  90. package/dist/browser/plugins/consumer-browser.mjs.map +1 -0
  91. package/dist/browser/util/{processMultiTenantRequest.d.ts → processMultiTenantRequest-browser.d.mts} +1 -1
  92. package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +1 -0
  93. package/dist/browser/util/{processMultiTenantRequest.js → processMultiTenantRequest-browser.mjs} +1 -1
  94. package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +1 -0
  95. package/dist/browser/util/tenantIdUtils.d.ts +1 -1
  96. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -1
  97. package/dist/browser/util/tenantIdUtils.js +1 -1
  98. package/dist/browser/util/tenantIdUtils.js.map +1 -1
  99. package/dist/commonjs/client/identityClient.d.ts.map +1 -1
  100. package/dist/commonjs/client/identityClient.js +2 -1
  101. package/dist/commonjs/client/identityClient.js.map +2 -2
  102. package/dist/commonjs/constants.d.ts +1 -1
  103. package/dist/commonjs/constants.js +1 -1
  104. package/dist/commonjs/constants.js.map +1 -1
  105. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -1
  106. package/dist/commonjs/credentials/azureCliCredential.js +2 -1
  107. package/dist/commonjs/credentials/azureCliCredential.js.map +2 -2
  108. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts +12 -4
  109. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  110. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +38 -12
  111. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +2 -2
  112. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +1 -1
  113. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -1
  114. package/dist/commonjs/credentials/azurePowerShellCredential.js +5 -1
  115. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +2 -2
  116. package/dist/commonjs/credentials/defaultAzureCredential.js.map +1 -1
  117. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  118. package/dist/commonjs/credentials/environmentCredential.js.map +1 -1
  119. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  120. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +1 -1
  121. package/dist/commonjs/index.d.ts.map +1 -1
  122. package/dist/commonjs/index.js.map +2 -2
  123. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  124. package/dist/commonjs/msal/utils.js +6 -1
  125. package/dist/commonjs/msal/utils.js.map +2 -2
  126. package/dist/commonjs/tsdoc-metadata.json +1 -1
  127. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -1
  128. package/dist/commonjs/util/tenantIdUtils.js.map +1 -1
  129. package/dist/esm/client/identityClient.d.ts.map +1 -1
  130. package/dist/esm/client/identityClient.js +2 -1
  131. package/dist/esm/client/identityClient.js.map +1 -1
  132. package/dist/esm/constants.d.ts +1 -1
  133. package/dist/esm/constants.js +1 -1
  134. package/dist/esm/constants.js.map +1 -1
  135. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -1
  136. package/dist/esm/credentials/azureCliCredential.js +2 -1
  137. package/dist/esm/credentials/azureCliCredential.js.map +1 -1
  138. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts +12 -4
  139. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  140. package/dist/esm/credentials/azureDeveloperCliCredential.js +40 -14
  141. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -1
  142. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -1
  143. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -1
  144. package/dist/esm/credentials/azurePowerShellCredential.js +2 -1
  145. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -1
  146. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -1
  147. package/dist/esm/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  148. package/dist/esm/credentials/environmentCredential.js.map +1 -1
  149. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  150. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -1
  151. package/dist/esm/index.d.ts.map +1 -1
  152. package/dist/esm/index.js.map +1 -1
  153. package/dist/esm/msal/utils.d.ts.map +1 -1
  154. package/dist/esm/msal/utils.js +6 -1
  155. package/dist/esm/msal/utils.js.map +1 -1
  156. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -1
  157. package/dist/esm/util/tenantIdUtils.js.map +1 -1
  158. package/dist/workerd/client/identityClient.d.ts.map +1 -1
  159. package/dist/workerd/client/identityClient.js +2 -1
  160. package/dist/workerd/client/identityClient.js.map +1 -1
  161. package/dist/workerd/constants.d.ts +1 -1
  162. package/dist/workerd/constants.js +1 -1
  163. package/dist/workerd/constants.js.map +1 -1
  164. package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -1
  165. package/dist/workerd/credentials/azureCliCredential.js +2 -1
  166. package/dist/workerd/credentials/azureCliCredential.js.map +1 -1
  167. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts +12 -4
  168. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  169. package/dist/workerd/credentials/azureDeveloperCliCredential.js +40 -14
  170. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -1
  171. package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -1
  172. package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -1
  173. package/dist/workerd/credentials/azurePowerShellCredential.js +2 -1
  174. package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -1
  175. package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -1
  176. package/dist/workerd/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  177. package/dist/workerd/credentials/environmentCredential.js.map +1 -1
  178. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  179. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -1
  180. package/dist/workerd/index.d.ts.map +1 -1
  181. package/dist/workerd/index.js.map +1 -1
  182. package/dist/workerd/msal/utils.d.ts.map +1 -1
  183. package/dist/workerd/msal/utils.js +6 -1
  184. package/dist/workerd/msal/utils.js.map +1 -1
  185. package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -1
  186. package/dist/workerd/util/tenantIdUtils.js.map +1 -1
  187. package/package.json +24 -14
  188. package/dist/browser/credentials/authorizationCodeCredential.d.ts.map +0 -1
  189. package/dist/browser/credentials/authorizationCodeCredential.js.map +0 -1
  190. package/dist/browser/credentials/azureCliCredential.d.ts.map +0 -1
  191. package/dist/browser/credentials/azureCliCredential.js.map +0 -1
  192. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts.map +0 -1
  193. package/dist/browser/credentials/azureDeveloperCliCredential.js.map +0 -1
  194. package/dist/browser/credentials/azurePipelinesCredential.d.ts.map +0 -1
  195. package/dist/browser/credentials/azurePipelinesCredential.js.map +0 -1
  196. package/dist/browser/credentials/azurePowerShellCredential.d.ts.map +0 -1
  197. package/dist/browser/credentials/azurePowerShellCredential.js.map +0 -1
  198. package/dist/browser/credentials/brokerCredential.d.ts +0 -35
  199. package/dist/browser/credentials/brokerCredential.d.ts.map +0 -1
  200. package/dist/browser/credentials/brokerCredential.js +0 -68
  201. package/dist/browser/credentials/brokerCredential.js.map +0 -1
  202. package/dist/browser/credentials/clientAssertionCredential.d.ts.map +0 -1
  203. package/dist/browser/credentials/clientAssertionCredential.js.map +0 -1
  204. package/dist/browser/credentials/clientCertificateCredential.d.ts.map +0 -1
  205. package/dist/browser/credentials/clientCertificateCredential.js.map +0 -1
  206. package/dist/browser/credentials/clientSecretCredential.d.ts.map +0 -1
  207. package/dist/browser/credentials/clientSecretCredential.js.map +0 -1
  208. package/dist/browser/credentials/defaultAzureCredential.d.ts.map +0 -1
  209. package/dist/browser/credentials/defaultAzureCredential.js.map +0 -1
  210. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts +0 -64
  211. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts.map +0 -1
  212. package/dist/browser/credentials/defaultAzureCredentialFunctions.js +0 -147
  213. package/dist/browser/credentials/defaultAzureCredentialFunctions.js.map +0 -1
  214. package/dist/browser/credentials/deviceCodeCredential.d.ts.map +0 -1
  215. package/dist/browser/credentials/deviceCodeCredential.js.map +0 -1
  216. package/dist/browser/credentials/environmentCredential.d.ts.map +0 -1
  217. package/dist/browser/credentials/environmentCredential.js.map +0 -1
  218. package/dist/browser/credentials/interactiveBrowserCredential.d.ts.map +0 -1
  219. package/dist/browser/credentials/interactiveBrowserCredential.js.map +0 -1
  220. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +0 -18
  221. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +0 -1
  222. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +0 -97
  223. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  224. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +0 -13
  225. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +0 -1
  226. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -43
  227. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  228. package/dist/browser/credentials/managedIdentityCredential/index.d.ts.map +0 -1
  229. package/dist/browser/credentials/managedIdentityCredential/index.js.map +0 -1
  230. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +0 -24
  231. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +0 -1
  232. package/dist/browser/credentials/managedIdentityCredential/models.js +0 -4
  233. package/dist/browser/credentials/managedIdentityCredential/models.js.map +0 -1
  234. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +0 -14
  235. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +0 -1
  236. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -38
  237. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  238. package/dist/browser/credentials/onBehalfOfCredential.d.ts.map +0 -1
  239. package/dist/browser/credentials/onBehalfOfCredential.js.map +0 -1
  240. package/dist/browser/credentials/usernamePasswordCredential.d.ts.map +0 -1
  241. package/dist/browser/credentials/usernamePasswordCredential.js.map +0 -1
  242. package/dist/browser/credentials/visualStudioCodeCredential.d.ts.map +0 -1
  243. package/dist/browser/credentials/visualStudioCodeCredential.js.map +0 -1
  244. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  245. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  246. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  247. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  248. package/dist/browser/credentials/workloadIdentityCredential.d.ts.map +0 -1
  249. package/dist/browser/credentials/workloadIdentityCredential.js.map +0 -1
  250. package/dist/browser/msal/msal.d.ts.map +0 -1
  251. package/dist/browser/msal/msal.js.map +0 -1
  252. package/dist/browser/msal/nodeFlows/msalClient.d.ts +0 -205
  253. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +0 -1
  254. package/dist/browser/msal/nodeFlows/msalClient.js +0 -499
  255. package/dist/browser/msal/nodeFlows/msalClient.js.map +0 -1
  256. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +0 -109
  257. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +0 -1
  258. package/dist/browser/msal/nodeFlows/msalPlugins.js +0 -160
  259. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +0 -1
  260. package/dist/browser/plugins/consumer.d.ts.map +0 -1
  261. package/dist/browser/plugins/consumer.js.map +0 -1
  262. package/dist/browser/regionalAuthority.d.ts +0 -122
  263. package/dist/browser/regionalAuthority.d.ts.map +0 -1
  264. package/dist/browser/regionalAuthority.js +0 -139
  265. package/dist/browser/regionalAuthority.js.map +0 -1
  266. package/dist/browser/util/certificatesUtils.d.ts +0 -13
  267. package/dist/browser/util/certificatesUtils.d.ts.map +0 -1
  268. package/dist/browser/util/certificatesUtils.js +0 -47
  269. package/dist/browser/util/certificatesUtils.js.map +0 -1
  270. package/dist/browser/util/processMultiTenantRequest.d.ts.map +0 -1
  271. package/dist/browser/util/processMultiTenantRequest.js.map +0 -1
  272. package/dist/browser/util/processUtils.d.ts +0 -13
  273. package/dist/browser/util/processUtils.d.ts.map +0 -1
  274. package/dist/browser/util/processUtils.js +0 -32
  275. package/dist/browser/util/processUtils.js.map +0 -1
  276. package/dist/browser/util/subscriptionUtils.d.ts +0 -6
  277. package/dist/browser/util/subscriptionUtils.d.ts.map +0 -1
  278. package/dist/browser/util/subscriptionUtils.js +0 -16
  279. package/dist/browser/util/subscriptionUtils.js.map +0 -1
  280. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  281. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  282. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +0 -16
  283. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +0 -7
  284. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  285. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  286. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +0 -242
  287. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +0 -7
  288. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  289. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  290. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +0 -16
  291. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +0 -7
  292. package/dist/commonjs/msal/credentials.d.ts +0 -52
  293. package/dist/commonjs/msal/credentials.d.ts.map +0 -1
  294. package/dist/commonjs/msal/credentials.js +0 -16
  295. package/dist/commonjs/msal/credentials.js.map +0 -7
  296. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  297. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  298. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  299. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  300. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  301. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  302. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +0 -260
  303. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  304. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  305. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  306. package/dist/esm/msal/browserFlows/msalBrowserOptions.js +0 -4
  307. package/dist/esm/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  308. package/dist/esm/msal/credentials.d.ts +0 -52
  309. package/dist/esm/msal/credentials.d.ts.map +0 -1
  310. package/dist/esm/msal/credentials.js +0 -4
  311. package/dist/esm/msal/credentials.js.map +0 -1
  312. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  313. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  314. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  315. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  316. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  317. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  318. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +0 -260
  319. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  320. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  321. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  322. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +0 -4
  323. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  324. package/dist/workerd/msal/credentials.d.ts +0 -52
  325. package/dist/workerd/msal/credentials.d.ts.map +0 -1
  326. package/dist/workerd/msal/credentials.js +0 -4
  327. package/dist/workerd/msal/credentials.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"identityClient.d.ts","sourceRoot":"","sources":["../../../src/client/identityClient.ts"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AAC,uBAAuB,CAAkB;IAEjD,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,OAAO,CAAC,EAAE,sBAAsB;IAmCtC,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAmCzE,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAkEhC,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,eAAe;IAe3D,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAgB3C,gBAAgB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM;IAUnD,mBAAmB,CAAC,CAAC,EACzB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAqBxB,oBAAoB,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAsB9B;;;OAGG;IACH,yBAAyB,IAAI,sBAAsB;IAGnD;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,cAAc;IA8BtB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CA2C1B"}
@@ -2,6 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { ServiceClient } from "@azure/core-client";
4
4
  import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
5
+ import { uint8ArrayToString, stringToUint8Array } from "@azure/core-util";
5
6
  import { AuthenticationError, AuthenticationErrorName } from "../errors.js";
6
7
  import { getIdentityTokenEndpointSuffix } from "../util/identityTokenEndpoint.js";
7
8
  import { SDK_VERSION } from "../constants.js";
@@ -242,7 +243,7 @@ export class IdentityClient extends ServiceClient {
242
243
  return;
243
244
  }
244
245
  const base64Metadata = accessToken.split(".")[1];
245
- const { appid, upn, tid, oid } = JSON.parse(Buffer.from(base64Metadata, "base64").toString("utf8"));
246
+ const { appid, upn, tid, oid } = JSON.parse(uint8ArrayToString(stringToUint8Array(base64Metadata, "base64url"), "utf-8"));
246
247
  logger.info(`[Authenticated account] Client ID: ${appid}. Tenant ID: ${tid}. User Principal Name: ${upn || unavailableUpn}. Object ID (user): ${oid}`);
247
248
  }
248
249
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"identityClient.js","sourceRoot":"","sources":["../../../src/client/identityClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAC1C,MAAM,UAAU,GAAG;IACjB,wBAAwB,EAAE,GAAG;IAC7B,sBAAsB,EAAE,GAAG;IAC3B,wBAAwB,EAAE,GAAG;IAC7B,sBAAsB,EAAE,GAAG;CAC5B,CAAC;AAiBF;;;;;;GAMG;AAC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MAAM,IAAI,UAAU,CAAC,sBAAsB,EACpD,CAAC;gBACD,SAAS,GAAG,cAAc,CAAC;gBAC3B,sBAAsB,GAAG,UAAU,CAAC;YACtC,CAAC;iBAAM,IACL,QAAQ,CAAC,MAAM,IAAI,UAAU,CAAC,wBAAwB;gBACtD,QAAQ,CAAC,MAAM,IAAI,UAAU,CAAC,sBAAsB,EACpD,CAAC;gBACD,SAAS,GAAG,cAAc,CAAC;gBAC3B,sBAAsB,GAAG,UAAU,CAAC;YACtC,CAAC;iBAAM,CAAC;gBACN,SAAS,GAAG,eAAe,CAAC;gBAC5B,sBAAsB,GAAG,YAAY,CAAC;YACxC,CAAC;YAED,MAAM,qBAAqB,GAAG;gBAC5B,GAAG,sBAAsB,iBAAiB;gBAC1C,qBAAqB,QAAQ,CAAC,MAAM,EAAE;gBACtC,wBAAwB,QAAQ,CAAC,UAAU,IAAI,SAAS,EAAE;gBAC1D,YAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;aAC/C,CAAC;YACF,UAAU,GAAG;gBACX,KAAK,EAAE,SAAS;gBAChB,iBAAiB,EAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;aACpD,CAAC;QACJ,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { INetworkModule, NetworkRequestOptions, NetworkResponse } from \"@azure/msal-node\";\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport type { PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport { AuthenticationError, AuthenticationErrorName } from \"../errors.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport { logger } from \"../util/logging.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\nimport type { TokenResponseParsedBody } from \"../credentials/managedIdentityCredential/utils.js\";\nimport {\n parseExpirationTimestamp,\n parseRefreshTimestamp,\n} from \"../credentials/managedIdentityCredential/utils.js\";\nimport { getAuthorityHost } from \"../util/authorityHost.js\";\n\nconst noCorrelationId = \"noCorrelationId\";\nconst HttpStatus = {\n CLIENT_ERROR_RANGE_START: 400,\n CLIENT_ERROR_RANGE_END: 499,\n SERVER_ERROR_RANGE_START: 500,\n SERVER_ERROR_RANGE_END: 599,\n};\n\n/**\n * An internal type used to communicate details of a token request's\n * response that should not be sent back as part of the access token.\n */\nexport interface TokenResponse {\n /**\n * The AccessToken to be returned from getToken.\n */\n accessToken: AccessToken;\n /**\n * The refresh token if the 'offline_access' scope was used.\n */\n refreshToken?: string;\n}\n\n/**\n * The network module used by the Identity credentials.\n *\n * It allows for credentials to abort any pending request independently of the MSAL flow,\n * by calling to the `abortRequests()` method.\n *\n */\nexport class IdentityClient extends ServiceClient implements INetworkModule {\n public authorityHost: string;\n private allowLoggingAccountIdentifiers?: boolean;\n private abortControllers: Map<string, AbortController[] | undefined>;\n private allowInsecureConnection: boolean = false;\n // used for WorkloadIdentity\n private tokenCredentialOptions: TokenCredentialOptions;\n\n constructor(options?: TokenCredentialOptions) {\n const packageDetails = `azsdk-js-identity/${SDK_VERSION}`;\n const userAgentPrefix = options?.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const baseUri = getAuthorityHost(options);\n if (!baseUri.startsWith(\"https:\")) {\n throw new Error(\"The authorityHost address must use the 'https' protocol.\");\n }\n\n super({\n requestContentType: \"application/json; charset=utf-8\",\n retryOptions: {\n maxRetries: 3,\n },\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n baseUri,\n });\n\n this.authorityHost = baseUri;\n this.abortControllers = new Map();\n this.allowLoggingAccountIdentifiers = options?.loggingOptions?.allowLoggingAccountIdentifiers;\n // used for WorkloadIdentity\n this.tokenCredentialOptions = { ...options };\n\n // used for ManagedIdentity\n if (options?.allowInsecureConnection) {\n this.allowInsecureConnection = options.allowInsecureConnection;\n }\n }\n\n async sendTokenRequest(request: PipelineRequest): Promise<TokenResponse | null> {\n logger.info(`IdentityClient: sending token request to [${request.url}]`);\n const response = await this.sendRequest(request);\n if (response.bodyAsText && (response.status === 200 || response.status === 201)) {\n const parsedBody: TokenResponseParsedBody = JSON.parse(response.bodyAsText);\n\n if (!parsedBody.access_token) {\n return null;\n }\n\n this.logIdentifiers(response);\n\n const token = {\n accessToken: {\n token: parsedBody.access_token,\n expiresOnTimestamp: parseExpirationTimestamp(parsedBody),\n refreshAfterTimestamp: parseRefreshTimestamp(parsedBody),\n tokenType: \"Bearer\",\n } as AccessToken,\n refreshToken: parsedBody.refresh_token,\n };\n\n logger.info(\n `IdentityClient: [${request.url}] token acquired, expires on ${token.accessToken.expiresOnTimestamp}`,\n );\n return token;\n } else {\n const error = new AuthenticationError(response.status, response.bodyAsText);\n logger.warning(\n `IdentityClient: authentication error. HTTP status: ${response.status}, ${error.errorResponse.errorDescription}`,\n );\n throw error;\n }\n }\n\n async refreshAccessToken(\n tenantId: string,\n clientId: string,\n scopes: string,\n refreshToken: string | undefined,\n clientSecret: string | undefined,\n options: GetTokenOptions = {},\n ): Promise<TokenResponse | null> {\n if (refreshToken === undefined) {\n return null;\n }\n logger.info(\n `IdentityClient: refreshing access token with client ID: ${clientId}, scopes: ${scopes} started`,\n );\n\n const refreshParams = {\n grant_type: \"refresh_token\",\n client_id: clientId,\n refresh_token: refreshToken,\n scope: scopes,\n };\n\n if (clientSecret !== undefined) {\n (refreshParams as any).client_secret = clientSecret;\n }\n\n const query = new URLSearchParams(refreshParams);\n\n return tracingClient.withSpan(\n \"IdentityClient.refreshAccessToken\",\n options,\n async (updatedOptions) => {\n try {\n const urlSuffix = getIdentityTokenEndpointSuffix(tenantId);\n const request = createPipelineRequest({\n url: `${this.authorityHost}/${tenantId}/${urlSuffix}`,\n method: \"POST\",\n body: query.toString(),\n abortSignal: options.abortSignal,\n headers: createHttpHeaders({\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n }),\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n const response = await this.sendTokenRequest(request);\n logger.info(`IdentityClient: refreshed token for client ID: ${clientId}`);\n return response;\n } catch (err: any) {\n if (\n err.name === AuthenticationErrorName &&\n err.errorResponse.error === \"interaction_required\"\n ) {\n // It's likely that the refresh token has expired, so\n // return null so that the credential implementation will\n // initiate the authentication flow again.\n logger.info(`IdentityClient: interaction required for client ID: ${clientId}`);\n return null;\n } else {\n logger.warning(\n `IdentityClient: failed refreshing token for client ID: ${clientId}: ${err}`,\n );\n throw err;\n }\n }\n },\n );\n }\n\n // Here is a custom layer that allows us to abort requests that go through MSAL,\n // since MSAL doesn't allow us to pass options all the way through.\n\n generateAbortSignal(correlationId: string): AbortSignalLike {\n const controller = new AbortController();\n const controllers = this.abortControllers.get(correlationId) || [];\n controllers.push(controller);\n this.abortControllers.set(correlationId, controllers);\n const existingOnAbort = controller.signal.onabort;\n controller.signal.onabort = (...params) => {\n this.abortControllers.set(correlationId, undefined);\n if (existingOnAbort) {\n existingOnAbort.apply(controller.signal, params);\n }\n };\n return controller.signal;\n }\n\n abortRequests(correlationId?: string): void {\n const key = correlationId || noCorrelationId;\n const controllers = [\n ...(this.abortControllers.get(key) || []),\n // MSAL passes no correlation ID to the get requests...\n ...(this.abortControllers.get(noCorrelationId) || []),\n ];\n if (!controllers.length) {\n return;\n }\n for (const controller of controllers) {\n controller.abort();\n }\n this.abortControllers.set(key, undefined);\n }\n\n getCorrelationId(options?: NetworkRequestOptions): string {\n const parameter = options?.body\n ?.split(\"&\")\n .map((part) => part.split(\"=\"))\n .find(([key]) => key === \"client-request-id\");\n return parameter && parameter.length ? parameter[1] || noCorrelationId : noCorrelationId;\n }\n\n // The MSAL network module methods follow\n\n async sendGetRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"GET\",\n body: options?.body,\n allowInsecureConnection: this.allowInsecureConnection,\n headers: createHttpHeaders(options?.headers),\n abortSignal: this.generateAbortSignal(noCorrelationId),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n async sendPostRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"POST\",\n body: options?.body,\n headers: createHttpHeaders(options?.headers),\n allowInsecureConnection: this.allowInsecureConnection,\n // MSAL doesn't send the correlation ID on the get requests.\n abortSignal: this.generateAbortSignal(this.getCorrelationId(options)),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n /**\n *\n * @internal\n */\n getTokenCredentialOptions(): TokenCredentialOptions {\n return this.tokenCredentialOptions;\n }\n /**\n * If allowLoggingAccountIdentifiers was set on the constructor options\n * we try to log the account identifiers by parsing the received access token.\n *\n * The account identifiers we try to log are:\n * - `appid`: The application or Client Identifier.\n * - `upn`: User Principal Name.\n * - It might not be available in some authentication scenarios.\n * - If it's not available, we put a placeholder: \"No User Principal Name available\".\n * - `tid`: Tenant Identifier.\n * - `oid`: Object Identifier of the authenticated user.\n */\n private logIdentifiers(response: PipelineResponse): void {\n if (!this.allowLoggingAccountIdentifiers || !response.bodyAsText) {\n return;\n }\n const unavailableUpn = \"No User Principal Name available\";\n try {\n const parsed = (response as any).parsedBody || JSON.parse(response.bodyAsText);\n const accessToken = parsed.access_token;\n if (!accessToken) {\n // Without an access token allowLoggingAccountIdentifiers isn't useful.\n return;\n }\n const base64Metadata = accessToken.split(\".\")[1];\n const { appid, upn, tid, oid } = JSON.parse(\n Buffer.from(base64Metadata, \"base64\").toString(\"utf8\"),\n );\n\n logger.info(\n `[Authenticated account] Client ID: ${appid}. Tenant ID: ${tid}. User Principal Name: ${\n upn || unavailableUpn\n }. Object ID (user): ${oid}`,\n );\n } catch (e: any) {\n logger.warning(\n \"allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:\",\n e.message,\n );\n }\n }\n\n /**\n * Parses the response body if possible. Add error properties if parsing fails.\n * This follows MSAL INetworkModule behavior so the response is in expected format.\n */\n private parseResponseBody(response: PipelineResponse) {\n let parsedBody: {};\n try {\n parsedBody = JSON.parse(response.bodyAsText || \"\");\n } catch (error) {\n logger.info(`IdentityClient: Could not parse response body: ${error}`);\n let errorType;\n let errorDescriptionHelper;\n /**\n * Determine error type based on status code ranges following MSAL patterns:\n * Client error responses (400 – 499)\n * Server error responses (500 – 599)\n */\n if (\n response.status >= HttpStatus.CLIENT_ERROR_RANGE_START &&\n response.status <= HttpStatus.CLIENT_ERROR_RANGE_END\n ) {\n errorType = \"client_error\";\n errorDescriptionHelper = \"A client\";\n } else if (\n response.status >= HttpStatus.SERVER_ERROR_RANGE_START &&\n response.status <= HttpStatus.SERVER_ERROR_RANGE_END\n ) {\n errorType = \"server_error\";\n errorDescriptionHelper = \"A server\";\n } else {\n errorType = \"unknown_error\";\n errorDescriptionHelper = \"An unknown\";\n }\n\n const errorDescriptionLines = [\n `${errorDescriptionHelper} error occured.`,\n `Http status code: ${response.status}`,\n `Http status message: ${response.bodyAsText || \"Unknown\"}`,\n `Headers: ${JSON.stringify(response.headers)}`,\n ];\n parsedBody = {\n error: errorType,\n error_description: errorDescriptionLines.join(\"\\n\"),\n };\n }\n return parsedBody;\n }\n}\n"]}
1
+ {"version":3,"file":"identityClient.js","sourceRoot":"","sources":["../../../src/client/identityClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAA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GAAG,sBAAsB,iBAAiB;gBAC1C,qBAAqB,QAAQ,CAAC,MAAM,EAAE;gBACtC,wBAAwB,QAAQ,CAAC,UAAU,IAAI,SAAS,EAAE;gBAC1D,YAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;aAC/C,CAAC;YACF,UAAU,GAAG;gBACX,KAAK,EAAE,SAAS;gBAChB,iBAAiB,EAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;aACpD,CAAC;QACJ,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { INetworkModule, NetworkRequestOptions, NetworkResponse } from \"@azure/msal-node\";\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport type { PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport { uint8ArrayToString, stringToUint8Array } from \"@azure/core-util\";\nimport { AuthenticationError, AuthenticationErrorName } from \"../errors.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport { logger } from \"../util/logging.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\nimport type { TokenResponseParsedBody } from \"../credentials/managedIdentityCredential/utils.js\";\nimport {\n parseExpirationTimestamp,\n parseRefreshTimestamp,\n} from \"../credentials/managedIdentityCredential/utils.js\";\nimport { getAuthorityHost } from \"../util/authorityHost.js\";\n\nconst noCorrelationId = \"noCorrelationId\";\nconst HttpStatus = {\n CLIENT_ERROR_RANGE_START: 400,\n CLIENT_ERROR_RANGE_END: 499,\n SERVER_ERROR_RANGE_START: 500,\n SERVER_ERROR_RANGE_END: 599,\n};\n\n/**\n * An internal type used to communicate details of a token request's\n * response that should not be sent back as part of the access token.\n */\nexport interface TokenResponse {\n /**\n * The AccessToken to be returned from getToken.\n */\n accessToken: AccessToken;\n /**\n * The refresh token if the 'offline_access' scope was used.\n */\n refreshToken?: string;\n}\n\n/**\n * The network module used by the Identity credentials.\n *\n * It allows for credentials to abort any pending request independently of the MSAL flow,\n * by calling to the `abortRequests()` method.\n *\n */\nexport class IdentityClient extends ServiceClient implements INetworkModule {\n public authorityHost: string;\n private allowLoggingAccountIdentifiers?: boolean;\n private abortControllers: Map<string, AbortController[] | undefined>;\n private allowInsecureConnection: boolean = false;\n // used for WorkloadIdentity\n private tokenCredentialOptions: TokenCredentialOptions;\n\n constructor(options?: TokenCredentialOptions) {\n const packageDetails = `azsdk-js-identity/${SDK_VERSION}`;\n const userAgentPrefix = options?.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const baseUri = getAuthorityHost(options);\n if (!baseUri.startsWith(\"https:\")) {\n throw new Error(\"The authorityHost address must use the 'https' protocol.\");\n }\n\n super({\n requestContentType: \"application/json; charset=utf-8\",\n retryOptions: {\n maxRetries: 3,\n },\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n baseUri,\n });\n\n this.authorityHost = baseUri;\n this.abortControllers = new Map();\n this.allowLoggingAccountIdentifiers = options?.loggingOptions?.allowLoggingAccountIdentifiers;\n // used for WorkloadIdentity\n this.tokenCredentialOptions = { ...options };\n\n // used for ManagedIdentity\n if (options?.allowInsecureConnection) {\n this.allowInsecureConnection = options.allowInsecureConnection;\n }\n }\n\n async sendTokenRequest(request: PipelineRequest): Promise<TokenResponse | null> {\n logger.info(`IdentityClient: sending token request to [${request.url}]`);\n const response = await this.sendRequest(request);\n if (response.bodyAsText && (response.status === 200 || response.status === 201)) {\n const parsedBody: TokenResponseParsedBody = JSON.parse(response.bodyAsText);\n\n if (!parsedBody.access_token) {\n return null;\n }\n\n this.logIdentifiers(response);\n\n const token = {\n accessToken: {\n token: parsedBody.access_token,\n expiresOnTimestamp: parseExpirationTimestamp(parsedBody),\n refreshAfterTimestamp: parseRefreshTimestamp(parsedBody),\n tokenType: \"Bearer\",\n } as AccessToken,\n refreshToken: parsedBody.refresh_token,\n };\n\n logger.info(\n `IdentityClient: [${request.url}] token acquired, expires on ${token.accessToken.expiresOnTimestamp}`,\n );\n return token;\n } else {\n const error = new AuthenticationError(response.status, response.bodyAsText);\n logger.warning(\n `IdentityClient: authentication error. HTTP status: ${response.status}, ${error.errorResponse.errorDescription}`,\n );\n throw error;\n }\n }\n\n async refreshAccessToken(\n tenantId: string,\n clientId: string,\n scopes: string,\n refreshToken: string | undefined,\n clientSecret: string | undefined,\n options: GetTokenOptions = {},\n ): Promise<TokenResponse | null> {\n if (refreshToken === undefined) {\n return null;\n }\n logger.info(\n `IdentityClient: refreshing access token with client ID: ${clientId}, scopes: ${scopes} started`,\n );\n\n const refreshParams = {\n grant_type: \"refresh_token\",\n client_id: clientId,\n refresh_token: refreshToken,\n scope: scopes,\n };\n\n if (clientSecret !== undefined) {\n (refreshParams as any).client_secret = clientSecret;\n }\n\n const query = new URLSearchParams(refreshParams);\n\n return tracingClient.withSpan(\n \"IdentityClient.refreshAccessToken\",\n options,\n async (updatedOptions) => {\n try {\n const urlSuffix = getIdentityTokenEndpointSuffix(tenantId);\n const request = createPipelineRequest({\n url: `${this.authorityHost}/${tenantId}/${urlSuffix}`,\n method: \"POST\",\n body: query.toString(),\n abortSignal: options.abortSignal,\n headers: createHttpHeaders({\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n }),\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n const response = await this.sendTokenRequest(request);\n logger.info(`IdentityClient: refreshed token for client ID: ${clientId}`);\n return response;\n } catch (err: any) {\n if (\n err.name === AuthenticationErrorName &&\n err.errorResponse.error === \"interaction_required\"\n ) {\n // It's likely that the refresh token has expired, so\n // return null so that the credential implementation will\n // initiate the authentication flow again.\n logger.info(`IdentityClient: interaction required for client ID: ${clientId}`);\n return null;\n } else {\n logger.warning(\n `IdentityClient: failed refreshing token for client ID: ${clientId}: ${err}`,\n );\n throw err;\n }\n }\n },\n );\n }\n\n // Here is a custom layer that allows us to abort requests that go through MSAL,\n // since MSAL doesn't allow us to pass options all the way through.\n\n generateAbortSignal(correlationId: string): AbortSignalLike {\n const controller = new AbortController();\n const controllers = this.abortControllers.get(correlationId) || [];\n controllers.push(controller);\n this.abortControllers.set(correlationId, controllers);\n const existingOnAbort = controller.signal.onabort;\n controller.signal.onabort = (...params) => {\n this.abortControllers.set(correlationId, undefined);\n if (existingOnAbort) {\n existingOnAbort.apply(controller.signal, params);\n }\n };\n return controller.signal;\n }\n\n abortRequests(correlationId?: string): void {\n const key = correlationId || noCorrelationId;\n const controllers = [\n ...(this.abortControllers.get(key) || []),\n // MSAL passes no correlation ID to the get requests...\n ...(this.abortControllers.get(noCorrelationId) || []),\n ];\n if (!controllers.length) {\n return;\n }\n for (const controller of controllers) {\n controller.abort();\n }\n this.abortControllers.set(key, undefined);\n }\n\n getCorrelationId(options?: NetworkRequestOptions): string {\n const parameter = options?.body\n ?.split(\"&\")\n .map((part) => part.split(\"=\"))\n .find(([key]) => key === \"client-request-id\");\n return parameter && parameter.length ? parameter[1] || noCorrelationId : noCorrelationId;\n }\n\n // The MSAL network module methods follow\n\n async sendGetRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"GET\",\n body: options?.body,\n allowInsecureConnection: this.allowInsecureConnection,\n headers: createHttpHeaders(options?.headers),\n abortSignal: this.generateAbortSignal(noCorrelationId),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n async sendPostRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"POST\",\n body: options?.body,\n headers: createHttpHeaders(options?.headers),\n allowInsecureConnection: this.allowInsecureConnection,\n // MSAL doesn't send the correlation ID on the get requests.\n abortSignal: this.generateAbortSignal(this.getCorrelationId(options)),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n /**\n *\n * @internal\n */\n getTokenCredentialOptions(): TokenCredentialOptions {\n return this.tokenCredentialOptions;\n }\n /**\n * If allowLoggingAccountIdentifiers was set on the constructor options\n * we try to log the account identifiers by parsing the received access token.\n *\n * The account identifiers we try to log are:\n * - `appid`: The application or Client Identifier.\n * - `upn`: User Principal Name.\n * - It might not be available in some authentication scenarios.\n * - If it's not available, we put a placeholder: \"No User Principal Name available\".\n * - `tid`: Tenant Identifier.\n * - `oid`: Object Identifier of the authenticated user.\n */\n private logIdentifiers(response: PipelineResponse): void {\n if (!this.allowLoggingAccountIdentifiers || !response.bodyAsText) {\n return;\n }\n const unavailableUpn = \"No User Principal Name available\";\n try {\n const parsed = (response as any).parsedBody || JSON.parse(response.bodyAsText);\n const accessToken = parsed.access_token;\n if (!accessToken) {\n // Without an access token allowLoggingAccountIdentifiers isn't useful.\n return;\n }\n const base64Metadata = accessToken.split(\".\")[1];\n const { appid, upn, tid, oid } = JSON.parse(\n uint8ArrayToString(stringToUint8Array(base64Metadata, \"base64url\"), \"utf-8\"),\n );\n\n logger.info(\n `[Authenticated account] Client ID: ${appid}. Tenant ID: ${tid}. User Principal Name: ${\n upn || unavailableUpn\n }. Object ID (user): ${oid}`,\n );\n } catch (e: any) {\n logger.warning(\n \"allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:\",\n e.message,\n );\n }\n }\n\n /**\n * Parses the response body if possible. Add error properties if parsing fails.\n * This follows MSAL INetworkModule behavior so the response is in expected format.\n */\n private parseResponseBody(response: PipelineResponse) {\n let parsedBody: {};\n try {\n parsedBody = JSON.parse(response.bodyAsText || \"\");\n } catch (error) {\n logger.info(`IdentityClient: Could not parse response body: ${error}`);\n let errorType;\n let errorDescriptionHelper;\n /**\n * Determine error type based on status code ranges following MSAL patterns:\n * Client error responses (400 – 499)\n * Server error responses (500 – 599)\n */\n if (\n response.status >= HttpStatus.CLIENT_ERROR_RANGE_START &&\n response.status <= HttpStatus.CLIENT_ERROR_RANGE_END\n ) {\n errorType = \"client_error\";\n errorDescriptionHelper = \"A client\";\n } else if (\n response.status >= HttpStatus.SERVER_ERROR_RANGE_START &&\n response.status <= HttpStatus.SERVER_ERROR_RANGE_END\n ) {\n errorType = \"server_error\";\n errorDescriptionHelper = \"A server\";\n } else {\n errorType = \"unknown_error\";\n errorDescriptionHelper = \"An unknown\";\n }\n\n const errorDescriptionLines = [\n `${errorDescriptionHelper} error occured.`,\n `Http status code: ${response.status}`,\n `Http status message: ${response.bodyAsText || \"Unknown\"}`,\n `Headers: ${JSON.stringify(response.headers)}`,\n ];\n parsedBody = {\n error: errorType,\n error_description: errorDescriptionLines.join(\"\\n\"),\n };\n }\n return parsedBody;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Current version of the `@azure/identity` package.
3
3
  */
4
- export declare const SDK_VERSION = "4.14.0-beta.3";
4
+ export declare const SDK_VERSION = "4.14.0-beta.4";
5
5
  /**
6
6
  * The default client ID for authentication
7
7
  * @internal
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Current version of the `@azure/identity` package.
5
5
  */
6
- export const SDK_VERSION = `4.14.0-beta.3`;
6
+ export const SDK_VERSION = `4.14.0-beta.4`;
7
7
  /**
8
8
  * The default client ID for authentication
9
9
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.14.0-beta.3`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.14.0-beta.4`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
@@ -8,4 +8,4 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
8
8
  constructor(tenantId: string | "common", clientId: string, authorizationCode: string, redirectUri: string, options?: AuthorizationCodeCredentialOptions);
9
9
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
10
10
  }
11
- //# sourceMappingURL=authorizationCodeCredential.d.ts.map
11
+ //# sourceMappingURL=authorizationCodeCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorizationCodeCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/authorizationCodeCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAOlG,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBAED,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAC3B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kCAAkC;gBAG5C,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAC3B,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kCAAkC;IAOvC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -13,4 +13,4 @@ export class AuthorizationCodeCredential {
13
13
  throw BrowserNotSupportedError;
14
14
  }
15
15
  }
16
- //# sourceMappingURL=authorizationCodeCredential.js.map
16
+ //# sourceMappingURL=authorizationCodeCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorizationCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/authorizationCodeCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,kIAAkI,CACnI,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D,MAAM,OAAO,2BAA2B;IAmBtC;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\nimport type { AuthorizationCodeCredentialOptions } from \"./authorizationCodeCredentialOptions.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AuthorizationCodeCredential is not supported in the browser. InteractiveBrowserCredential is more appropriate for this use case.\",\n);\nconst logger = credentialLogger(\"AuthorizationCodeCredential\");\n\nexport class AuthorizationCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n tenantId: string | \"common\",\n clientId: string,\n clientSecret: string,\n authorizationCode: string,\n redirectUri: string,\n options?: AuthorizationCodeCredentialOptions,\n );\n constructor(\n tenantId: string | \"common\",\n clientId: string,\n authorizationCode: string,\n redirectUri: string,\n options?: AuthorizationCodeCredentialOptions,\n );\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -11,4 +11,4 @@ export declare class AzureCliCredential implements TokenCredential {
11
11
  constructor(_options?: AzureCliCredentialOptions);
12
12
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
13
  }
14
- //# sourceMappingURL=azureCliCredential.d.ts.map
14
+ //# sourceMappingURL=azureCliCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureCliCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azureCliCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAMhF;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD;;OAEG;gBACS,QAAQ,CAAC,EAAE,yBAAyB;IAKhD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -20,4 +20,4 @@ export class AzureCliCredential {
20
20
  throw BrowserNotSupportedError;
21
21
  }
22
22
  }
23
- //# sourceMappingURL=azureCliCredential.js.map
23
+ //# sourceMappingURL=azureCliCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureCliCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azureCliCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAClG,MAAM,MAAM,GAAG,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACH,YAAY,QAAoC;QAC9C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzureCliCredentialOptions } from \"./azureCliCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\"AzureCliCredential is not supported in the browser.\");\nconst logger = credentialLogger(\"AzureCliCredential\");\n\n/**\n * This credential will use the currently logged-in user login information\n * via the Azure CLI ('az') commandline tool.\n */\nexport class AzureCliCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: AzureCliCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -11,4 +11,4 @@ export declare class AzureDeveloperCliCredential implements TokenCredential {
11
11
  constructor(_options?: AzureDeveloperCliCredentialOptions);
12
12
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
13
  }
14
- //# sourceMappingURL=azureDeveloperCliCredential.d.ts.map
14
+ //# sourceMappingURL=azureDeveloperCliCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureDeveloperCliCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAQlG;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBACS,QAAQ,CAAC,EAAE,kCAAkC;IAKzD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -20,4 +20,4 @@ export class AzureDeveloperCliCredential {
20
20
  throw BrowserNotSupportedError;
21
21
  }
22
22
  }
23
- //# sourceMappingURL=azureDeveloperCliCredential.js.map
23
+ //# sourceMappingURL=azureDeveloperCliCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureDeveloperCliCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,8DAA8D,CAC/D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACtC;;OAEG;IACH,YAAY,QAA6C;QACvD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzureDeveloperCliCredentialOptions } from \"./azureDeveloperCliCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AzureDeveloperCliCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzureDeveloperCliCredential\");\n\n/**\n * This credential will use the currently logged-in user login information\n * via the Azure Developer CLI ('azd') commandline tool.\n */\nexport class AzureDeveloperCliCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: AzureDeveloperCliCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -11,4 +11,4 @@ export declare class AzurePipelinesCredential implements TokenCredential {
11
11
  constructor(_tenantId: string, _clientId: string, _serviceConnectionId: string, _systemAccessToken: string, _options?: AzurePipelinesCredentialOptions);
12
12
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
13
  }
14
- //# sourceMappingURL=azurePipelinesCredential.d.ts.map
14
+ //# sourceMappingURL=azurePipelinesCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azurePipelinesCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAQ5F;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,eAAe;IAC9D;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,CAAC,EAAE,+BAA+B;IAMrC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -20,4 +20,4 @@ export class AzurePipelinesCredential {
20
20
  throw BrowserNotSupportedError;
21
21
  }
22
22
  }
23
- //# sourceMappingURL=azurePipelinesCredential.js.map
23
+ //# sourceMappingURL=azurePipelinesCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azurePipelinesCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,2DAA2D,CAC5D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IACnC;;OAEG;IACH,YACE,SAAiB,EACjB,SAAiB,EACjB,oBAA4B,EAC5B,kBAA0B,EAC1B,QAA0C;QAE1C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzurePipelinesCredentialOptions } from \"./azurePipelinesCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AzurePipelinesCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzurePipelinesCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration.\n */\nexport class AzurePipelinesCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n _tenantId: string,\n _clientId: string,\n _serviceConnectionId: string,\n _systemAccessToken: string,\n _options?: AzurePipelinesCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -10,4 +10,4 @@ export declare class AzurePowerShellCredential implements TokenCredential {
10
10
  constructor(_options?: AzurePowerShellCredentialOptions);
11
11
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
12
12
  }
13
- //# sourceMappingURL=azurePowerShellCredential.d.ts.map
13
+ //# sourceMappingURL=azurePowerShellCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azurePowerShellCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAQ9F;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D;;OAEG;gBACS,QAAQ,CAAC,EAAE,gCAAgC;IAKvD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -19,4 +19,4 @@ export class AzurePowerShellCredential {
19
19
  throw BrowserNotSupportedError;
20
20
  }
21
21
  }
22
- //# sourceMappingURL=azurePowerShellCredential.js.map
22
+ //# sourceMappingURL=azurePowerShellCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azurePowerShellCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACpC;;OAEG;IACH,YAAY,QAA2C;QACrD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzurePowerShellCredentialOptions } from \"./azurePowerShellCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AzurePowerShellCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzurePowerShellCredential\");\n\n/**\n * This credential will use the currently-logged-in user's login information via the Azure Power Shell command line tool.\n */\nexport class AzurePowerShellCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: AzurePowerShellCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -10,4 +10,4 @@ export declare class ClientAssertionCredential implements TokenCredential {
10
10
  constructor(_tenantId: string, _clientId: string, _getAssertion: () => Promise<string>, _options?: ClientAssertionCredentialOptions);
11
11
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
12
12
  }
13
- //# sourceMappingURL=clientAssertionCredential.d.ts.map
13
+ //# sourceMappingURL=clientAssertionCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientAssertionCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientAssertionCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAQ9F;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACpC,QAAQ,CAAC,EAAE,gCAAgC;IAMtC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -19,4 +19,4 @@ export class ClientAssertionCredential {
19
19
  throw BrowserNotSupportedError;
20
20
  }
21
21
  }
22
- //# sourceMappingURL=clientAssertionCredential.js.map
22
+ //# sourceMappingURL=clientAssertionCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientAssertionCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientAssertionCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACpC;;OAEG;IACH,YACE,SAAiB,EACjB,SAAiB,EACjB,aAAoC,EACpC,QAA2C;QAE3C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { ClientAssertionCredentialOptions } from \"./clientAssertionCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"ClientAssertionCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ClientAssertionCredential\");\n\n/**\n * Authenticates a service principal with a JWT assertion.\n */\nexport class ClientAssertionCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n _tenantId: string,\n _clientId: string,\n _getAssertion: () => Promise<string>,\n _options?: ClientAssertionCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -12,4 +12,4 @@ export declare class ClientCertificateCredential implements TokenCredential {
12
12
  constructor(_tenantId: string, _clientId: string, _certificatePathOrConfiguration: string | ClientCertificateCredentialPEMConfiguration, _options?: ClientCertificateCredentialOptions);
13
13
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
14
14
  }
15
- //# sourceMappingURL=clientCertificateCredential.d.ts.map
15
+ //# sourceMappingURL=clientCertificateCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientCertificateCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,wCAAwC,CAAC;AAQ1G;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,+BAA+B,EAAE,MAAM,GAAG,2CAA2C,EACrF,QAAQ,CAAC,EAAE,kCAAkC;IAMxC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -20,4 +20,4 @@ export class ClientCertificateCredential {
20
20
  throw BrowserNotSupportedError;
21
21
  }
22
22
  }
23
- //# sourceMappingURL=clientCertificateCredential.js.map
23
+ //# sourceMappingURL=clientCertificateCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientCertificateCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,8DAA8D,CAC/D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACtC;;OAEG;IACH,YACE,SAAiB,EACjB,SAAiB,EACjB,+BAAqF,EACrF,QAA6C;QAE7C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { ClientCertificateCredentialOptions } from \"./clientCertificateCredentialOptions.js\";\nimport type { ClientCertificateCredentialPEMConfiguration } from \"./clientCertificateCredentialModels.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"ClientCertificateCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ClientCertificateCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration.\n */\nexport class ClientCertificateCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n _tenantId: string,\n _clientId: string,\n _certificatePathOrConfiguration: string | ClientCertificateCredentialPEMConfiguration,\n _options?: ClientCertificateCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -37,4 +37,4 @@ export declare class ClientSecretCredential implements TokenCredential {
37
37
  */
38
38
  getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>;
39
39
  }
40
- //# sourceMappingURL=clientSecretCredential.d.ts.map
40
+ //# sourceMappingURL=clientSecretCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientSecretCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientSecretCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAOtF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAWxF;;;;;;;GAOG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC5D,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,4BAA4B,CAAW;IAC/C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAE7B;;;;;;;;;OASG;gBAED,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,6BAA6B;IAWzC;;;;;;;;;OASG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CA2C/B"}
@@ -85,4 +85,4 @@ export class ClientSecretCredential {
85
85
  });
86
86
  }
87
87
  }
88
- //# sourceMappingURL=clientSecretCredential.js.map
88
+ //# sourceMappingURL=clientSecretCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientSecretCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientSecretCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClF,O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ptions, TokenCredential } from \"@azure/core-auth\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { credentialLogger, formatError, formatSuccess } from \"../util/logging.js\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils.js\";\nimport type { ClientSecretCredentialOptions } from \"./clientSecretCredentialOptions.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { tracingClient } from \"../util/tracing.js\";\n\nconst logger = credentialLogger(\"ClientSecretCredential\");\n\n// This credential is exported on browser bundles for development purposes.\n// For this credential to work in browsers, browsers would need to have security features disabled.\n// Please do not disable your browser security features.\n\n/**\n * Enables authentication to Microsoft Entra ID using a client secret\n * that was generated for an App Registration. More information on how\n * to configure a client secret can be found here:\n *\n * https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application\n *\n */\nexport class ClientSecretCredential implements TokenCredential {\n private identityClient: IdentityClient;\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private clientId: string;\n private clientSecret: string;\n\n /**\n * Creates an instance of the ClientSecretCredential with the details\n * needed to authenticate against Microsoft Entra ID with a client\n * secret.\n *\n * @param tenantId - The Microsoft Entra tenant (directory) ID.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param clientSecret - A client secret that was generated for the App Registration.\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n tenantId: string,\n clientId: string,\n clientSecret: string,\n options?: ClientSecretCredentialOptions,\n ) {\n this.identityClient = new IdentityClient(options);\n this.tenantId = tenantId;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n this.clientId = clientId;\n this.clientSecret = clientSecret;\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if\n * successful. If authentication cannot be performed at this time, this method may\n * return null. If an error occurs during authentication, an {@link AuthenticationError}\n * containing failure details will be thrown.\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 | null> {\n return tracingClient.withSpan(\n `${this.constructor.name}.getToken`,\n options,\n async (newOptions) => {\n const tenantId = processMultiTenantRequest(\n this.tenantId,\n newOptions,\n this.additionallyAllowedTenantIds,\n );\n\n const query = new URLSearchParams({\n response_type: \"token\",\n grant_type: \"client_credentials\",\n client_id: this.clientId,\n client_secret: this.clientSecret,\n scope: typeof scopes === \"string\" ? scopes : scopes.join(\" \"),\n });\n\n try {\n const urlSuffix = getIdentityTokenEndpointSuffix(tenantId!);\n const request = createPipelineRequest({\n url: `${this.identityClient.authorityHost}/${tenantId!}/${urlSuffix}`,\n method: \"POST\",\n body: query.toString(),\n headers: createHttpHeaders({\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n }),\n abortSignal: options && options.abortSignal,\n tracingOptions: newOptions?.tracingOptions,\n });\n\n const tokenResponse = await this.identityClient.sendTokenRequest(request);\n logger.getToken.info(formatSuccess(scopes));\n return (tokenResponse && tokenResponse.accessToken) || null;\n } catch (err: any) {\n logger.getToken.info(formatError(scopes, err));\n throw err;\n }\n },\n );\n }\n}\n"]}
@@ -16,4 +16,4 @@ export declare class DefaultAzureCredential extends ChainedTokenCredential {
16
16
  constructor(_tokenCredentialOptions?: TokenCredentialOptions);
17
17
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken>;
18
18
  }
19
- //# sourceMappingURL=defaultAzureCredential.d.ts.map
19
+ //# sourceMappingURL=defaultAzureCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultAzureCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential-browser.mts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAO3E;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;IAChE;;;;OAIG;gBACS,uBAAuB,CAAC,EAAE,sBAAsB;IAMrD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CAI9F"}
@@ -26,4 +26,4 @@ export class DefaultAzureCredential extends ChainedTokenCredential {
26
26
  throw BrowserNotSupportedError;
27
27
  }
28
28
  }
29
- //# sourceMappingURL=defaultAzureCredential.js.map
29
+ //# sourceMappingURL=defaultAzureCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultAzureCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,mGAAmG,CACpG,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,sBAAuB,SAAQ,sBAAsB;IAChE;;;;OAIG;IACH,YAAY,uBAAgD;QAC1D,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QACpE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { credentialLogger, formatError } from \"../util/logging.js\";\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport { ChainedTokenCredential } from \"./chainedTokenCredential.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"DefaultAzureCredential is not supported in the browser. Use InteractiveBrowserCredential instead.\",\n);\nconst logger = credentialLogger(\"DefaultAzureCredential\");\n\n/**\n * Provides a default {@link ChainedTokenCredential} configuration for\n * applications that will be deployed to Azure.\n *\n * Only available in Node.js.\n */\nexport class DefaultAzureCredential extends ChainedTokenCredential {\n /**\n * Creates an instance of the DefaultAzureCredential class.\n *\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(_tokenCredentialOptions?: TokenCredentialOptions) {\n super();\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -11,4 +11,4 @@ export declare class DeviceCodeCredential implements TokenCredential {
11
11
  constructor(_options?: DeviceCodeCredentialOptions);
12
12
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
13
  }
14
- //# sourceMappingURL=deviceCodeCredential.d.ts.map
14
+ //# sourceMappingURL=deviceCodeCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceCodeCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAOpF;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAC1D;;OAEG;gBACS,QAAQ,CAAC,EAAE,2BAA2B;IAK3C,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -20,4 +20,4 @@ export class DeviceCodeCredential {
20
20
  throw BrowserNotSupportedError;
21
21
  }
22
22
  }
23
- //# sourceMappingURL=deviceCodeCredential.js.map
23
+ //# sourceMappingURL=deviceCodeCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;AACpG,MAAM,MAAM,GAAG,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH,YAAY,QAAsC;QAChD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { DeviceCodeCredentialOptions } from \"./deviceCodeCredentialOptions.js\";\n\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\"DeviceCodeCredential is not supported in the browser.\");\nconst logger = credentialLogger(\"DeviceCodeCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a device code\n * that the user can enter into https://microsoft.com/devicelogin.\n */\nexport class DeviceCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: DeviceCodeCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -11,4 +11,4 @@ export declare class EnvironmentCredential implements TokenCredential {
11
11
  constructor(_options?: EnvironmentCredentialOptions);
12
12
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
13
  }
14
- //# sourceMappingURL=environmentCredential.d.ts.map
14
+ //# sourceMappingURL=environmentCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/environmentCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAQtF;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC3D;;OAEG;gBACS,QAAQ,CAAC,EAAE,4BAA4B;IAKnD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -20,4 +20,4 @@ export class EnvironmentCredential {
20
20
  throw BrowserNotSupportedError;
21
21
  }
22
22
  }
23
- //# sourceMappingURL=environmentCredential.js.map
23
+ //# sourceMappingURL=environmentCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/environmentCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,wDAAwD,CACzD,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;AAEzD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAChC;;OAEG;IACH,YAAY,QAAuC;QACjD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { EnvironmentCredentialOptions } from \"./environmentCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"EnvironmentCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"EnvironmentCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using client secret\n * details configured in environment variables\n */\nexport class EnvironmentCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: EnvironmentCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -50,4 +50,4 @@ export declare class InteractiveBrowserCredential implements TokenCredential {
50
50
  */
51
51
  authenticate(scopes: string | string[], options?: GetTokenOptions): Promise<AuthenticationRecord | undefined>;
52
52
  }
53
- //# sourceMappingURL=interactiveBrowserCredential.d.ts.map
53
+ //# sourceMappingURL=interactiveBrowserCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveBrowserCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EACV,4CAA4C,EAC5C,uCAAuC,EACxC,MAAM,0CAA0C,CAAC;AAOlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAS7D;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,eAAe;IAClE,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,4BAA4B,CAAW;IAC/C,OAAO,CAAC,UAAU,CAAoB;IACtC,OAAO,CAAC,8BAA8B,CAAC,CAAU;IAEjD;;;;;;;;;;;;;OAaG;gBAED,OAAO,EAAE,4CAA4C,GAAG,uCAAuC;IA0CjG;;;;;;;;;;;OAWG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;IAqB9F;;;;;;;;;OASG;IACG,YAAY,CAChB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAW7C"}
@@ -96,4 +96,4 @@ export class InteractiveBrowserCredential {
96
96
  });
97
97
  }
98
98
  }
99
- //# sourceMappingURL=interactiveBrowserCredential.js.map
99
+ //# sourceMappingURL=interactiveBrowserCredential-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveBrowserCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,yBAAyB,EACzB,mCAAmC,GACpC,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,MAAM,MAAM,GAAG,gBAAgB,CAAC,8BAA8B,CAAC,CAAC;AAEhE;;;GAGG;AACH,MAAM,OAAO,4BAA4B;IAC/B,QAAQ,CAAU;IAClB,4BAA4B,CAAW;IACvC,UAAU,CAAoB;IAC9B,8BAA8B,CAAW;IAEjD;;;;;;;;;;;;;OAaG;IACH,YACE,OAA+F;QAE/F,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,0FAA0F,CAC3F,CAAC;YACF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;YACpC,MAAM,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,CAAC;QAClC,IAAI,CAAC,4BAA4B,GAAG,mCAAmC,CACrE,OAAO,EAAE,0BA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CAAC;YAE/B,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;YACzC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE;gBAC3C,GAAG,UAAU;gBACb,8BAA8B,EAAE,IAAI,CAAC,8BAA8B;aACpE,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,YAAY,CAChB,MAAyB,EACzB,UAA2B,EAAE;QAE7B,OAAO,aAAa,CAAC,QAAQ,CAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,eAAe,EACvC,OAAO,EACP,KAAK,EAAE,UAAU,EAAE,EAAE;YACnB,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAC9D,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;YACxD,OAAO,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC;QAC5C,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type {\n InteractiveBrowserCredentialInBrowserOptions,\n InteractiveBrowserCredentialNodeOptions,\n} from \"./interactiveBrowserCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils.js\";\n\nimport type { AuthenticationRecord } from \"../msal/types.js\";\nimport type { MsalBrowserFlowOptions } from \"../msal/browserFlows/msalBrowserOptions.js\";\nimport { ensureScopes } from \"../util/scopeUtils.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport type { MsalBrowserClient } from \"../msal/browserFlows/msalBrowserCommon.js\";\nimport { createMsalBrowserClient } from \"../msal/browserFlows/msalBrowserCommon.js\";\n\nconst logger = credentialLogger(\"InteractiveBrowserCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID inside of the web browser\n * using the interactive login flow.\n */\nexport class InteractiveBrowserCredential implements TokenCredential {\n private tenantId?: string;\n private additionallyAllowedTenantIds: string[];\n private msalClient: MsalBrowserClient;\n private disableAutomaticAuthentication?: boolean;\n\n /**\n * Creates an instance of the InteractiveBrowserCredential with the\n * details needed to authenticate against Microsoft Entra ID with\n * a user identity.\n *\n * This credential uses the [Authorization Code Flow](https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow).\n * On Node.js, it will open a browser window while it listens for a redirect response from the authentication service.\n * On browsers, it authenticates via popups. The `loginStyle` optional parameter can be set to `redirect` to authenticate by redirecting the user to an Azure secure login page, which then will redirect the user back to the web application where the authentication started.\n *\n * It's recommended that the Microsoft Entra Applications used are configured to authenticate using Single Page Applications.\n * More information here: [link](https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-app-registration#redirect-uri-msaljs-20-with-auth-code-flow).\n *\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n options: InteractiveBrowserCredentialInBrowserOptions | InteractiveBrowserCredentialNodeOptions,\n ) {\n if (!options?.clientId) {\n const error = new Error(\n \"The parameter `clientId` cannot be left undefined for the `InteractiveBrowserCredential`\",\n );\n logger.info(formatError(\"\", error));\n throw error;\n }\n\n this.tenantId = options?.tenantId;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n\n const browserOptions = options as InteractiveBrowserCredentialInBrowserOptions;\n const loginStyle = browserOptions.loginStyle || \"popup\";\n const loginStyles = [\"redirect\", \"popup\"];\n\n if (loginStyles.indexOf(loginStyle) === -1) {\n const error = new Error(\n `Invalid loginStyle: ${\n browserOptions.loginStyle\n }. Should be any of the following: ${loginStyles.join(\", \")}.`,\n );\n logger.info(formatError(\"\", error));\n throw error;\n }\n\n const msalOptions: MsalBrowserFlowOptions = {\n ...options,\n tokenCredentialOptions: options,\n logger,\n loginStyle: loginStyle,\n redirectUri:\n typeof options.redirectUri === \"function\" ? options.redirectUri() : options.redirectUri,\n };\n\n this.msalClient = createMsalBrowserClient(msalOptions);\n this.disableAutomaticAuthentication = options?.disableAutomaticAuthentication;\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.\n *\n * If the user provided the option `disableAutomaticAuthentication`,\n * once the token can't be retrieved silently,\n * this method won't attempt to request user interaction to retrieve the token.\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 async getToken(scopes: string | string[], options: GetTokenOptions = {}): Promise<AccessToken> {\n return tracingClient.withSpan(\n `${this.constructor.name}.getToken`,\n options,\n async (newOptions) => {\n const tenantId = processMultiTenantRequest(\n this.tenantId,\n newOptions,\n this.additionallyAllowedTenantIds,\n );\n newOptions.tenantId = tenantId;\n\n const arrayScopes = ensureScopes(scopes);\n return this.msalClient.getToken(arrayScopes, {\n ...newOptions,\n disableAutomaticAuthentication: this.disableAutomaticAuthentication,\n });\n },\n );\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.\n *\n * If the token can't be retrieved silently, this method will require user interaction to retrieve the token.\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 async authenticate(\n scopes: string | string[],\n options: GetTokenOptions = {},\n ): Promise<AuthenticationRecord | undefined> {\n return tracingClient.withSpan(\n `${this.constructor.name}.authenticate`,\n options,\n async (newOptions) => {\n const arrayScopes = Array.isArray(scopes) ? scopes : [scopes];\n await this.msalClient.getToken(arrayScopes, newOptions);\n return this.msalClient.getActiveAccount();\n },\n );\n }\n}\n"]}
@@ -8,4 +8,4 @@ export declare class ManagedIdentityCredential implements TokenCredential {
8
8
  constructor(options?: ManagedIdentityCredentialObjectIdOptions);
9
9
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
10
10
  }
11
- //# sourceMappingURL=index.d.ts.map
11
+ //# sourceMappingURL=index-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-browser.d.mts","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/index-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EACV,wCAAwC,EACxC,wCAAwC,EACxC,0CAA0C,EAC3C,MAAM,cAAc,CAAC;AAStB,qBAAa,yBAA0B,YAAW,eAAe;gBACnD,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB;gBAClD,OAAO,CAAC,EAAE,wCAAwC;gBAClD,OAAO,CAAC,EAAE,0CAA0C;gBACpD,OAAO,CAAC,EAAE,wCAAwC;IAajD,QAAQ,CACnB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -13,4 +13,4 @@ export class ManagedIdentityCredential {
13
13
  throw BrowserNotSupportedError;
14
14
  }
15
15
  }
16
- //# sourceMappingURL=index.js.map
16
+ //# sourceMappingURL=index-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-browser.mjs","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/index-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEtE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D,MAAM,OAAO,yBAAyB;IAKpC,YACE,kBAI4C,EAC5C,QAAiC;QAEjC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,QAAQ,CACnB,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { TokenCredentialOptions } from \"../../tokenCredentialOptions.js\";\nimport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n} from \"./options.js\";\n\nimport { credentialLogger, formatError } from \"../../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"ManagedIdentityCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ManagedIdentityCredential\");\n\nexport class ManagedIdentityCredential implements TokenCredential {\n constructor(clientId: string, options?: TokenCredentialOptions);\n constructor(options?: ManagedIdentityCredentialClientIdOptions);\n constructor(options?: ManagedIdentityCredentialResourceIdOptions);\n constructor(options?: ManagedIdentityCredentialObjectIdOptions);\n constructor(\n _clientIdOrOptions?:\n | string\n | ManagedIdentityCredentialClientIdOptions\n | ManagedIdentityCredentialResourceIdOptions\n | ManagedIdentityCredentialObjectIdOptions,\n _options?: TokenCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public async getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -10,4 +10,4 @@ export declare class OnBehalfOfCredential implements TokenCredential {
10
10
  constructor(_options: OnBehalfOfCredentialOptions);
11
11
  getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
12
12
  }
13
- //# sourceMappingURL=onBehalfOfCredential.d.ts.map
13
+ //# sourceMappingURL=onBehalfOfCredential-browser.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onBehalfOfCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/onBehalfOfCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAOpF;;GAEG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAC1D;;OAEG;gBACS,QAAQ,EAAE,2BAA2B;IAK1C,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}