@azure/identity 4.13.1 → 4.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/dist/browser/constants.d.ts +1 -1
  2. package/dist/browser/constants.js +1 -1
  3. package/dist/browser/constants.js.map +1 -1
  4. package/dist/browser/credentials/{authorizationCodeCredential.d.ts → authorizationCodeCredential-browser.d.mts} +2 -2
  5. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -1
  6. package/dist/browser/credentials/{authorizationCodeCredential.js → authorizationCodeCredential-browser.mjs} +1 -1
  7. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -1
  8. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  9. package/dist/browser/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  10. package/dist/browser/credentials/azureCliCredential-browser.d.mts +14 -0
  11. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -1
  12. package/dist/browser/credentials/{azureCliCredential.js → azureCliCredential-browser.mjs} +2 -2
  13. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -1
  14. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts +14 -0
  15. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -1
  16. package/dist/browser/credentials/{azureDeveloperCliCredential.js → azureDeveloperCliCredential-browser.mjs} +2 -2
  17. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -1
  18. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts +14 -0
  19. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -1
  20. package/dist/browser/credentials/{azurePipelinesCredential.js → azurePipelinesCredential-browser.mjs} +2 -2
  21. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -1
  22. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  23. package/dist/browser/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  24. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts +13 -0
  25. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -1
  26. package/dist/browser/credentials/{azurePowerShellCredential.js → azurePowerShellCredential-browser.mjs} +2 -2
  27. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -1
  28. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts +13 -0
  29. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -1
  30. package/dist/browser/credentials/{clientAssertionCredential.js → clientAssertionCredential-browser.mjs} +2 -2
  31. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -1
  32. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  33. package/dist/browser/credentials/clientAssertionCredentialOptions.js.map +1 -1
  34. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts +15 -0
  35. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -1
  36. package/dist/browser/credentials/{clientCertificateCredential.js → clientCertificateCredential-browser.mjs} +2 -2
  37. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -1
  38. package/dist/browser/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  39. package/dist/browser/credentials/clientCertificateCredentialModels.js.map +1 -1
  40. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  41. package/dist/browser/credentials/clientCertificateCredentialOptions.js.map +1 -1
  42. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  43. package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -1
  44. package/dist/browser/credentials/{defaultAzureCredential.d.ts → defaultAzureCredential-browser.d.mts} +2 -2
  45. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -1
  46. package/dist/browser/credentials/{defaultAzureCredential.js → defaultAzureCredential-browser.mjs} +1 -1
  47. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -1
  48. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  49. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -1
  50. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts +14 -0
  51. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -1
  52. package/dist/browser/credentials/{deviceCodeCredential.js → deviceCodeCredential-browser.mjs} +2 -2
  53. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -1
  54. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  55. package/dist/browser/credentials/deviceCodeCredentialOptions.js.map +1 -1
  56. package/dist/browser/credentials/environmentCredential-browser.d.mts +14 -0
  57. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -1
  58. package/dist/browser/credentials/{environmentCredential.js → environmentCredential-browser.mjs} +2 -2
  59. package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -1
  60. package/dist/browser/credentials/environmentCredentialOptions.d.ts.map +1 -1
  61. package/dist/browser/credentials/environmentCredentialOptions.js.map +1 -1
  62. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  63. package/dist/browser/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  64. package/dist/browser/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  65. package/dist/browser/credentials/interactiveCredentialOptions.js.map +1 -1
  66. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts +11 -0
  67. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -1
  68. package/dist/browser/credentials/managedIdentityCredential/{index.js → index-browser.mjs} +2 -2
  69. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -1
  70. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts +13 -0
  71. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -1
  72. package/dist/browser/credentials/{onBehalfOfCredential.js → onBehalfOfCredential-browser.mjs} +2 -2
  73. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -1
  74. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -1
  75. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  76. package/dist/browser/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  77. package/dist/browser/credentials/{visualStudioCodeCredential.d.ts → visualStudioCodeCredential-browser.d.mts} +4 -3
  78. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -1
  79. package/dist/browser/credentials/{visualStudioCodeCredential.js → visualStudioCodeCredential-browser.mjs} +2 -2
  80. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -1
  81. package/dist/browser/credentials/{workloadIdentityCredential.d.ts → workloadIdentityCredential-browser.d.mts} +4 -3
  82. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -1
  83. package/dist/browser/credentials/{workloadIdentityCredential.js → workloadIdentityCredential-browser.mjs} +2 -2
  84. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -1
  85. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  86. package/dist/browser/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  87. package/dist/browser/errors.d.ts.map +1 -1
  88. package/dist/browser/errors.js +1 -4
  89. package/dist/browser/errors.js.map +1 -1
  90. package/dist/browser/index.d.ts +51 -51
  91. package/dist/browser/index.d.ts.map +1 -1
  92. package/dist/browser/index.js +19 -19
  93. package/dist/browser/index.js.map +1 -1
  94. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  95. package/dist/browser/msal/utils.d.ts +1 -1
  96. package/dist/browser/msal/utils.d.ts.map +1 -1
  97. package/dist/browser/msal/utils.js +1 -1
  98. package/dist/browser/msal/utils.js.map +1 -1
  99. package/dist/browser/package.json +6 -1
  100. package/dist/browser/util/tenantIdUtils.d.ts +1 -1
  101. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -1
  102. package/dist/browser/util/tenantIdUtils.js +1 -1
  103. package/dist/browser/util/tenantIdUtils.js.map +1 -1
  104. package/dist/commonjs/client/identityClient.js +263 -252
  105. package/dist/commonjs/client/identityClient.js.map +7 -1
  106. package/dist/commonjs/constants.d.ts +1 -1
  107. package/dist/commonjs/constants.js +61 -78
  108. package/dist/commonjs/constants.js.map +7 -1
  109. package/dist/commonjs/credentials/authorityValidationOptions.js +16 -5
  110. package/dist/commonjs/credentials/authorityValidationOptions.js.map +7 -1
  111. package/dist/commonjs/credentials/authorizationCodeCredential.js +99 -75
  112. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +7 -1
  113. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  114. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +16 -5
  115. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +7 -1
  116. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -1
  117. package/dist/commonjs/credentials/azureCliCredential.js +228 -214
  118. package/dist/commonjs/credentials/azureCliCredential.js.map +7 -1
  119. package/dist/commonjs/credentials/azureCliCredentialOptions.js +16 -5
  120. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +7 -1
  121. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  122. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +192 -202
  123. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +7 -1
  124. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +16 -5
  125. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +7 -1
  126. package/dist/commonjs/credentials/azurePipelinesCredential.d.ts.map +1 -1
  127. package/dist/commonjs/credentials/azurePipelinesCredential.js +178 -134
  128. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +7 -1
  129. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  130. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +16 -5
  131. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +7 -1
  132. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts +10 -0
  133. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -1
  134. package/dist/commonjs/credentials/azurePowerShellCredential.js +231 -208
  135. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +7 -1
  136. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +16 -5
  137. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +7 -1
  138. package/dist/commonjs/credentials/brokerAuthOptions.js +16 -3
  139. package/dist/commonjs/credentials/brokerAuthOptions.js.map +7 -1
  140. package/dist/commonjs/credentials/brokerCredential.d.ts +2 -2
  141. package/dist/commonjs/credentials/brokerCredential.d.ts.map +1 -1
  142. package/dist/commonjs/credentials/brokerCredential.js +104 -71
  143. package/dist/commonjs/credentials/brokerCredential.js.map +7 -1
  144. package/dist/commonjs/credentials/browserCustomizationOptions.js +16 -5
  145. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +7 -1
  146. package/dist/commonjs/credentials/chainedTokenCredential.js +113 -93
  147. package/dist/commonjs/credentials/chainedTokenCredential.js.map +7 -1
  148. package/dist/commonjs/credentials/clientAssertionCredential.js +102 -64
  149. package/dist/commonjs/credentials/clientAssertionCredential.js.map +7 -1
  150. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  151. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +16 -5
  152. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +7 -1
  153. package/dist/commonjs/credentials/clientCertificateCredential.js +139 -134
  154. package/dist/commonjs/credentials/clientCertificateCredential.js.map +7 -1
  155. package/dist/commonjs/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  156. package/dist/commonjs/credentials/clientCertificateCredentialModels.js +16 -5
  157. package/dist/commonjs/credentials/clientCertificateCredentialModels.js.map +7 -1
  158. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  159. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +16 -5
  160. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +7 -1
  161. package/dist/commonjs/credentials/clientSecretCredential.js +97 -68
  162. package/dist/commonjs/credentials/clientSecretCredential.js.map +7 -1
  163. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  164. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +16 -5
  165. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +7 -1
  166. package/dist/commonjs/credentials/credentialPersistenceOptions.js +16 -5
  167. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +7 -1
  168. package/dist/commonjs/credentials/defaultAzureCredential.d.ts.map +1 -1
  169. package/dist/commonjs/credentials/defaultAzureCredential.js +124 -159
  170. package/dist/commonjs/credentials/defaultAzureCredential.js.map +7 -1
  171. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +110 -140
  172. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +7 -1
  173. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  174. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +16 -5
  175. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +7 -1
  176. package/dist/commonjs/credentials/deviceCodeCredential.js +133 -104
  177. package/dist/commonjs/credentials/deviceCodeCredential.js.map +7 -1
  178. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  179. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +16 -5
  180. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +7 -1
  181. package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -1
  182. package/dist/commonjs/credentials/environmentCredential.js +157 -123
  183. package/dist/commonjs/credentials/environmentCredential.js.map +7 -1
  184. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -1
  185. package/dist/commonjs/credentials/environmentCredentialOptions.js +16 -5
  186. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +7 -1
  187. package/dist/commonjs/credentials/interactiveBrowserCredential.js +145 -108
  188. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +7 -1
  189. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  190. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +16 -5
  191. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +7 -1
  192. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  193. package/dist/commonjs/credentials/interactiveCredentialOptions.js +16 -5
  194. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +7 -1
  195. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +92 -91
  196. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +7 -1
  197. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +51 -44
  198. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +7 -1
  199. package/dist/commonjs/credentials/managedIdentityCredential/index.js +256 -242
  200. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +7 -1
  201. package/dist/commonjs/credentials/managedIdentityCredential/models.js +16 -5
  202. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +7 -1
  203. package/dist/commonjs/credentials/managedIdentityCredential/options.js +16 -5
  204. package/dist/commonjs/credentials/managedIdentityCredential/options.js.map +7 -1
  205. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +56 -39
  206. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +7 -1
  207. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +79 -75
  208. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +7 -1
  209. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +16 -5
  210. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +7 -1
  211. package/dist/commonjs/credentials/onBehalfOfCredential.js +169 -127
  212. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +7 -1
  213. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +16 -5
  214. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +7 -1
  215. package/dist/commonjs/credentials/usernamePasswordCredential.js +113 -76
  216. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +7 -1
  217. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  218. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +16 -5
  219. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +7 -1
  220. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  221. package/dist/commonjs/credentials/visualStudioCodeCredential.js +144 -132
  222. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +7 -1
  223. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +16 -5
  224. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +7 -1
  225. package/dist/commonjs/credentials/workloadIdentityCredential.js +123 -109
  226. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +7 -1
  227. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  228. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +16 -5
  229. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +7 -1
  230. package/dist/commonjs/errors.d.ts.map +1 -1
  231. package/dist/commonjs/errors.js +128 -132
  232. package/dist/commonjs/errors.js.map +7 -1
  233. package/dist/commonjs/index.d.ts +33 -33
  234. package/dist/commonjs/index.d.ts.map +1 -1
  235. package/dist/commonjs/index.js +115 -67
  236. package/dist/commonjs/index.js.map +7 -1
  237. package/dist/commonjs/msal/msal.js +38 -9
  238. package/dist/commonjs/msal/msal.js.map +7 -1
  239. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +16 -3
  240. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +7 -1
  241. package/dist/commonjs/msal/nodeFlows/msalClient.js +449 -478
  242. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +7 -1
  243. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  244. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +140 -147
  245. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +7 -1
  246. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +16 -5
  247. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +7 -1
  248. package/dist/commonjs/msal/types.js +16 -5
  249. package/dist/commonjs/msal/types.js.map +7 -1
  250. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  251. package/dist/commonjs/msal/utils.js +179 -224
  252. package/dist/commonjs/msal/utils.js.map +7 -1
  253. package/dist/commonjs/package.json +6 -1
  254. package/dist/commonjs/plugins/consumer.js +32 -40
  255. package/dist/commonjs/plugins/consumer.js.map +7 -1
  256. package/dist/commonjs/plugins/provider.js +16 -5
  257. package/dist/commonjs/plugins/provider.js.map +7 -1
  258. package/dist/commonjs/regionalAuthority.js +93 -141
  259. package/dist/commonjs/regionalAuthority.js.map +7 -1
  260. package/dist/commonjs/tokenCredentialOptions.js +16 -5
  261. package/dist/commonjs/tokenCredentialOptions.js.map +7 -1
  262. package/dist/commonjs/tokenProvider.js +52 -52
  263. package/dist/commonjs/tokenProvider.js.map +7 -1
  264. package/dist/commonjs/tsdoc-metadata.json +1 -1
  265. package/dist/commonjs/util/identityTokenEndpoint.js +32 -12
  266. package/dist/commonjs/util/identityTokenEndpoint.js.map +7 -1
  267. package/dist/commonjs/util/logging.js +91 -97
  268. package/dist/commonjs/util/logging.js.map +7 -1
  269. package/dist/commonjs/util/processMultiTenantRequest.js +43 -33
  270. package/dist/commonjs/util/processMultiTenantRequest.js.map +7 -1
  271. package/dist/commonjs/util/processUtils.d.ts +14 -3
  272. package/dist/commonjs/util/processUtils.d.ts.map +1 -1
  273. package/dist/commonjs/util/processUtils.js +67 -35
  274. package/dist/commonjs/util/processUtils.js.map +7 -1
  275. package/dist/commonjs/util/scopeUtils.js +39 -28
  276. package/dist/commonjs/util/scopeUtils.js.map +7 -1
  277. package/dist/commonjs/util/subscriptionUtils.js +35 -17
  278. package/dist/commonjs/util/subscriptionUtils.js.map +7 -1
  279. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -1
  280. package/dist/commonjs/util/tenantIdUtils.js +61 -45
  281. package/dist/commonjs/util/tenantIdUtils.js.map +7 -1
  282. package/dist/commonjs/util/tracing.js +33 -16
  283. package/dist/commonjs/util/tracing.js.map +7 -1
  284. package/dist/esm/constants.d.ts +1 -1
  285. package/dist/esm/constants.js +1 -1
  286. package/dist/esm/constants.js.map +1 -1
  287. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  288. package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  289. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -1
  290. package/dist/esm/credentials/azureCliCredential.js +21 -24
  291. package/dist/esm/credentials/azureCliCredential.js.map +1 -1
  292. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  293. package/dist/esm/credentials/azureDeveloperCliCredential.js +16 -24
  294. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -1
  295. package/dist/esm/credentials/azurePipelinesCredential.d.ts.map +1 -1
  296. package/dist/esm/credentials/azurePipelinesCredential.js +16 -6
  297. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -1
  298. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  299. package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  300. package/dist/esm/credentials/azurePowerShellCredential.d.ts +10 -0
  301. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -1
  302. package/dist/esm/credentials/azurePowerShellCredential.js +29 -7
  303. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -1
  304. package/dist/esm/credentials/brokerCredential.d.ts +2 -2
  305. package/dist/esm/credentials/brokerCredential.d.ts.map +1 -1
  306. package/dist/esm/credentials/brokerCredential.js.map +1 -1
  307. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  308. package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -1
  309. package/dist/esm/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  310. package/dist/esm/credentials/clientCertificateCredentialModels.js.map +1 -1
  311. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  312. package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -1
  313. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  314. package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -1
  315. package/dist/esm/credentials/defaultAzureCredential.d.ts.map +1 -1
  316. package/dist/esm/credentials/defaultAzureCredential.js +5 -2
  317. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -1
  318. package/dist/esm/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  319. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  320. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -1
  321. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  322. package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -1
  323. package/dist/esm/credentials/environmentCredential.d.ts.map +1 -1
  324. package/dist/esm/credentials/environmentCredential.js.map +1 -1
  325. package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -1
  326. package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -1
  327. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  328. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  329. package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  330. package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -1
  331. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  332. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  333. package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  334. package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  335. package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -1
  336. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -1
  337. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  338. package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  339. package/dist/esm/errors.d.ts.map +1 -1
  340. package/dist/esm/errors.js +1 -4
  341. package/dist/esm/errors.js.map +1 -1
  342. package/dist/esm/index.d.ts +33 -33
  343. package/dist/esm/index.d.ts.map +1 -1
  344. package/dist/esm/index.js.map +1 -1
  345. package/dist/esm/msal/nodeFlows/msalClient.js +1 -1
  346. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -1
  347. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  348. package/dist/esm/msal/nodeFlows/msalPlugins.js.map +1 -1
  349. package/dist/esm/msal/utils.d.ts.map +1 -1
  350. package/dist/esm/msal/utils.js.map +1 -1
  351. package/dist/esm/package.json +6 -1
  352. package/dist/esm/util/processUtils.d.ts +14 -3
  353. package/dist/esm/util/processUtils.d.ts.map +1 -1
  354. package/dist/esm/util/processUtils.js +36 -19
  355. package/dist/esm/util/processUtils.js.map +1 -1
  356. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -1
  357. package/dist/esm/util/tenantIdUtils.js.map +1 -1
  358. package/dist/workerd/constants.d.ts +1 -1
  359. package/dist/workerd/constants.js +1 -1
  360. package/dist/workerd/constants.js.map +1 -1
  361. package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  362. package/dist/workerd/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  363. package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -1
  364. package/dist/workerd/credentials/azureCliCredential.js +21 -24
  365. package/dist/workerd/credentials/azureCliCredential.js.map +1 -1
  366. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  367. package/dist/workerd/credentials/azureDeveloperCliCredential.js +16 -24
  368. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -1
  369. package/dist/workerd/credentials/azurePipelinesCredential.d.ts.map +1 -1
  370. package/dist/workerd/credentials/azurePipelinesCredential.js +16 -6
  371. package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -1
  372. package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  373. package/dist/workerd/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  374. package/dist/workerd/credentials/azurePowerShellCredential.d.ts +10 -0
  375. package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -1
  376. package/dist/workerd/credentials/azurePowerShellCredential.js +29 -7
  377. package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -1
  378. package/dist/workerd/credentials/brokerCredential.d.ts +2 -2
  379. package/dist/workerd/credentials/brokerCredential.d.ts.map +1 -1
  380. package/dist/workerd/credentials/brokerCredential.js.map +1 -1
  381. package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  382. package/dist/workerd/credentials/clientAssertionCredentialOptions.js.map +1 -1
  383. package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts.map +1 -1
  384. package/dist/workerd/credentials/clientCertificateCredentialModels.js.map +1 -1
  385. package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  386. package/dist/workerd/credentials/clientCertificateCredentialOptions.js.map +1 -1
  387. package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  388. package/dist/workerd/credentials/clientSecretCredentialOptions.js.map +1 -1
  389. package/dist/workerd/credentials/defaultAzureCredential.d.ts.map +1 -1
  390. package/dist/workerd/credentials/defaultAzureCredential.js +5 -2
  391. package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -1
  392. package/dist/workerd/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  393. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  394. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -1
  395. package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  396. package/dist/workerd/credentials/deviceCodeCredentialOptions.js.map +1 -1
  397. package/dist/workerd/credentials/environmentCredential.d.ts.map +1 -1
  398. package/dist/workerd/credentials/environmentCredential.js.map +1 -1
  399. package/dist/workerd/credentials/environmentCredentialOptions.d.ts.map +1 -1
  400. package/dist/workerd/credentials/environmentCredentialOptions.js.map +1 -1
  401. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  402. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  403. package/dist/workerd/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  404. package/dist/workerd/credentials/interactiveCredentialOptions.js.map +1 -1
  405. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  406. package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  407. package/dist/workerd/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  408. package/dist/workerd/credentials/visualStudioCodeCredential.d.ts.map +1 -1
  409. package/dist/workerd/credentials/visualStudioCodeCredential.js.map +1 -1
  410. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -1
  411. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  412. package/dist/workerd/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  413. package/dist/workerd/errors.d.ts.map +1 -1
  414. package/dist/workerd/errors.js +1 -4
  415. package/dist/workerd/errors.js.map +1 -1
  416. package/dist/workerd/index.d.ts +33 -33
  417. package/dist/workerd/index.d.ts.map +1 -1
  418. package/dist/workerd/index.js.map +1 -1
  419. package/dist/workerd/msal/nodeFlows/msalClient.js +1 -1
  420. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -1
  421. package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts.map +1 -1
  422. package/dist/workerd/msal/nodeFlows/msalPlugins.js.map +1 -1
  423. package/dist/workerd/msal/utils.d.ts.map +1 -1
  424. package/dist/workerd/msal/utils.js.map +1 -1
  425. package/dist/workerd/package.json +6 -1
  426. package/dist/workerd/util/processUtils.d.ts +14 -3
  427. package/dist/workerd/util/processUtils.d.ts.map +1 -1
  428. package/dist/workerd/util/processUtils.js +36 -19
  429. package/dist/workerd/util/processUtils.js.map +1 -1
  430. package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -1
  431. package/dist/workerd/util/tenantIdUtils.js.map +1 -1
  432. package/package.json +37 -39
  433. package/dist/browser/credentials/azureCliCredential.d.ts +0 -13
  434. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +0 -13
  435. package/dist/browser/credentials/azurePipelinesCredential.d.ts +0 -13
  436. package/dist/browser/credentials/azurePowerShellCredential.d.ts +0 -12
  437. package/dist/browser/credentials/brokerCredential.d.ts +0 -35
  438. package/dist/browser/credentials/brokerCredential.d.ts.map +0 -1
  439. package/dist/browser/credentials/brokerCredential.js +0 -69
  440. package/dist/browser/credentials/brokerCredential.js.map +0 -1
  441. package/dist/browser/credentials/clientAssertionCredential.d.ts +0 -12
  442. package/dist/browser/credentials/clientCertificateCredential.d.ts +0 -13
  443. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts +0 -64
  444. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts.map +0 -1
  445. package/dist/browser/credentials/defaultAzureCredentialFunctions.js +0 -147
  446. package/dist/browser/credentials/defaultAzureCredentialFunctions.js.map +0 -1
  447. package/dist/browser/credentials/deviceCodeCredential.d.ts +0 -13
  448. package/dist/browser/credentials/environmentCredential.d.ts +0 -13
  449. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +0 -18
  450. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +0 -1
  451. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +0 -97
  452. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  453. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +0 -13
  454. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +0 -1
  455. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -43
  456. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  457. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +0 -6
  458. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +0 -24
  459. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +0 -1
  460. package/dist/browser/credentials/managedIdentityCredential/models.js +0 -4
  461. package/dist/browser/credentials/managedIdentityCredential/models.js.map +0 -1
  462. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +0 -14
  463. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +0 -1
  464. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -38
  465. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  466. package/dist/browser/credentials/onBehalfOfCredential.d.ts +0 -12
  467. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  468. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  469. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  470. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  471. package/dist/browser/msal/nodeFlows/msalClient.d.ts +0 -199
  472. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +0 -1
  473. package/dist/browser/msal/nodeFlows/msalClient.js +0 -499
  474. package/dist/browser/msal/nodeFlows/msalClient.js.map +0 -1
  475. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +0 -109
  476. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +0 -1
  477. package/dist/browser/msal/nodeFlows/msalPlugins.js +0 -160
  478. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +0 -1
  479. package/dist/browser/regionalAuthority.d.ts +0 -122
  480. package/dist/browser/regionalAuthority.d.ts.map +0 -1
  481. package/dist/browser/regionalAuthority.js +0 -139
  482. package/dist/browser/regionalAuthority.js.map +0 -1
  483. package/dist/browser/util/authHostEnv-browser.d.mts +0 -4
  484. package/dist/browser/util/authHostEnv-browser.d.mts.map +0 -1
  485. package/dist/browser/util/authHostEnv-browser.mjs +0 -7
  486. package/dist/browser/util/authHostEnv-browser.mjs.map +0 -1
  487. package/dist/browser/util/processUtils.d.ts +0 -13
  488. package/dist/browser/util/processUtils.d.ts.map +0 -1
  489. package/dist/browser/util/processUtils.js +0 -32
  490. package/dist/browser/util/processUtils.js.map +0 -1
  491. package/dist/browser/util/subscriptionUtils.d.ts +0 -6
  492. package/dist/browser/util/subscriptionUtils.d.ts.map +0 -1
  493. package/dist/browser/util/subscriptionUtils.js +0 -16
  494. package/dist/browser/util/subscriptionUtils.js.map +0 -1
  495. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  496. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  497. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +0 -5
  498. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  499. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  500. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  501. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +0 -264
  502. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  503. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  504. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  505. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +0 -5
  506. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  507. package/dist/commonjs/msal/credentials.d.ts +0 -52
  508. package/dist/commonjs/msal/credentials.d.ts.map +0 -1
  509. package/dist/commonjs/msal/credentials.js +0 -5
  510. package/dist/commonjs/msal/credentials.js.map +0 -1
  511. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  512. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  513. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  514. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  515. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  516. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  517. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +0 -261
  518. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  519. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  520. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  521. package/dist/esm/msal/browserFlows/msalBrowserOptions.js +0 -4
  522. package/dist/esm/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  523. package/dist/esm/msal/credentials.d.ts +0 -52
  524. package/dist/esm/msal/credentials.d.ts.map +0 -1
  525. package/dist/esm/msal/credentials.js +0 -4
  526. package/dist/esm/msal/credentials.js.map +0 -1
  527. package/dist/esm/util/authHostEnv-browser.d.mts +0 -4
  528. package/dist/esm/util/authHostEnv-browser.d.mts.map +0 -1
  529. package/dist/esm/util/authHostEnv-browser.mjs +0 -7
  530. package/dist/esm/util/authHostEnv-browser.mjs.map +0 -1
  531. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  532. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  533. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  534. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  535. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  536. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  537. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +0 -261
  538. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  539. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  540. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  541. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +0 -4
  542. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  543. package/dist/workerd/msal/credentials.d.ts +0 -52
  544. package/dist/workerd/msal/credentials.d.ts.map +0 -1
  545. package/dist/workerd/msal/credentials.js +0 -4
  546. package/dist/workerd/msal/credentials.js.map +0 -1
  547. package/dist/workerd/util/authHostEnv-browser.d.mts +0 -4
  548. package/dist/workerd/util/authHostEnv-browser.d.mts.map +0 -1
  549. package/dist/workerd/util/authHostEnv-browser.mjs +0 -7
  550. package/dist/workerd/util/authHostEnv-browser.mjs.map +0 -1
  551. /package/dist/browser/credentials/{clientSecretCredential.d.ts → clientSecretCredential-browser.d.mts} +0 -0
  552. /package/dist/browser/credentials/{clientSecretCredential.js → clientSecretCredential-browser.mjs} +0 -0
  553. /package/dist/browser/credentials/{interactiveBrowserCredential.d.ts → interactiveBrowserCredential-browser.d.mts} +0 -0
  554. /package/dist/browser/credentials/{interactiveBrowserCredential.js → interactiveBrowserCredential-browser.mjs} +0 -0
  555. /package/dist/browser/credentials/{usernamePasswordCredential.d.ts → usernamePasswordCredential-browser.d.mts} +0 -0
  556. /package/dist/browser/credentials/{usernamePasswordCredential.js → usernamePasswordCredential-browser.mjs} +0 -0
  557. /package/dist/browser/msal/{msal.d.ts → msal-browser.d.mts} +0 -0
  558. /package/dist/browser/msal/{msal.js → msal-browser.mjs} +0 -0
  559. /package/dist/browser/plugins/{consumer.d.ts → consumer-browser.d.mts} +0 -0
  560. /package/dist/browser/plugins/{consumer.js → consumer-browser.mjs} +0 -0
  561. /package/dist/browser/util/{processMultiTenantRequest.d.ts → processMultiTenantRequest-browser.d.mts} +0 -0
  562. /package/dist/browser/util/{processMultiTenantRequest.js → processMultiTenantRequest-browser.mjs} +0 -0
@@ -11,11 +11,11 @@ export class DeviceCodeCredential {
11
11
  /**
12
12
  * Only available in Node.js
13
13
  */
14
- constructor() {
14
+ constructor(_options) {
15
15
  logger.info(formatError("", BrowserNotSupportedError));
16
16
  throw BrowserNotSupportedError;
17
17
  }
18
- getToken() {
18
+ getToken(_scopes, _options) {
19
19
  logger.getToken.info(formatError("", BrowserNotSupportedError));
20
20
  throw BrowserNotSupportedError;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deviceCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredential-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,uDAAuD,CAAC,CAAC;AACpG,MAAM,MAAM,GAAG,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ;QACb,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, TokenCredential } from \"@azure/core-auth\";\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() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"deviceCodeCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,2BACf,SAAQ,4BAA4B,EAClC,4BAA4B;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,wBAAwB,CAAC;CAC/C"}
1
+ {"version":3,"file":"deviceCodeCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,2BACf,SAAQ,4BAA4B,EAAE,4BAA4B;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,wBAAwB,CAAC;CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"deviceCodeCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { InteractiveCredentialOptions } from \"./interactiveCredentialOptions.js\";\n\n/**\n * Provides the user code and verification URI where the code must be\n * entered. Also provides a message to display to the user which\n * contains an instruction with these details.\n */\nexport interface DeviceCodeInfo {\n /**\n * The device code that the user must enter into the verification page.\n */\n userCode: string;\n\n /**\n * The verification URI to which the user must navigate to enter the device\n * code.\n */\n verificationUri: string;\n\n /**\n * A message that may be shown to the user to instruct them on how to enter\n * the device code in the page specified by the verification URI.\n */\n message: string;\n}\n\n/**\n * Defines the signature of a callback which will be passed to\n * DeviceCodeCredential for the purpose of displaying authentication\n * details to the user.\n */\nexport type DeviceCodePromptCallback = (deviceCodeInfo: DeviceCodeInfo) => void;\n\n/**\n * Defines options for the InteractiveBrowserCredential class for Node.js.\n */\nexport interface DeviceCodeCredentialOptions\n extends InteractiveCredentialOptions,\n CredentialPersistenceOptions {\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n /**\n * Client ID of the Microsoft Entra application that users will sign into.\n * It is recommended that developers register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n * If not specified, users will authenticate to an Azure development application,\n * which is not recommended for production scenarios.\n */\n clientId?: string;\n /**\n * A callback function that will be invoked to show {@link DeviceCodeInfo} to the user.\n * If left unassigned, we will automatically log the device code information\n * and the authentication instructions in the console.\n */\n userPromptCallback?: DeviceCodePromptCallback;\n}\n"]}
1
+ {"version":3,"file":"deviceCodeCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { InteractiveCredentialOptions } from \"./interactiveCredentialOptions.js\";\n\n/**\n * Provides the user code and verification URI where the code must be\n * entered. Also provides a message to display to the user which\n * contains an instruction with these details.\n */\nexport interface DeviceCodeInfo {\n /**\n * The device code that the user must enter into the verification page.\n */\n userCode: string;\n\n /**\n * The verification URI to which the user must navigate to enter the device\n * code.\n */\n verificationUri: string;\n\n /**\n * A message that may be shown to the user to instruct them on how to enter\n * the device code in the page specified by the verification URI.\n */\n message: string;\n}\n\n/**\n * Defines the signature of a callback which will be passed to\n * DeviceCodeCredential for the purpose of displaying authentication\n * details to the user.\n */\nexport type DeviceCodePromptCallback = (deviceCodeInfo: DeviceCodeInfo) => void;\n\n/**\n * Defines options for the InteractiveBrowserCredential class for Node.js.\n */\nexport interface DeviceCodeCredentialOptions\n extends InteractiveCredentialOptions, CredentialPersistenceOptions {\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n /**\n * Client ID of the Microsoft Entra application that users will sign into.\n * It is recommended that developers register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n * If not specified, users will authenticate to an Azure development application,\n * which is not recommended for production scenarios.\n */\n clientId?: string;\n /**\n * A callback function that will be invoked to show {@link DeviceCodeInfo} to the user.\n * If left unassigned, we will automatically log the device code information\n * and the authentication instructions in the console.\n */\n userPromptCallback?: DeviceCodePromptCallback;\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { EnvironmentCredentialOptions } from "./environmentCredentialOptions.js";
3
+ /**
4
+ * Enables authentication to Microsoft Entra ID using client secret
5
+ * details configured in environment variables
6
+ */
7
+ export declare class EnvironmentCredential implements TokenCredential {
8
+ /**
9
+ * Only available in Node.js
10
+ */
11
+ constructor(_options?: EnvironmentCredentialOptions);
12
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
+ }
14
+ //# sourceMappingURL=environmentCredential-browser.d.mts.map
@@ -1 +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,MAAM,kBAAkB,CAAC;AAQrE;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC3D;;OAEG;;IAMH,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAIxC"}
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"}
@@ -11,11 +11,11 @@ export class EnvironmentCredential {
11
11
  /**
12
12
  * Only available in Node.js
13
13
  */
14
- constructor() {
14
+ constructor(_options) {
15
15
  logger.info(formatError("", BrowserNotSupportedError));
16
16
  throw BrowserNotSupportedError;
17
17
  }
18
- getToken() {
18
+ getToken(_scopes, _options) {
19
19
  logger.getToken.info(formatError("", BrowserNotSupportedError));
20
20
  throw BrowserNotSupportedError;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"environmentCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/environmentCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,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;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ;QACN,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, TokenCredential } from \"@azure/core-auth\";\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() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"environmentCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/environmentCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,4BACf,SAAQ,iCAAiC,EACvC,0BAA0B;CAAG"}
1
+ {"version":3,"file":"environmentCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/environmentCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,4BACf,SAAQ,iCAAiC,EAAE,0BAA0B;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"environmentCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/environmentCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Enables authentication to Microsoft Entra ID depending on the available environment variables.\n * Defines options for the EnvironmentCredential class.\n */\nexport interface EnvironmentCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {}\n"]}
1
+ {"version":3,"file":"environmentCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/environmentCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Enables authentication to Microsoft Entra ID depending on the available environment variables.\n * Defines options for the EnvironmentCredential class.\n */\nexport interface EnvironmentCredentialOptions\n extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveBrowserCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,uCACf,SAAQ,4BAA4B,EAClC,4BAA4B,EAC5B,2BAA2B,EAC3B,iBAAiB;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,4CAA6C,SAAQ,4BAA4B;IAChG;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"interactiveBrowserCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,uCACf,SACE,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,iBAAiB;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,4CAA6C,SAAQ,4BAA4B;IAChG;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveBrowserCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BrowserCustomizationOptions } from \"./browserCustomizationOptions.js\";\nimport type { BrokerAuthOptions } from \"./brokerAuthOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { InteractiveCredentialOptions } from \"./interactiveCredentialOptions.js\";\n\n/**\n * (Browser-only feature)\n * The \"login style\" to use in the authentication flow:\n * - \"redirect\" redirects the user to the authentication page and then\n * redirects them back to the page once authentication is completed.\n * - \"popup\" opens a new browser window through with the redirect flow\n * is initiated. The user's existing browser window does not leave\n * the current page\n */\nexport type BrowserLoginStyle = \"redirect\" | \"popup\";\n\n/**\n * Defines the common options for the InteractiveBrowserCredential class.\n */\nexport interface InteractiveBrowserCredentialNodeOptions\n extends InteractiveCredentialOptions,\n CredentialPersistenceOptions,\n BrowserCustomizationOptions,\n BrokerAuthOptions {\n /**\n * Gets the redirect URI of the application. This should be same as the value\n * in the application registration portal. Defaults to `window.location.href`.\n * This field is no longer required for Node.js.\n */\n redirectUri?: string | (() => string);\n\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n\n /**\n * The Client ID of the Microsoft Entra application that users will sign into.\n * It is recommended that developers register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n * If not specified, users will authenticate to an Azure development application,\n * which is not recommended for production scenarios.\n */\n clientId?: string;\n\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n\n/**\n * Defines the common options for the InteractiveBrowserCredential class.\n */\nexport interface InteractiveBrowserCredentialInBrowserOptions extends InteractiveCredentialOptions {\n /**\n * Gets the redirect URI of the application. This should be same as the value\n * in the application registration portal. Defaults to `window.location.href`.\n * This field is no longer required for Node.js.\n */\n redirectUri?: string | (() => string);\n\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n\n /**\n * The Client ID of the Microsoft Entra application that users will sign into.\n * This parameter is required on the browser.\n * Developers need to register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n */\n clientId: string;\n\n /**\n * Specifies whether a redirect or a popup window should be used to\n * initiate the user authentication flow. Possible values are \"redirect\"\n * or \"popup\" (default) for browser and \"popup\" (default) for node.\n *\n */\n loginStyle?: BrowserLoginStyle;\n\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n"]}
1
+ {"version":3,"file":"interactiveBrowserCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BrowserCustomizationOptions } from \"./browserCustomizationOptions.js\";\nimport type { BrokerAuthOptions } from \"./brokerAuthOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { InteractiveCredentialOptions } from \"./interactiveCredentialOptions.js\";\n\n/**\n * (Browser-only feature)\n * The \"login style\" to use in the authentication flow:\n * - \"redirect\" redirects the user to the authentication page and then\n * redirects them back to the page once authentication is completed.\n * - \"popup\" opens a new browser window through with the redirect flow\n * is initiated. The user's existing browser window does not leave\n * the current page\n */\nexport type BrowserLoginStyle = \"redirect\" | \"popup\";\n\n/**\n * Defines the common options for the InteractiveBrowserCredential class.\n */\nexport interface InteractiveBrowserCredentialNodeOptions\n extends\n InteractiveCredentialOptions,\n CredentialPersistenceOptions,\n BrowserCustomizationOptions,\n BrokerAuthOptions {\n /**\n * Gets the redirect URI of the application. This should be same as the value\n * in the application registration portal. Defaults to `window.location.href`.\n * This field is no longer required for Node.js.\n */\n redirectUri?: string | (() => string);\n\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n\n /**\n * The Client ID of the Microsoft Entra application that users will sign into.\n * It is recommended that developers register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n * If not specified, users will authenticate to an Azure development application,\n * which is not recommended for production scenarios.\n */\n clientId?: string;\n\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n\n/**\n * Defines the common options for the InteractiveBrowserCredential class.\n */\nexport interface InteractiveBrowserCredentialInBrowserOptions extends InteractiveCredentialOptions {\n /**\n * Gets the redirect URI of the application. This should be same as the value\n * in the application registration portal. Defaults to `window.location.href`.\n * This field is no longer required for Node.js.\n */\n redirectUri?: string | (() => string);\n\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n\n /**\n * The Client ID of the Microsoft Entra application that users will sign into.\n * This parameter is required on the browser.\n * Developers need to register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n */\n clientId: string;\n\n /**\n * Specifies whether a redirect or a popup window should be used to\n * initiate the user authentication flow. Possible values are \"redirect\"\n * or \"popup\" (default) for browser and \"popup\" (default) for node.\n *\n */\n loginStyle?: BrowserLoginStyle;\n\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,4BACf,SAAQ,iCAAiC,EACvC,0BAA0B;IAC5B;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C;;;OAGG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C"}
1
+ {"version":3,"file":"interactiveCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,4BACf,SAAQ,iCAAiC,EAAE,0BAA0B;IACrE;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C;;;OAGG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/interactiveCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthenticationRecord } from \"../msal/types.js\";\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Common constructor options for the Identity credentials that requires user interaction.\n */\nexport interface InteractiveCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {\n /**\n * Result of a previous authentication that can be used to retrieve the cached credentials of each individual account.\n * This is necessary to provide in case the application wants to work with more than one account per\n * Client ID and Tenant ID pair.\n *\n * This record can be retrieved by calling to the credential's `authenticate()` method, as follows:\n *\n * const authenticationRecord = await credential.authenticate();\n *\n */\n authenticationRecord?: AuthenticationRecord;\n\n /**\n * Makes getToken throw if a manual authentication is necessary.\n * Developers will need to call to `authenticate()` to control when to manually authenticate.\n */\n disableAutomaticAuthentication?: boolean;\n}\n"]}
1
+ {"version":3,"file":"interactiveCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/interactiveCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthenticationRecord } from \"../msal/types.js\";\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Common constructor options for the Identity credentials that requires user interaction.\n */\nexport interface InteractiveCredentialOptions\n extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {\n /**\n * Result of a previous authentication that can be used to retrieve the cached credentials of each individual account.\n * This is necessary to provide in case the application wants to work with more than one account per\n * Client ID and Tenant ID pair.\n *\n * This record can be retrieved by calling to the credential's `authenticate()` method, as follows:\n *\n * const authenticationRecord = await credential.authenticate();\n *\n */\n authenticationRecord?: AuthenticationRecord;\n\n /**\n * Makes getToken throw if a manual authentication is necessary.\n * Developers will need to call to `authenticate()` to control when to manually authenticate.\n */\n disableAutomaticAuthentication?: boolean;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { TokenCredentialOptions } from "../../tokenCredentialOptions.js";
3
+ import type { ManagedIdentityCredentialClientIdOptions, ManagedIdentityCredentialObjectIdOptions, ManagedIdentityCredentialResourceIdOptions } from "./options.js";
4
+ export declare class ManagedIdentityCredential implements TokenCredential {
5
+ constructor(clientId: string, options?: TokenCredentialOptions);
6
+ constructor(options?: ManagedIdentityCredentialClientIdOptions);
7
+ constructor(options?: ManagedIdentityCredentialResourceIdOptions);
8
+ constructor(options?: ManagedIdentityCredentialObjectIdOptions);
9
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
10
+ }
11
+ //# sourceMappingURL=index-browser.d.mts.map
@@ -1 +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,MAAM,kBAAkB,CAAC;AASrE,qBAAa,yBAA0B,YAAW,eAAe;;IAMlD,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAIrD"}
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"}
@@ -4,11 +4,11 @@ import { credentialLogger, formatError } from "../../util/logging.js";
4
4
  const BrowserNotSupportedError = new Error("ManagedIdentityCredential is not supported in the browser.");
5
5
  const logger = credentialLogger("ManagedIdentityCredential");
6
6
  export class ManagedIdentityCredential {
7
- constructor() {
7
+ constructor(_clientIdOrOptions, _options) {
8
8
  logger.info(formatError("", BrowserNotSupportedError));
9
9
  throw BrowserNotSupportedError;
10
10
  }
11
- async getToken() {
11
+ async getToken(_scopes, _options) {
12
12
  logger.getToken.info(formatError("", BrowserNotSupportedError));
13
13
  throw BrowserNotSupportedError;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.mjs","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/index-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,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;IACpC;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,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, TokenCredential } from \"@azure/core-auth\";\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() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public async getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
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"]}
@@ -0,0 +1,13 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { OnBehalfOfCredentialOptions } from "./onBehalfOfCredentialOptions.js";
3
+ /**
4
+ * Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow).
5
+ */
6
+ export declare class OnBehalfOfCredential implements TokenCredential {
7
+ /**
8
+ * Only available in Node.js
9
+ */
10
+ constructor(_options: OnBehalfOfCredentialOptions);
11
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
12
+ }
13
+ //# sourceMappingURL=onBehalfOfCredential-browser.d.mts.map
@@ -1 +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,MAAM,kBAAkB,CAAC;AAOrE;;GAEG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAC1D;;OAEG;;IAMI,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
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"}
@@ -11,11 +11,11 @@ export class OnBehalfOfCredential {
11
11
  /**
12
12
  * Only available in Node.js
13
13
  */
14
- constructor() {
14
+ constructor(_options) {
15
15
  logger.info(formatError("", BrowserNotSupportedError));
16
16
  throw BrowserNotSupportedError;
17
17
  }
18
- getToken() {
18
+ getToken(_scopes, _options) {
19
19
  logger.getToken.info(formatError("", BrowserNotSupportedError));
20
20
  throw BrowserNotSupportedError;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"onBehalfOfCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/onBehalfOfCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAC9C,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,GAAG,cAAc,iCAAiC,CAAC,CAAC;AAC/F,MAAM,MAAM,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ;QACb,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, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst credentialName = \"OnBehalfOfCredential\";\nconst BrowserNotSupportedError = new Error(`${credentialName}: Not supported in the browser.`);\nconst logger = credentialLogger(credentialName);\n\n/**\n * Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow).\n */\nexport class OnBehalfOfCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
1
+ {"version":3,"file":"onBehalfOfCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/onBehalfOfCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAC9C,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,GAAG,cAAc,iCAAiC,CAAC,CAAC;AAC/F,MAAM,MAAM,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH,YAAY,QAAqC;QAC/C,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 { OnBehalfOfCredentialOptions } from \"./onBehalfOfCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst credentialName = \"OnBehalfOfCredential\";\nconst BrowserNotSupportedError = new Error(`${credentialName}: Not supported in the browser.`);\nconst logger = credentialLogger(credentialName);\n\n/**\n * Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow).\n */\nexport class OnBehalfOfCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options: OnBehalfOfCredentialOptions) {\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePasswordCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/usernamePasswordCredential-browser.mts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport {\n checkTenantId,\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils.js\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { credentialLogger, formatSuccess } from \"../util/logging.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { UsernamePasswordCredentialOptions } from \"./usernamePasswordCredentialOptions.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { tracingClient } from \"../util/tracing.js\";\n\nconst logger = credentialLogger(\"UsernamePasswordCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID with a user's\n * username and password. This credential requires a high degree of\n * trust so you should only use it when other, more secure credential\n * types can't be used.\n * \n * @deprecated UsernamePasswordCredential is deprecated. Use a more secure credential. See https://aka.ms/azsdk/identity/mfa for details.\n */\nexport class UsernamePasswordCredential implements TokenCredential {\n private identityClient: IdentityClient;\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private clientId: string;\n private username: string;\n private password: string;\n\n /**\n * Creates an instance of the UsernamePasswordCredential with the details\n * needed to authenticate against Microsoft Entra ID with a username\n * and password.\n *\n * @param tenantIdOrName - The Microsoft Entra tenant (directory) ID or name.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param username - The user account's e-mail address (user name).\n * @param password - The user account's account password\n * @param options - Options for configuring the client which makes the authentication request.\n * \n */\n constructor(\n tenantIdOrName: string,\n clientId: string,\n username: string,\n password: string,\n options?: UsernamePasswordCredentialOptions,\n ) {\n checkTenantId(logger, tenantIdOrName);\n\n this.identityClient = new IdentityClient(options);\n this.tenantId = tenantIdOrName;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n this.clientId = clientId;\n this.username = username;\n this.password = password;\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 \"UsernamePasswordCredential.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 urlSuffix = getIdentityTokenEndpointSuffix(this.tenantId);\n const params = new URLSearchParams({\n response_type: \"token\",\n grant_type: \"password\",\n client_id: this.clientId,\n username: this.username,\n password: this.password,\n scope: typeof scopes === \"string\" ? scopes : scopes.join(\" \"),\n });\n const webResource = createPipelineRequest({\n url: `${this.identityClient.authorityHost}/${this.tenantId}/${urlSuffix}`,\n method: \"POST\",\n body: params.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(webResource);\n logger.getToken.info(formatSuccess(scopes));\n return (tokenResponse && tokenResponse.accessToken) || null;\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"usernamePasswordCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/usernamePasswordCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,mCAAmC,GACpC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;IAC7B,cAAc,CAAiB;IAC/B,QAAQ,CAAS;IACjB,4BAA4B,CAAW;IACvC,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,QAAQ,CAAS;IAEzB;;;;;;;;;;;OAWG;IACH,YACE,cAAsB,EACtB,QAAgB,EAChB,QAAgB,EAChB,QAAgB,EAChB,OAA2C;QAE3C,aAAa,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAEtC,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC;QAC/B,IAAI,CAAC,4BAA4B,GAAG,mCAAmC,CACrE,OAAO,EAAE,0BAA0B,CACpC,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,QAAQ,CACnB,MAAyB,EACzB,UAA2B,EAAE;QAE7B,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,EACP,KAAK,EAAE,UAAU,EAAE,EAAE;YACnB,MAAM,QAAQ,GAAG,yBAAyB,CACxC,IAAI,CAAC,QAAQ,EACb,UAAU,EACV,IAAI,CAAC,4BAA4B,CAClC,CAAC;YACF,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAE/B,MAAM,SAAS,GAAG,8BAA8B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAChE,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBACjC,aAAa,EAAE,OAAO;gBACtB,UAAU,EAAE,UAAU;gBACtB,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;aAC9D,CAAC,CAAC;YACH,MAAM,WAAW,GAAG,qBAAqB,CAAC;gBACxC,GAAG,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;gBACzE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE;gBACvB,OAAO,EAAE,iBAAiB,CAAC;oBACzB,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,mCAAmC;iBACpD,CAAC;gBACF,WAAW,EAAE,OAAO,IAAI,OAAO,CAAC,WAAW;gBAC3C,cAAc,EAAE,UAAU,CAAC,cAAc;aAC1C,CAAC,CAAC;YAEH,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;YAC9E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,OAAO,CAAC,aAAa,IAAI,aAAa,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC;QAC9D,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 {\n checkTenantId,\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils.js\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { credentialLogger, formatSuccess } from \"../util/logging.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { UsernamePasswordCredentialOptions } from \"./usernamePasswordCredentialOptions.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { tracingClient } from \"../util/tracing.js\";\n\nconst logger = credentialLogger(\"UsernamePasswordCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID with a user's\n * username and password. This credential requires a high degree of\n * trust so you should only use it when other, more secure credential\n * types can't be used.\n *\n * @deprecated UsernamePasswordCredential is deprecated. Use a more secure credential. See https://aka.ms/azsdk/identity/mfa for details.\n */\nexport class UsernamePasswordCredential implements TokenCredential {\n private identityClient: IdentityClient;\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private clientId: string;\n private username: string;\n private password: string;\n\n /**\n * Creates an instance of the UsernamePasswordCredential with the details\n * needed to authenticate against Microsoft Entra ID with a username\n * and password.\n *\n * @param tenantIdOrName - The Microsoft Entra tenant (directory) ID or name.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param username - The user account's e-mail address (user name).\n * @param password - The user account's account password\n * @param options - Options for configuring the client which makes the authentication request.\n *\n */\n constructor(\n tenantIdOrName: string,\n clientId: string,\n username: string,\n password: string,\n options?: UsernamePasswordCredentialOptions,\n ) {\n checkTenantId(logger, tenantIdOrName);\n\n this.identityClient = new IdentityClient(options);\n this.tenantId = tenantIdOrName;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n this.clientId = clientId;\n this.username = username;\n this.password = password;\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 \"UsernamePasswordCredential.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 urlSuffix = getIdentityTokenEndpointSuffix(this.tenantId);\n const params = new URLSearchParams({\n response_type: \"token\",\n grant_type: \"password\",\n client_id: this.clientId,\n username: this.username,\n password: this.password,\n scope: typeof scopes === \"string\" ? scopes : scopes.join(\" \"),\n });\n const webResource = createPipelineRequest({\n url: `${this.identityClient.authorityHost}/${this.tenantId}/${urlSuffix}`,\n method: \"POST\",\n body: params.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(webResource);\n logger.getToken.info(formatSuccess(scopes));\n return (tokenResponse && tokenResponse.accessToken) || null;\n },\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePasswordCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/usernamePasswordCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,iCACf,SAAQ,iCAAiC,EACvC,4BAA4B,EAC5B,0BAA0B;CAAG"}
1
+ {"version":3,"file":"usernamePasswordCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/usernamePasswordCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,iCACf,SACE,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePasswordCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/usernamePasswordCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Defines options for the {@link UsernamePasswordCredential} class.\n * @deprecated UsernamePasswordCredential is deprecated. Use a more secure credential. See https://aka.ms/azsdk/identity/mfa for details.\n */\nexport interface UsernamePasswordCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"]}
1
+ {"version":3,"file":"usernamePasswordCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/usernamePasswordCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Defines options for the {@link UsernamePasswordCredential} class.\n * @deprecated UsernamePasswordCredential is deprecated. Use a more secure credential. See https://aka.ms/azsdk/identity/mfa for details.\n */\nexport interface UsernamePasswordCredentialOptions\n extends\n MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"]}
@@ -1,4 +1,5 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { VisualStudioCodeCredentialOptions } from "./visualStudioCodeCredentialOptions.js";
2
3
  export declare const vsCodeCredentialControl: {
3
4
  vsCodeCredentialFinder: never;
4
5
  };
@@ -14,7 +15,7 @@ export declare class VisualStudioCodeCredential implements TokenCredential {
14
15
  /**
15
16
  * Only available in Node.js
16
17
  */
17
- constructor();
18
- getToken(): Promise<AccessToken | null>;
18
+ constructor(_options?: VisualStudioCodeCredentialOptions);
19
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
19
20
  }
20
21
  //# sourceMappingURL=visualStudioCodeCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visualStudioCodeCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE,eAAO,MAAM,uBAAuB;4BACE,KAAK;CAK1C,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE;;OAEG;;IAMI,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
1
+ {"version":3,"file":"visualStudioCodeCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAQhG,eAAO,MAAM,uBAAuB;4BACE,KAAK;CAK1C,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE;;OAEG;gBACS,QAAQ,CAAC,EAAE,iCAAiC;IAKjD,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -20,11 +20,11 @@ export class VisualStudioCodeCredential {
20
20
  /**
21
21
  * Only available in Node.js
22
22
  */
23
- constructor() {
23
+ constructor(_options) {
24
24
  logger.info(formatError("", BrowserNotSupportedError));
25
25
  throw BrowserNotSupportedError;
26
26
  }
27
- getToken() {
27
+ getToken(_scopes, _options) {
28
28
  logger.getToken.info(formatError("", BrowserNotSupportedError));
29
29
  throw BrowserNotSupportedError;
30
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"visualStudioCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,6DAA6D,CAC9D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,sBAAsB,CAAC,OAAc;QACvC,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ;QACb,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, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"VisualStudioCodeCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"VisualStudioCodeCredential\");\n\nexport const vsCodeCredentialControl = {\n set vsCodeCredentialFinder(_finder: never) {\n throw new Error(\n \"Attempted to register a VisualStudioCodeCredential provider plugin in the browser. This environment is not supported by VisualStudioCodeCredential.\",\n );\n },\n};\n\n/**\n * Connects to Azure using the credential provided by the VSCode extension 'Azure Account'.\n * \n * @deprecated This credential is deprecated because the VS Code Azure Account extension on which this credential\n * relies has been deprecated. Users should use other dev-time credentials, such as {@link AzureCliCredential},\n * {@link AzureDeveloperCliCredential}, or {@link AzurePowerShellCredential} for their\n * local development needs. See Azure account extension deprecation notice [here](https://github.com/microsoft/vscode-azure-account/issues/964).\n */\nexport class VisualStudioCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
1
+ {"version":3,"file":"visualStudioCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredential-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,6DAA6D,CAC9D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,sBAAsB,CAAC,OAAc;QACvC,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH,YAAY,QAA4C;QACtD,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 { VisualStudioCodeCredentialOptions } from \"./visualStudioCodeCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"VisualStudioCodeCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"VisualStudioCodeCredential\");\n\nexport const vsCodeCredentialControl = {\n set vsCodeCredentialFinder(_finder: never) {\n throw new Error(\n \"Attempted to register a VisualStudioCodeCredential provider plugin in the browser. This environment is not supported by VisualStudioCodeCredential.\",\n );\n },\n};\n\n/**\n * Connects to Azure using the credential provided by the VSCode extension 'Azure Account'.\n *\n * @deprecated This credential is deprecated because the VS Code Azure Account extension on which this credential\n * relies has been deprecated. Users should use other dev-time credentials, such as {@link AzureCliCredential},\n * {@link AzureDeveloperCliCredential}, or {@link AzurePowerShellCredential} for their\n * local development needs. See Azure account extension deprecation notice [here](https://github.com/microsoft/vscode-azure-account/issues/964).\n */\nexport class VisualStudioCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: VisualStudioCodeCredentialOptions) {\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"]}
@@ -1,4 +1,5 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { WorkloadIdentityCredentialOptions } from "./workloadIdentityCredentialOptions.js";
2
3
  /**
3
4
  * WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Kubernetes.
4
5
  * Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">Microsoft Entra Workload ID</a>
@@ -8,10 +9,10 @@ export declare class WorkloadIdentityCredential implements TokenCredential {
8
9
  /**
9
10
  * Only available in Node.js
10
11
  */
11
- constructor();
12
+ constructor(_options?: WorkloadIdentityCredentialOptions);
12
13
  /**
13
14
  * Only available in Node.js
14
15
  */
15
- getToken(): Promise<AccessToken | null>;
16
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
16
17
  }
17
18
  //# sourceMappingURL=workloadIdentityCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workloadIdentityCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;;;GAIG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE;;OAEG;;IAMH;;OAEG;IACI,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
1
+ {"version":3,"file":"workloadIdentityCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAQhG;;;;GAIG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE;;OAEG;gBACS,QAAQ,CAAC,EAAE,iCAAiC;IAKxD;;OAEG;IACI,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -12,14 +12,14 @@ export class WorkloadIdentityCredential {
12
12
  /**
13
13
  * Only available in Node.js
14
14
  */
15
- constructor() {
15
+ constructor(_options) {
16
16
  logger.info(formatError("", BrowserNotSupportedError));
17
17
  throw BrowserNotSupportedError;
18
18
  }
19
19
  /**
20
20
  * Only available in Node.js
21
21
  */
22
- getToken() {
22
+ getToken(_scopes, _options) {
23
23
  logger.getToken.info(formatError("", BrowserNotSupportedError));
24
24
  throw BrowserNotSupportedError;
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"workloadIdentityCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,6DAA6D,CAC9D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,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, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"WorkloadIdentityCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"WorkloadIdentityCredential\");\n\n/**\n * WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Kubernetes.\n * Refer to <a href=\"https://learn.microsoft.com/azure/aks/workload-identity-overview\">Microsoft Entra Workload ID</a>\n * for more information.\n */\nexport class WorkloadIdentityCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n /**\n * Only available in Node.js\n */\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
1
+ {"version":3,"file":"workloadIdentityCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential-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,6DAA6D,CAC9D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH,YAAY,QAA4C;QACtD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,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 { WorkloadIdentityCredentialOptions } from \"./workloadIdentityCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"WorkloadIdentityCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"WorkloadIdentityCredential\");\n\n/**\n * WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Kubernetes.\n * Refer to <a href=\"https://learn.microsoft.com/azure/aks/workload-identity-overview\">Microsoft Entra Workload ID</a>\n * for more information.\n */\nexport class WorkloadIdentityCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: WorkloadIdentityCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n /**\n * Only available in Node.js\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"workloadIdentityCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,iCACf,SAAQ,iCAAiC,EACvC,0BAA0B;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"workloadIdentityCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,iCACf,SAAQ,iCAAiC,EAAE,0BAA0B;IACrE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"workloadIdentityCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Options for the {@link WorkloadIdentityCredential}\n */\nexport interface WorkloadIdentityCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {\n /**\n * ID of the application's Microsoft Entra tenant. Also called its directory ID.\n */\n tenantId?: string;\n /**\n * The client ID of a Microsoft Entra app registration.\n */\n clientId?: string;\n /**\n * The path to a file containing a Kubernetes service account token that authenticates the identity.\n */\n tokenFilePath?: string;\n}\n"]}
1
+ {"version":3,"file":"workloadIdentityCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Options for the {@link WorkloadIdentityCredential}\n */\nexport interface WorkloadIdentityCredentialOptions\n extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {\n /**\n * ID of the application's Microsoft Entra tenant. Also called its directory ID.\n */\n tenantId?: string;\n /**\n * The client ID of a Microsoft Entra app registration.\n */\n clientId?: string;\n /**\n * The path to a file containing a Kubernetes service account token that authenticates the identity.\n */\n tokenFilePath?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAUD;;GAEG;AACH,eAAO,MAAM,8BAA8B,+BAA+B,CAAC;AAE3E;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI5D;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C;;OAEG;IACH,SAAgB,UAAU,EAAE,MAAM,CAAC;IAEnC;;OAEG;IACH,SAAgB,aAAa,EAAE,aAAa,CAAC;gBAG3C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,EAC7C,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CA6ChC;AAED;;GAEG;AACH,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAE/E;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;OAGG;IACI,MAAM,EAAE,GAAG,EAAE,CAAC;gBAET,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;CAQjD;AAaD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IACpD;;OAEG;IACI,MAAM,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG;IACI,eAAe,CAAC,EAAE,eAAe,CAAC;;IAGvC;;OAEG;IACH,OAAO,EAAE,kCAAkC;CAO9C"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAUD;;GAEG;AACH,eAAO,MAAM,8BAA8B,+BAA+B,CAAC;AAE3E;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI5D;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C;;OAEG;IACH,SAAgB,UAAU,EAAE,MAAM,CAAC;IAEnC;;OAEG;IACH,SAAgB,aAAa,EAAE,aAAa,CAAC;gBAG3C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,EAC7C,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CA0ChC;AAED;;GAEG;AACH,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAE/E;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;OAGG;IACI,MAAM,EAAE,GAAG,EAAE,CAAC;gBAET,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;CAQjD;AAaD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IACpD;;OAEG;IACI,MAAM,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG;IACI,eAAe,CAAC,EAAE,eAAe,CAAC;;IAGvC;;OAEG;IACH,OAAO,EAAE,kCAAkC;CAO9C"}
@@ -39,10 +39,7 @@ export class AuthenticationError extends Error {
39
39
  */
40
40
  errorResponse;
41
41
  constructor(statusCode, errorBody, options) {
42
- let errorResponse = {
43
- error: "unknown",
44
- errorDescription: "An unknown error occurred and no additional details are available.",
45
- };
42
+ let errorResponse;
46
43
  if (isErrorResponse(errorBody)) {
47
44
  errorResponse = convertOAuthErrorResponseToErrorResponse(errorBody);
48
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { GetTokenOptions } from \"@azure/core-auth\";\n\n/**\n * See the official documentation for more details:\n *\n * https://learn.microsoft.com/azure/active-directory/develop/v1-protocols-oauth-code#error-response-1\n *\n * NOTE: This documentation is for v1 OAuth support but the same error\n * response details still apply to v2.\n */\nexport interface ErrorResponse {\n /**\n * The string identifier for the error.\n */\n error: string;\n\n /**\n * The error's description.\n */\n errorDescription: string;\n\n /**\n * An array of codes pertaining to the error(s) that occurred.\n */\n errorCodes?: number[];\n\n /**\n * The timestamp at which the error occurred.\n */\n timestamp?: string;\n\n /**\n * The trace identifier for this error occurrence.\n */\n traceId?: string;\n\n /**\n * The correlation ID to be used for tracking the source of the error.\n */\n correlationId?: string;\n}\n\n/**\n * Used for internal deserialization of OAuth responses. Public model is ErrorResponse\n * @internal\n */\nexport interface OAuthErrorResponse {\n error: string;\n error_description: string;\n error_codes?: number[];\n timestamp?: string;\n trace_id?: string;\n correlation_id?: string;\n}\n\nfunction isErrorResponse(errorResponse: any): errorResponse is OAuthErrorResponse {\n return (\n errorResponse &&\n typeof errorResponse.error === \"string\" &&\n typeof errorResponse.error_description === \"string\"\n );\n}\n\n/**\n * The Error.name value of an CredentialUnavailable\n */\nexport const CredentialUnavailableErrorName = \"CredentialUnavailableError\";\n\n/**\n * This signifies that the credential that was tried in a chained credential\n * was not available to be used as the credential. Rather than treating this as\n * an error that should halt the chain, it's caught and the chain continues\n */\nexport class CredentialUnavailableError extends Error {\n constructor(message?: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = CredentialUnavailableErrorName;\n }\n}\n\n/**\n * The Error.name value of an AuthenticationError\n */\nexport const AuthenticationErrorName = \"AuthenticationError\";\n\n/**\n * Provides details about a failure to authenticate with Azure Active\n * Directory. The `errorResponse` field contains more details about\n * the specific failure.\n */\nexport class AuthenticationError extends Error {\n /**\n * The HTTP status code returned from the authentication request.\n */\n public readonly statusCode: number;\n\n /**\n * The error response details.\n */\n public readonly errorResponse: ErrorResponse;\n\n constructor(\n statusCode: number,\n errorBody: object | string | undefined | null,\n options?: { cause?: unknown },\n ) {\n let errorResponse: ErrorResponse = {\n error: \"unknown\",\n errorDescription: \"An unknown error occurred and no additional details are available.\",\n };\n\n if (isErrorResponse(errorBody)) {\n errorResponse = convertOAuthErrorResponseToErrorResponse(errorBody);\n } else if (typeof errorBody === \"string\") {\n try {\n // Most error responses will contain JSON-formatted error details\n // in the response body\n const oauthErrorResponse: OAuthErrorResponse = JSON.parse(errorBody);\n errorResponse = convertOAuthErrorResponseToErrorResponse(oauthErrorResponse);\n } catch (e: any) {\n if (statusCode === 400) {\n errorResponse = {\n error: \"invalid_request\",\n errorDescription: `The service indicated that the request was invalid.\\n\\n${errorBody}`,\n };\n } else {\n errorResponse = {\n error: \"unknown_error\",\n errorDescription: `An unknown error has occurred. Response body:\\n\\n${errorBody}`,\n };\n }\n }\n } else {\n errorResponse = {\n error: \"unknown_error\",\n errorDescription: \"An unknown error occurred and no additional details are available.\",\n };\n }\n\n super(\n `${errorResponse.error} Status code: ${statusCode}\\nMore details:\\n${errorResponse.errorDescription},`,\n options,\n );\n this.statusCode = statusCode;\n this.errorResponse = errorResponse;\n\n // Ensure that this type reports the correct name\n this.name = AuthenticationErrorName;\n }\n}\n\n/**\n * The Error.name value of an AggregateAuthenticationError\n */\nexport const AggregateAuthenticationErrorName = \"AggregateAuthenticationError\";\n\n/**\n * Provides an `errors` array containing {@link AuthenticationError} instance\n * for authentication failures from credentials in a {@link ChainedTokenCredential}.\n */\nexport class AggregateAuthenticationError extends Error {\n /**\n * The array of error objects that were thrown while trying to authenticate\n * with the credentials in a {@link ChainedTokenCredential}.\n */\n public errors: any[];\n\n constructor(errors: any[], errorMessage?: string) {\n const errorDetail = errors.join(\"\\n\");\n super(`${errorMessage}\\n${errorDetail}`);\n this.errors = errors;\n\n // Ensure that this type reports the correct name\n this.name = AggregateAuthenticationErrorName;\n }\n}\n\nfunction convertOAuthErrorResponseToErrorResponse(errorBody: OAuthErrorResponse): ErrorResponse {\n return {\n error: errorBody.error,\n errorDescription: errorBody.error_description,\n correlationId: errorBody.correlation_id,\n errorCodes: errorBody.error_codes,\n timestamp: errorBody.timestamp,\n traceId: errorBody.trace_id,\n };\n}\n\n/**\n * Optional parameters to the {@link AuthenticationRequiredError}\n */\nexport interface AuthenticationRequiredErrorOptions {\n /**\n * The list of scopes for which the token will have access.\n */\n scopes: string[];\n /**\n * The options passed to the getToken request.\n */\n getTokenOptions?: GetTokenOptions;\n /**\n * The message of the error.\n */\n message?: string;\n /**\n * The underlying cause, if any, that caused the authentication to fail.\n */\n cause?: unknown;\n}\n\n/**\n * Error used to enforce authentication after trying to retrieve a token silently.\n */\nexport class AuthenticationRequiredError extends Error {\n /**\n * The list of scopes for which the token will have access.\n */\n public scopes: string[];\n /**\n * The options passed to the getToken request.\n */\n public getTokenOptions?: GetTokenOptions;\n\n constructor(\n /**\n * Optional parameters. A message can be specified. The {@link GetTokenOptions} of the request can also be specified to more easily associate the error with the received parameters.\n */\n options: AuthenticationRequiredErrorOptions,\n ) {\n super(options.message, options.cause ? { cause: options.cause } : undefined);\n this.scopes = options.scopes;\n this.getTokenOptions = options.getTokenOptions;\n this.name = \"AuthenticationRequiredError\";\n }\n}\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { GetTokenOptions } from \"@azure/core-auth\";\n\n/**\n * See the official documentation for more details:\n *\n * https://learn.microsoft.com/azure/active-directory/develop/v1-protocols-oauth-code#error-response-1\n *\n * NOTE: This documentation is for v1 OAuth support but the same error\n * response details still apply to v2.\n */\nexport interface ErrorResponse {\n /**\n * The string identifier for the error.\n */\n error: string;\n\n /**\n * The error's description.\n */\n errorDescription: string;\n\n /**\n * An array of codes pertaining to the error(s) that occurred.\n */\n errorCodes?: number[];\n\n /**\n * The timestamp at which the error occurred.\n */\n timestamp?: string;\n\n /**\n * The trace identifier for this error occurrence.\n */\n traceId?: string;\n\n /**\n * The correlation ID to be used for tracking the source of the error.\n */\n correlationId?: string;\n}\n\n/**\n * Used for internal deserialization of OAuth responses. Public model is ErrorResponse\n * @internal\n */\nexport interface OAuthErrorResponse {\n error: string;\n error_description: string;\n error_codes?: number[];\n timestamp?: string;\n trace_id?: string;\n correlation_id?: string;\n}\n\nfunction isErrorResponse(errorResponse: any): errorResponse is OAuthErrorResponse {\n return (\n errorResponse &&\n typeof errorResponse.error === \"string\" &&\n typeof errorResponse.error_description === \"string\"\n );\n}\n\n/**\n * The Error.name value of an CredentialUnavailable\n */\nexport const CredentialUnavailableErrorName = \"CredentialUnavailableError\";\n\n/**\n * This signifies that the credential that was tried in a chained credential\n * was not available to be used as the credential. Rather than treating this as\n * an error that should halt the chain, it's caught and the chain continues\n */\nexport class CredentialUnavailableError extends Error {\n constructor(message?: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = CredentialUnavailableErrorName;\n }\n}\n\n/**\n * The Error.name value of an AuthenticationError\n */\nexport const AuthenticationErrorName = \"AuthenticationError\";\n\n/**\n * Provides details about a failure to authenticate with Azure Active\n * Directory. The `errorResponse` field contains more details about\n * the specific failure.\n */\nexport class AuthenticationError extends Error {\n /**\n * The HTTP status code returned from the authentication request.\n */\n public readonly statusCode: number;\n\n /**\n * The error response details.\n */\n public readonly errorResponse: ErrorResponse;\n\n constructor(\n statusCode: number,\n errorBody: object | string | undefined | null,\n options?: { cause?: unknown },\n ) {\n let errorResponse: ErrorResponse;\n\n if (isErrorResponse(errorBody)) {\n errorResponse = convertOAuthErrorResponseToErrorResponse(errorBody);\n } else if (typeof errorBody === \"string\") {\n try {\n // Most error responses will contain JSON-formatted error details\n // in the response body\n const oauthErrorResponse: OAuthErrorResponse = JSON.parse(errorBody);\n errorResponse = convertOAuthErrorResponseToErrorResponse(oauthErrorResponse);\n } catch (e: any) {\n if (statusCode === 400) {\n errorResponse = {\n error: \"invalid_request\",\n errorDescription: `The service indicated that the request was invalid.\\n\\n${errorBody}`,\n };\n } else {\n errorResponse = {\n error: \"unknown_error\",\n errorDescription: `An unknown error has occurred. Response body:\\n\\n${errorBody}`,\n };\n }\n }\n } else {\n errorResponse = {\n error: \"unknown_error\",\n errorDescription: \"An unknown error occurred and no additional details are available.\",\n };\n }\n\n super(\n `${errorResponse.error} Status code: ${statusCode}\\nMore details:\\n${errorResponse.errorDescription},`,\n options,\n );\n this.statusCode = statusCode;\n this.errorResponse = errorResponse;\n\n // Ensure that this type reports the correct name\n this.name = AuthenticationErrorName;\n }\n}\n\n/**\n * The Error.name value of an AggregateAuthenticationError\n */\nexport const AggregateAuthenticationErrorName = \"AggregateAuthenticationError\";\n\n/**\n * Provides an `errors` array containing {@link AuthenticationError} instance\n * for authentication failures from credentials in a {@link ChainedTokenCredential}.\n */\nexport class AggregateAuthenticationError extends Error {\n /**\n * The array of error objects that were thrown while trying to authenticate\n * with the credentials in a {@link ChainedTokenCredential}.\n */\n public errors: any[];\n\n constructor(errors: any[], errorMessage?: string) {\n const errorDetail = errors.join(\"\\n\");\n super(`${errorMessage}\\n${errorDetail}`);\n this.errors = errors;\n\n // Ensure that this type reports the correct name\n this.name = AggregateAuthenticationErrorName;\n }\n}\n\nfunction convertOAuthErrorResponseToErrorResponse(errorBody: OAuthErrorResponse): ErrorResponse {\n return {\n error: errorBody.error,\n errorDescription: errorBody.error_description,\n correlationId: errorBody.correlation_id,\n errorCodes: errorBody.error_codes,\n timestamp: errorBody.timestamp,\n traceId: errorBody.trace_id,\n };\n}\n\n/**\n * Optional parameters to the {@link AuthenticationRequiredError}\n */\nexport interface AuthenticationRequiredErrorOptions {\n /**\n * The list of scopes for which the token will have access.\n */\n scopes: string[];\n /**\n * The options passed to the getToken request.\n */\n getTokenOptions?: GetTokenOptions;\n /**\n * The message of the error.\n */\n message?: string;\n /**\n * The underlying cause, if any, that caused the authentication to fail.\n */\n cause?: unknown;\n}\n\n/**\n * Error used to enforce authentication after trying to retrieve a token silently.\n */\nexport class AuthenticationRequiredError extends Error {\n /**\n * The list of scopes for which the token will have access.\n */\n public scopes: string[];\n /**\n * The options passed to the getToken request.\n */\n public getTokenOptions?: GetTokenOptions;\n\n constructor(\n /**\n * Optional parameters. A message can be specified. The {@link GetTokenOptions} of the request can also be specified to more easily associate the error with the received parameters.\n */\n options: AuthenticationRequiredErrorOptions,\n ) {\n super(options.message, options.cause ? { cause: options.cause } : undefined);\n this.scopes = options.scopes;\n this.getTokenOptions = options.getTokenOptions;\n this.name = \"AuthenticationRequiredError\";\n }\n}\n"]}