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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (470) hide show
  1. package/dist/browser/client/identityClient.d.ts.map +1 -1
  2. package/dist/browser/client/identityClient.js +2 -1
  3. package/dist/browser/client/identityClient.js.map +1 -1
  4. package/dist/browser/constants.d.ts +1 -1
  5. package/dist/browser/constants.js +1 -1
  6. package/dist/browser/constants.js.map +1 -1
  7. package/dist/browser/credentials/{authorizationCodeCredential.d.ts → authorizationCodeCredential-browser.d.mts} +2 -2
  8. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -1
  9. package/dist/browser/credentials/{authorizationCodeCredential.js → authorizationCodeCredential-browser.mjs} +1 -1
  10. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -1
  11. package/dist/browser/credentials/azureCliCredential-browser.d.mts +14 -0
  12. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -1
  13. package/dist/browser/credentials/{azureCliCredential.js → azureCliCredential-browser.mjs} +2 -2
  14. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -1
  15. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts +14 -0
  16. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -1
  17. package/dist/browser/credentials/{azureDeveloperCliCredential.js → azureDeveloperCliCredential-browser.mjs} +2 -2
  18. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -1
  19. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts +14 -0
  20. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -1
  21. package/dist/browser/credentials/{azurePipelinesCredential.js → azurePipelinesCredential-browser.mjs} +2 -2
  22. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -1
  23. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts +13 -0
  24. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -1
  25. package/dist/browser/credentials/{azurePowerShellCredential.js → azurePowerShellCredential-browser.mjs} +2 -2
  26. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -1
  27. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts +13 -0
  28. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -1
  29. package/dist/browser/credentials/{clientAssertionCredential.js → clientAssertionCredential-browser.mjs} +2 -2
  30. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -1
  31. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts +15 -0
  32. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -1
  33. package/dist/browser/credentials/{clientCertificateCredential.js → clientCertificateCredential-browser.mjs} +2 -2
  34. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -1
  35. package/dist/browser/credentials/{defaultAzureCredential.d.ts → defaultAzureCredential-browser.d.mts} +2 -2
  36. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -1
  37. package/dist/browser/credentials/{defaultAzureCredential.js → defaultAzureCredential-browser.mjs} +1 -1
  38. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -1
  39. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  40. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -1
  41. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts +14 -0
  42. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -1
  43. package/dist/browser/credentials/{deviceCodeCredential.js → deviceCodeCredential-browser.mjs} +2 -2
  44. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -1
  45. package/dist/browser/credentials/environmentCredential-browser.d.mts +14 -0
  46. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -1
  47. package/dist/browser/credentials/{environmentCredential.js → environmentCredential-browser.mjs} +2 -2
  48. package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -1
  49. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts +11 -0
  50. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -1
  51. package/dist/browser/credentials/managedIdentityCredential/{index.js → index-browser.mjs} +2 -2
  52. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -1
  53. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts +13 -0
  54. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -1
  55. package/dist/browser/credentials/{onBehalfOfCredential.js → onBehalfOfCredential-browser.mjs} +2 -2
  56. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -1
  57. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -1
  58. package/dist/browser/credentials/{visualStudioCodeCredential.d.ts → visualStudioCodeCredential-browser.d.mts} +4 -3
  59. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -1
  60. package/dist/browser/credentials/{visualStudioCodeCredential.js → visualStudioCodeCredential-browser.mjs} +2 -2
  61. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -1
  62. package/dist/browser/credentials/{workloadIdentityCredential.d.ts → workloadIdentityCredential-browser.d.mts} +4 -3
  63. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -1
  64. package/dist/browser/credentials/{workloadIdentityCredential.js → workloadIdentityCredential-browser.mjs} +2 -2
  65. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -1
  66. package/dist/browser/index.d.ts +51 -51
  67. package/dist/browser/index.d.ts.map +1 -1
  68. package/dist/browser/index.js +19 -19
  69. package/dist/browser/index.js.map +1 -1
  70. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  71. package/dist/browser/msal/browserFlows/msalBrowserCommon.js +2 -3
  72. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  73. package/dist/browser/msal/msal-browser.d.mts +2 -0
  74. package/dist/browser/msal/msal-browser.d.mts.map +1 -1
  75. package/dist/browser/msal/msal-browser.mjs +4 -0
  76. package/dist/browser/msal/msal-browser.mjs.map +1 -1
  77. package/dist/browser/msal/utils.d.ts +5 -4
  78. package/dist/browser/msal/utils.d.ts.map +1 -1
  79. package/dist/browser/msal/utils.js +16 -11
  80. package/dist/browser/msal/utils.js.map +1 -1
  81. package/dist/browser/util/{processMultiTenantRequest.d.ts → processMultiTenantRequest-browser.d.mts} +2 -1
  82. package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +1 -1
  83. package/dist/browser/util/{processMultiTenantRequest.js → processMultiTenantRequest-browser.mjs} +1 -1
  84. package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +1 -1
  85. package/dist/browser/util/tenantIdUtils.d.ts +1 -1
  86. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -1
  87. package/dist/browser/util/tenantIdUtils.js +1 -1
  88. package/dist/browser/util/tenantIdUtils.js.map +1 -1
  89. package/dist/commonjs/client/identityClient.d.ts.map +1 -1
  90. package/dist/commonjs/client/identityClient.js +295 -288
  91. package/dist/commonjs/client/identityClient.js.map +7 -1
  92. package/dist/commonjs/constants.d.ts +1 -1
  93. package/dist/commonjs/constants.js +61 -78
  94. package/dist/commonjs/constants.js.map +7 -1
  95. package/dist/commonjs/credentials/authorityValidationOptions.js +16 -5
  96. package/dist/commonjs/credentials/authorityValidationOptions.js.map +7 -1
  97. package/dist/commonjs/credentials/authorizationCodeCredential.js +98 -74
  98. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +7 -1
  99. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +16 -5
  100. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +7 -1
  101. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -1
  102. package/dist/commonjs/credentials/azureCliCredential.js +246 -214
  103. package/dist/commonjs/credentials/azureCliCredential.js.map +7 -1
  104. package/dist/commonjs/credentials/azureCliCredentialOptions.js +16 -5
  105. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +7 -1
  106. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts +12 -4
  107. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  108. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +262 -224
  109. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +7 -1
  110. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +16 -5
  111. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +7 -1
  112. package/dist/commonjs/credentials/azurePipelinesCredential.js +173 -135
  113. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +7 -1
  114. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +16 -5
  115. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +7 -1
  116. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -1
  117. package/dist/commonjs/credentials/azurePowerShellCredential.js +205 -205
  118. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +7 -1
  119. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +16 -5
  120. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +7 -1
  121. package/dist/commonjs/credentials/brokerAuthOptions.js +16 -3
  122. package/dist/commonjs/credentials/brokerAuthOptions.js.map +7 -1
  123. package/dist/commonjs/credentials/brokerCredential.js +103 -70
  124. package/dist/commonjs/credentials/brokerCredential.js.map +7 -1
  125. package/dist/commonjs/credentials/browserCustomizationOptions.js +16 -5
  126. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +7 -1
  127. package/dist/commonjs/credentials/chainedTokenCredential.js +113 -93
  128. package/dist/commonjs/credentials/chainedTokenCredential.js.map +7 -1
  129. package/dist/commonjs/credentials/clientAssertionCredential.js +101 -63
  130. package/dist/commonjs/credentials/clientAssertionCredential.js.map +7 -1
  131. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +16 -5
  132. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +7 -1
  133. package/dist/commonjs/credentials/clientCertificateCredential.js +129 -123
  134. package/dist/commonjs/credentials/clientCertificateCredential.js.map +7 -1
  135. package/dist/commonjs/credentials/clientCertificateCredentialModels.js +16 -5
  136. package/dist/commonjs/credentials/clientCertificateCredentialModels.js.map +7 -1
  137. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +16 -5
  138. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +7 -1
  139. package/dist/commonjs/credentials/clientSecretCredential.js +96 -67
  140. package/dist/commonjs/credentials/clientSecretCredential.js.map +7 -1
  141. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +16 -5
  142. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +7 -1
  143. package/dist/commonjs/credentials/credentialPersistenceOptions.js +16 -5
  144. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +7 -1
  145. package/dist/commonjs/credentials/defaultAzureCredential.js +121 -159
  146. package/dist/commonjs/credentials/defaultAzureCredential.js.map +7 -1
  147. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +110 -140
  148. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +7 -1
  149. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  150. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +16 -5
  151. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +7 -1
  152. package/dist/commonjs/credentials/deviceCodeCredential.js +132 -103
  153. package/dist/commonjs/credentials/deviceCodeCredential.js.map +7 -1
  154. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +16 -5
  155. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +7 -1
  156. package/dist/commonjs/credentials/environmentCredential.js +157 -123
  157. package/dist/commonjs/credentials/environmentCredential.js.map +7 -1
  158. package/dist/commonjs/credentials/environmentCredentialOptions.js +16 -5
  159. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +7 -1
  160. package/dist/commonjs/credentials/interactiveBrowserCredential.js +144 -107
  161. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +7 -1
  162. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +16 -5
  163. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +7 -1
  164. package/dist/commonjs/credentials/interactiveCredentialOptions.js +16 -5
  165. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +7 -1
  166. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +92 -91
  167. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +7 -1
  168. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +51 -44
  169. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +7 -1
  170. package/dist/commonjs/credentials/managedIdentityCredential/index.js +256 -242
  171. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +7 -1
  172. package/dist/commonjs/credentials/managedIdentityCredential/models.js +16 -5
  173. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +7 -1
  174. package/dist/commonjs/credentials/managedIdentityCredential/options.js +16 -5
  175. package/dist/commonjs/credentials/managedIdentityCredential/options.js.map +7 -1
  176. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +56 -39
  177. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +7 -1
  178. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +79 -75
  179. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +7 -1
  180. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +16 -5
  181. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +7 -1
  182. package/dist/commonjs/credentials/onBehalfOfCredential.js +168 -126
  183. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +7 -1
  184. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +16 -5
  185. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +7 -1
  186. package/dist/commonjs/credentials/usernamePasswordCredential.js +112 -75
  187. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +7 -1
  188. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +16 -5
  189. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +7 -1
  190. package/dist/commonjs/credentials/visualStudioCodeCredential.js +144 -132
  191. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +7 -1
  192. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +16 -5
  193. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +7 -1
  194. package/dist/commonjs/credentials/workloadIdentityCredential.js +284 -274
  195. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +7 -1
  196. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +16 -5
  197. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +7 -1
  198. package/dist/commonjs/errors.js +131 -132
  199. package/dist/commonjs/errors.js.map +7 -1
  200. package/dist/commonjs/index.d.ts +33 -33
  201. package/dist/commonjs/index.d.ts.map +1 -1
  202. package/dist/commonjs/index.js +115 -67
  203. package/dist/commonjs/index.js.map +7 -1
  204. package/dist/commonjs/msal/msal.d.ts +1 -2
  205. package/dist/commonjs/msal/msal.d.ts.map +1 -1
  206. package/dist/commonjs/msal/msal.js +30 -9
  207. package/dist/commonjs/msal/msal.js.map +7 -1
  208. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +16 -3
  209. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +7 -1
  210. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts +2 -2
  211. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -1
  212. package/dist/commonjs/msal/nodeFlows/msalClient.js +450 -478
  213. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +7 -1
  214. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +140 -147
  215. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +7 -1
  216. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +16 -5
  217. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +7 -1
  218. package/dist/commonjs/msal/types.js +16 -5
  219. package/dist/commonjs/msal/types.js.map +7 -1
  220. package/dist/commonjs/msal/utils.d.ts +5 -4
  221. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  222. package/dist/commonjs/msal/utils.js +176 -211
  223. package/dist/commonjs/msal/utils.js.map +7 -1
  224. package/dist/commonjs/plugins/consumer.js +32 -40
  225. package/dist/commonjs/plugins/consumer.js.map +7 -1
  226. package/dist/commonjs/plugins/provider.js +16 -5
  227. package/dist/commonjs/plugins/provider.js.map +7 -1
  228. package/dist/commonjs/regionalAuthority.js +93 -141
  229. package/dist/commonjs/regionalAuthority.js.map +7 -1
  230. package/dist/commonjs/tokenCredentialOptions.js +16 -5
  231. package/dist/commonjs/tokenCredentialOptions.js.map +7 -1
  232. package/dist/commonjs/tokenProvider.js +52 -52
  233. package/dist/commonjs/tokenProvider.js.map +7 -1
  234. package/dist/commonjs/tsdoc-metadata.json +1 -1
  235. package/dist/commonjs/util/authorityHost.js +34 -19
  236. package/dist/commonjs/util/authorityHost.js.map +7 -1
  237. package/dist/commonjs/util/certificatesUtils.js +54 -45
  238. package/dist/commonjs/util/certificatesUtils.js.map +7 -1
  239. package/dist/commonjs/util/identityTokenEndpoint.js +32 -12
  240. package/dist/commonjs/util/identityTokenEndpoint.js.map +7 -1
  241. package/dist/commonjs/util/logging.js +91 -97
  242. package/dist/commonjs/util/logging.js.map +7 -1
  243. package/dist/commonjs/util/processMultiTenantRequest.js +43 -33
  244. package/dist/commonjs/util/processMultiTenantRequest.js.map +7 -1
  245. package/dist/commonjs/util/processUtils.js +60 -35
  246. package/dist/commonjs/util/processUtils.js.map +7 -1
  247. package/dist/commonjs/util/scopeUtils.js +39 -28
  248. package/dist/commonjs/util/scopeUtils.js.map +7 -1
  249. package/dist/commonjs/util/subscriptionUtils.js +35 -17
  250. package/dist/commonjs/util/subscriptionUtils.js.map +7 -1
  251. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -1
  252. package/dist/commonjs/util/tenantIdUtils.js +61 -45
  253. package/dist/commonjs/util/tenantIdUtils.js.map +7 -1
  254. package/dist/commonjs/util/tracing.js +33 -16
  255. package/dist/commonjs/util/tracing.js.map +7 -1
  256. package/dist/esm/client/identityClient.d.ts.map +1 -1
  257. package/dist/esm/client/identityClient.js +2 -1
  258. package/dist/esm/client/identityClient.js.map +1 -1
  259. package/dist/esm/constants.d.ts +1 -1
  260. package/dist/esm/constants.js +1 -1
  261. package/dist/esm/constants.js.map +1 -1
  262. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -1
  263. package/dist/esm/credentials/azureCliCredential.js +2 -1
  264. package/dist/esm/credentials/azureCliCredential.js.map +1 -1
  265. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts +12 -4
  266. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  267. package/dist/esm/credentials/azureDeveloperCliCredential.js +40 -14
  268. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -1
  269. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -1
  270. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -1
  271. package/dist/esm/credentials/azurePowerShellCredential.js +2 -1
  272. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -1
  273. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -1
  274. package/dist/esm/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  275. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  276. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -1
  277. package/dist/esm/credentials/environmentCredential.js.map +1 -1
  278. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  279. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -1
  280. package/dist/esm/index.d.ts +33 -33
  281. package/dist/esm/index.d.ts.map +1 -1
  282. package/dist/esm/index.js.map +1 -1
  283. package/dist/esm/msal/msal.d.ts +1 -2
  284. package/dist/esm/msal/msal.d.ts.map +1 -1
  285. package/dist/esm/msal/msal.js +1 -2
  286. package/dist/esm/msal/msal.js.map +1 -1
  287. package/dist/esm/msal/nodeFlows/msalClient.d.ts +2 -2
  288. package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -1
  289. package/dist/esm/msal/nodeFlows/msalClient.js +3 -3
  290. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -1
  291. package/dist/esm/msal/utils.d.ts +5 -4
  292. package/dist/esm/msal/utils.d.ts.map +1 -1
  293. package/dist/esm/msal/utils.js +16 -11
  294. package/dist/esm/msal/utils.js.map +1 -1
  295. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -1
  296. package/dist/esm/util/tenantIdUtils.js.map +1 -1
  297. package/dist/workerd/client/identityClient.d.ts.map +1 -1
  298. package/dist/workerd/client/identityClient.js +2 -1
  299. package/dist/workerd/client/identityClient.js.map +1 -1
  300. package/dist/workerd/constants.d.ts +1 -1
  301. package/dist/workerd/constants.js +1 -1
  302. package/dist/workerd/constants.js.map +1 -1
  303. package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -1
  304. package/dist/workerd/credentials/azureCliCredential.js +2 -1
  305. package/dist/workerd/credentials/azureCliCredential.js.map +1 -1
  306. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts +12 -4
  307. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  308. package/dist/workerd/credentials/azureDeveloperCliCredential.js +40 -14
  309. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -1
  310. package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -1
  311. package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -1
  312. package/dist/workerd/credentials/azurePowerShellCredential.js +2 -1
  313. package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -1
  314. package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -1
  315. package/dist/workerd/credentials/defaultAzureCredentialFunctions.js.map +1 -1
  316. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  317. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -1
  318. package/dist/workerd/credentials/environmentCredential.js.map +1 -1
  319. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  320. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -1
  321. package/dist/workerd/index.d.ts +33 -33
  322. package/dist/workerd/index.d.ts.map +1 -1
  323. package/dist/workerd/index.js.map +1 -1
  324. package/dist/workerd/msal/msal.d.ts +1 -2
  325. package/dist/workerd/msal/msal.d.ts.map +1 -1
  326. package/dist/workerd/msal/msal.js +1 -2
  327. package/dist/workerd/msal/msal.js.map +1 -1
  328. package/dist/workerd/msal/nodeFlows/msalClient.d.ts +2 -2
  329. package/dist/workerd/msal/nodeFlows/msalClient.d.ts.map +1 -1
  330. package/dist/workerd/msal/nodeFlows/msalClient.js +3 -3
  331. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -1
  332. package/dist/workerd/msal/utils.d.ts +5 -4
  333. package/dist/workerd/msal/utils.d.ts.map +1 -1
  334. package/dist/workerd/msal/utils.js +16 -11
  335. package/dist/workerd/msal/utils.js.map +1 -1
  336. package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -1
  337. package/dist/workerd/util/tenantIdUtils.js.map +1 -1
  338. package/package.json +29 -36
  339. package/dist/browser/credentials/azureCliCredential.d.ts +0 -13
  340. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +0 -13
  341. package/dist/browser/credentials/azurePipelinesCredential.d.ts +0 -13
  342. package/dist/browser/credentials/azurePowerShellCredential.d.ts +0 -12
  343. package/dist/browser/credentials/brokerCredential.d.ts +0 -35
  344. package/dist/browser/credentials/brokerCredential.d.ts.map +0 -1
  345. package/dist/browser/credentials/brokerCredential.js +0 -68
  346. package/dist/browser/credentials/brokerCredential.js.map +0 -1
  347. package/dist/browser/credentials/clientAssertionCredential.d.ts +0 -12
  348. package/dist/browser/credentials/clientCertificateCredential.d.ts +0 -13
  349. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts +0 -64
  350. package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts.map +0 -1
  351. package/dist/browser/credentials/defaultAzureCredentialFunctions.js +0 -147
  352. package/dist/browser/credentials/defaultAzureCredentialFunctions.js.map +0 -1
  353. package/dist/browser/credentials/deviceCodeCredential.d.ts +0 -13
  354. package/dist/browser/credentials/environmentCredential.d.ts +0 -13
  355. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +0 -18
  356. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +0 -1
  357. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +0 -97
  358. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  359. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +0 -13
  360. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +0 -1
  361. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -43
  362. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  363. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +0 -6
  364. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +0 -24
  365. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +0 -1
  366. package/dist/browser/credentials/managedIdentityCredential/models.js +0 -4
  367. package/dist/browser/credentials/managedIdentityCredential/models.js.map +0 -1
  368. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +0 -14
  369. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +0 -1
  370. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -38
  371. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  372. package/dist/browser/credentials/onBehalfOfCredential.d.ts +0 -12
  373. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  374. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  375. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  376. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  377. package/dist/browser/msal/msal.d.ts +0 -3
  378. package/dist/browser/msal/msal.js +0 -5
  379. package/dist/browser/msal/nodeFlows/msalClient.d.ts +0 -205
  380. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +0 -1
  381. package/dist/browser/msal/nodeFlows/msalClient.js +0 -499
  382. package/dist/browser/msal/nodeFlows/msalClient.js.map +0 -1
  383. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +0 -109
  384. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +0 -1
  385. package/dist/browser/msal/nodeFlows/msalPlugins.js +0 -160
  386. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +0 -1
  387. package/dist/browser/regionalAuthority.d.ts +0 -122
  388. package/dist/browser/regionalAuthority.d.ts.map +0 -1
  389. package/dist/browser/regionalAuthority.js +0 -139
  390. package/dist/browser/regionalAuthority.js.map +0 -1
  391. package/dist/browser/util/authHostEnv-browser.d.mts +0 -4
  392. package/dist/browser/util/authHostEnv-browser.d.mts.map +0 -1
  393. package/dist/browser/util/authHostEnv-browser.mjs +0 -7
  394. package/dist/browser/util/authHostEnv-browser.mjs.map +0 -1
  395. package/dist/browser/util/certificatesUtils.d.ts +0 -13
  396. package/dist/browser/util/certificatesUtils.d.ts.map +0 -1
  397. package/dist/browser/util/certificatesUtils.js +0 -47
  398. package/dist/browser/util/certificatesUtils.js.map +0 -1
  399. package/dist/browser/util/processUtils.d.ts +0 -13
  400. package/dist/browser/util/processUtils.d.ts.map +0 -1
  401. package/dist/browser/util/processUtils.js +0 -32
  402. package/dist/browser/util/processUtils.js.map +0 -1
  403. package/dist/browser/util/subscriptionUtils.d.ts +0 -6
  404. package/dist/browser/util/subscriptionUtils.d.ts.map +0 -1
  405. package/dist/browser/util/subscriptionUtils.js +0 -16
  406. package/dist/browser/util/subscriptionUtils.js.map +0 -1
  407. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  408. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  409. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +0 -5
  410. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  411. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  412. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  413. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +0 -265
  414. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  415. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  416. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  417. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +0 -5
  418. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  419. package/dist/commonjs/msal/credentials.d.ts +0 -52
  420. package/dist/commonjs/msal/credentials.d.ts.map +0 -1
  421. package/dist/commonjs/msal/credentials.js +0 -5
  422. package/dist/commonjs/msal/credentials.js.map +0 -1
  423. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  424. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  425. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  426. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  427. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  428. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  429. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +0 -261
  430. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  431. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  432. package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  433. package/dist/esm/msal/browserFlows/msalBrowserOptions.js +0 -4
  434. package/dist/esm/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  435. package/dist/esm/msal/credentials.d.ts +0 -52
  436. package/dist/esm/msal/credentials.d.ts.map +0 -1
  437. package/dist/esm/msal/credentials.js +0 -4
  438. package/dist/esm/msal/credentials.js.map +0 -1
  439. package/dist/esm/util/authHostEnv-browser.d.mts +0 -4
  440. package/dist/esm/util/authHostEnv-browser.d.mts.map +0 -1
  441. package/dist/esm/util/authHostEnv-browser.mjs +0 -7
  442. package/dist/esm/util/authHostEnv-browser.mjs.map +0 -1
  443. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +0 -12
  444. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +0 -1
  445. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +0 -4
  446. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
  447. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +0 -19
  448. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +0 -1
  449. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +0 -261
  450. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  451. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +0 -87
  452. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +0 -1
  453. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +0 -4
  454. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +0 -1
  455. package/dist/workerd/msal/credentials.d.ts +0 -52
  456. package/dist/workerd/msal/credentials.d.ts.map +0 -1
  457. package/dist/workerd/msal/credentials.js +0 -4
  458. package/dist/workerd/msal/credentials.js.map +0 -1
  459. package/dist/workerd/util/authHostEnv-browser.d.mts +0 -4
  460. package/dist/workerd/util/authHostEnv-browser.d.mts.map +0 -1
  461. package/dist/workerd/util/authHostEnv-browser.mjs +0 -7
  462. package/dist/workerd/util/authHostEnv-browser.mjs.map +0 -1
  463. /package/dist/browser/credentials/{clientSecretCredential.d.ts → clientSecretCredential-browser.d.mts} +0 -0
  464. /package/dist/browser/credentials/{clientSecretCredential.js → clientSecretCredential-browser.mjs} +0 -0
  465. /package/dist/browser/credentials/{interactiveBrowserCredential.d.ts → interactiveBrowserCredential-browser.d.mts} +0 -0
  466. /package/dist/browser/credentials/{interactiveBrowserCredential.js → interactiveBrowserCredential-browser.mjs} +0 -0
  467. /package/dist/browser/credentials/{usernamePasswordCredential.d.ts → usernamePasswordCredential-browser.d.mts} +0 -0
  468. /package/dist/browser/credentials/{usernamePasswordCredential.js → usernamePasswordCredential-browser.mjs} +0 -0
  469. /package/dist/browser/plugins/{consumer.d.ts → consumer-browser.d.mts} +0 -0
  470. /package/dist/browser/plugins/{consumer.js → consumer-browser.mjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"identityClient.d.ts","sourceRoot":"","sources":["../../../src/client/identityClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAM/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAgB3E;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5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,MAAM,GAAG,eAAe;IAe3D,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAgB3C,gBAAgB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM;IAUnD,mBAAmB,CAAC,CAAC,EACzB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAqBxB,oBAAoB,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAsB9B;;;OAGG;IACH,yBAAyB,IAAI,sBAAsB;IAGnD;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,cAAc;IA8BtB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CA2C1B"}
@@ -2,6 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { ServiceClient } from "@azure/core-client";
4
4
  import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
5
+ import { uint8ArrayToString, stringToUint8Array } from "@azure/core-util";
5
6
  import { AuthenticationError, AuthenticationErrorName } from "../errors.js";
6
7
  import { getIdentityTokenEndpointSuffix } from "../util/identityTokenEndpoint.js";
7
8
  import { SDK_VERSION } from "../constants.js";
@@ -242,7 +243,7 @@ export class IdentityClient extends ServiceClient {
242
243
  return;
243
244
  }
244
245
  const base64Metadata = accessToken.split(".")[1];
245
- const { appid, upn, tid, oid } = JSON.parse(Buffer.from(base64Metadata, "base64").toString("utf8"));
246
+ const { appid, upn, tid, oid } = JSON.parse(uint8ArrayToString(stringToUint8Array(base64Metadata, "base64url"), "utf-8"));
246
247
  logger.info(`[Authenticated account] Client ID: ${appid}. Tenant ID: ${tid}. User Principal Name: ${upn || unavailableUpn}. Object ID (user): ${oid}`);
247
248
  }
248
249
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"identityClient.js","sourceRo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BAC5B,GAAG,sBAAsB,iBAAiB;gBAC1C,qBAAqB,QAAQ,CAAC,MAAM,EAAE;gBACtC,wBAAwB,QAAQ,CAAC,UAAU,IAAI,SAAS,EAAE;gBAC1D,YAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;aAC/C,CAAC;YACF,UAAU,GAAG;gBACX,KAAK,EAAE,SAAS;gBAChB,iBAAiB,EAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;aACpD,CAAC;QACJ,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { INetworkModule, NetworkRequestOptions, NetworkResponse } from \"@azure/msal-node\";\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport type { PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport { AuthenticationError, AuthenticationErrorName } from \"../errors.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport { logger } from \"../util/logging.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\nimport type { TokenResponseParsedBody } from \"../credentials/managedIdentityCredential/utils.js\";\nimport {\n parseExpirationTimestamp,\n parseRefreshTimestamp,\n} from \"../credentials/managedIdentityCredential/utils.js\";\nimport { getAuthorityHost } from \"../util/authorityHost.js\";\n\nconst noCorrelationId = \"noCorrelationId\";\nconst HttpStatus = {\n CLIENT_ERROR_RANGE_START: 400,\n CLIENT_ERROR_RANGE_END: 499,\n SERVER_ERROR_RANGE_START: 500,\n SERVER_ERROR_RANGE_END: 599,\n};\n\n/**\n * An internal type used to communicate details of a token request's\n * response that should not be sent back as part of the access token.\n */\nexport interface TokenResponse {\n /**\n * The AccessToken to be returned from getToken.\n */\n accessToken: AccessToken;\n /**\n * The refresh token if the 'offline_access' scope was used.\n */\n refreshToken?: string;\n}\n\n/**\n * The network module used by the Identity credentials.\n *\n * It allows for credentials to abort any pending request independently of the MSAL flow,\n * by calling to the `abortRequests()` method.\n *\n */\nexport class IdentityClient extends ServiceClient implements INetworkModule {\n public authorityHost: string;\n private allowLoggingAccountIdentifiers?: boolean;\n private abortControllers: Map<string, AbortController[] | undefined>;\n private allowInsecureConnection: boolean = false;\n // used for WorkloadIdentity\n private tokenCredentialOptions: TokenCredentialOptions;\n\n constructor(options?: TokenCredentialOptions) {\n const packageDetails = `azsdk-js-identity/${SDK_VERSION}`;\n const userAgentPrefix = options?.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const baseUri = getAuthorityHost(options);\n if (!baseUri.startsWith(\"https:\")) {\n throw new Error(\"The authorityHost address must use the 'https' protocol.\");\n }\n\n super({\n requestContentType: \"application/json; charset=utf-8\",\n retryOptions: {\n maxRetries: 3,\n },\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n baseUri,\n });\n\n this.authorityHost = baseUri;\n this.abortControllers = new Map();\n this.allowLoggingAccountIdentifiers = options?.loggingOptions?.allowLoggingAccountIdentifiers;\n // used for WorkloadIdentity\n this.tokenCredentialOptions = { ...options };\n\n // used for ManagedIdentity\n if (options?.allowInsecureConnection) {\n this.allowInsecureConnection = options.allowInsecureConnection;\n }\n }\n\n async sendTokenRequest(request: PipelineRequest): Promise<TokenResponse | null> {\n logger.info(`IdentityClient: sending token request to [${request.url}]`);\n const response = await this.sendRequest(request);\n if (response.bodyAsText && (response.status === 200 || response.status === 201)) {\n const parsedBody: TokenResponseParsedBody = JSON.parse(response.bodyAsText);\n\n if (!parsedBody.access_token) {\n return null;\n }\n\n this.logIdentifiers(response);\n\n const token = {\n accessToken: {\n token: parsedBody.access_token,\n expiresOnTimestamp: parseExpirationTimestamp(parsedBody),\n refreshAfterTimestamp: parseRefreshTimestamp(parsedBody),\n tokenType: \"Bearer\",\n } as AccessToken,\n refreshToken: parsedBody.refresh_token,\n };\n\n logger.info(\n `IdentityClient: [${request.url}] token acquired, expires on ${token.accessToken.expiresOnTimestamp}`,\n );\n return token;\n } else {\n const error = new AuthenticationError(response.status, response.bodyAsText);\n logger.warning(\n `IdentityClient: authentication error. HTTP status: ${response.status}, ${error.errorResponse.errorDescription}`,\n );\n throw error;\n }\n }\n\n async refreshAccessToken(\n tenantId: string,\n clientId: string,\n scopes: string,\n refreshToken: string | undefined,\n clientSecret: string | undefined,\n options: GetTokenOptions = {},\n ): Promise<TokenResponse | null> {\n if (refreshToken === undefined) {\n return null;\n }\n logger.info(\n `IdentityClient: refreshing access token with client ID: ${clientId}, scopes: ${scopes} started`,\n );\n\n const refreshParams = {\n grant_type: \"refresh_token\",\n client_id: clientId,\n refresh_token: refreshToken,\n scope: scopes,\n };\n\n if (clientSecret !== undefined) {\n (refreshParams as any).client_secret = clientSecret;\n }\n\n const query = new URLSearchParams(refreshParams);\n\n return tracingClient.withSpan(\n \"IdentityClient.refreshAccessToken\",\n options,\n async (updatedOptions) => {\n try {\n const urlSuffix = getIdentityTokenEndpointSuffix(tenantId);\n const request = createPipelineRequest({\n url: `${this.authorityHost}/${tenantId}/${urlSuffix}`,\n method: \"POST\",\n body: query.toString(),\n abortSignal: options.abortSignal,\n headers: createHttpHeaders({\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n }),\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n const response = await this.sendTokenRequest(request);\n logger.info(`IdentityClient: refreshed token for client ID: ${clientId}`);\n return response;\n } catch (err: any) {\n if (\n err.name === AuthenticationErrorName &&\n err.errorResponse.error === \"interaction_required\"\n ) {\n // It's likely that the refresh token has expired, so\n // return null so that the credential implementation will\n // initiate the authentication flow again.\n logger.info(`IdentityClient: interaction required for client ID: ${clientId}`);\n return null;\n } else {\n logger.warning(\n `IdentityClient: failed refreshing token for client ID: ${clientId}: ${err}`,\n );\n throw err;\n }\n }\n },\n );\n }\n\n // Here is a custom layer that allows us to abort requests that go through MSAL,\n // since MSAL doesn't allow us to pass options all the way through.\n\n generateAbortSignal(correlationId: string): AbortSignalLike {\n const controller = new AbortController();\n const controllers = this.abortControllers.get(correlationId) || [];\n controllers.push(controller);\n this.abortControllers.set(correlationId, controllers);\n const existingOnAbort = controller.signal.onabort;\n controller.signal.onabort = (...params) => {\n this.abortControllers.set(correlationId, undefined);\n if (existingOnAbort) {\n existingOnAbort.apply(controller.signal, params);\n }\n };\n return controller.signal;\n }\n\n abortRequests(correlationId?: string): void {\n const key = correlationId || noCorrelationId;\n const controllers = [\n ...(this.abortControllers.get(key) || []),\n // MSAL passes no correlation ID to the get requests...\n ...(this.abortControllers.get(noCorrelationId) || []),\n ];\n if (!controllers.length) {\n return;\n }\n for (const controller of controllers) {\n controller.abort();\n }\n this.abortControllers.set(key, undefined);\n }\n\n getCorrelationId(options?: NetworkRequestOptions): string {\n const parameter = options?.body\n ?.split(\"&\")\n .map((part) => part.split(\"=\"))\n .find(([key]) => key === \"client-request-id\");\n return parameter && parameter.length ? parameter[1] || noCorrelationId : noCorrelationId;\n }\n\n // The MSAL network module methods follow\n\n async sendGetRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"GET\",\n body: options?.body,\n allowInsecureConnection: this.allowInsecureConnection,\n headers: createHttpHeaders(options?.headers),\n abortSignal: this.generateAbortSignal(noCorrelationId),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n async sendPostRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"POST\",\n body: options?.body,\n headers: createHttpHeaders(options?.headers),\n allowInsecureConnection: this.allowInsecureConnection,\n // MSAL doesn't send the correlation ID on the get requests.\n abortSignal: this.generateAbortSignal(this.getCorrelationId(options)),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n /**\n *\n * @internal\n */\n getTokenCredentialOptions(): TokenCredentialOptions {\n return this.tokenCredentialOptions;\n }\n /**\n * If allowLoggingAccountIdentifiers was set on the constructor options\n * we try to log the account identifiers by parsing the received access token.\n *\n * The account identifiers we try to log are:\n * - `appid`: The application or Client Identifier.\n * - `upn`: User Principal Name.\n * - It might not be available in some authentication scenarios.\n * - If it's not available, we put a placeholder: \"No User Principal Name available\".\n * - `tid`: Tenant Identifier.\n * - `oid`: Object Identifier of the authenticated user.\n */\n private logIdentifiers(response: PipelineResponse): void {\n if (!this.allowLoggingAccountIdentifiers || !response.bodyAsText) {\n return;\n }\n const unavailableUpn = \"No User Principal Name available\";\n try {\n const parsed = (response as any).parsedBody || JSON.parse(response.bodyAsText);\n const accessToken = parsed.access_token;\n if (!accessToken) {\n // Without an access token allowLoggingAccountIdentifiers isn't useful.\n return;\n }\n const base64Metadata = accessToken.split(\".\")[1];\n const { appid, upn, tid, oid } = JSON.parse(\n Buffer.from(base64Metadata, \"base64\").toString(\"utf8\"),\n );\n\n logger.info(\n `[Authenticated account] Client ID: ${appid}. Tenant ID: ${tid}. User Principal Name: ${\n upn || unavailableUpn\n }. Object ID (user): ${oid}`,\n );\n } catch (e: any) {\n logger.warning(\n \"allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:\",\n e.message,\n );\n }\n }\n\n /**\n * Parses the response body if possible. Add error properties if parsing fails.\n * This follows MSAL INetworkModule behavior so the response is in expected format.\n */\n private parseResponseBody(response: PipelineResponse) {\n let parsedBody: {};\n try {\n parsedBody = JSON.parse(response.bodyAsText || \"\");\n } catch (error) {\n logger.info(`IdentityClient: Could not parse response body: ${error}`);\n let errorType;\n let errorDescriptionHelper;\n /**\n * Determine error type based on status code ranges following MSAL patterns:\n * Client error responses (400 – 499)\n * Server error responses (500 – 599)\n */\n if (\n response.status >= HttpStatus.CLIENT_ERROR_RANGE_START &&\n response.status <= HttpStatus.CLIENT_ERROR_RANGE_END\n ) {\n errorType = \"client_error\";\n errorDescriptionHelper = \"A client\";\n } else if (\n response.status >= HttpStatus.SERVER_ERROR_RANGE_START &&\n response.status <= HttpStatus.SERVER_ERROR_RANGE_END\n ) {\n errorType = \"server_error\";\n errorDescriptionHelper = \"A server\";\n } else {\n errorType = \"unknown_error\";\n errorDescriptionHelper = \"An unknown\";\n }\n\n const errorDescriptionLines = [\n `${errorDescriptionHelper} error occured.`,\n `Http status code: ${response.status}`,\n `Http status message: ${response.bodyAsText || \"Unknown\"}`,\n `Headers: ${JSON.stringify(response.headers)}`,\n ];\n parsedBody = {\n error: errorType,\n error_description: errorDescriptionLines.join(\"\\n\"),\n };\n }\n return parsedBody;\n }\n}\n"]}
1
+ {"version":3,"file":"identityClient.js","sourceRoot":"","sources":["../../../src/client/identityClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,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equestOptions, NetworkResponse } from \"@azure/msal-node\";\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport type { PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport { uint8ArrayToString, stringToUint8Array } from \"@azure/core-util\";\nimport { AuthenticationError, AuthenticationErrorName } from \"../errors.js\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint.js\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport { logger } from \"../util/logging.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\nimport type { TokenResponseParsedBody } from \"../credentials/managedIdentityCredential/utils.js\";\nimport {\n parseExpirationTimestamp,\n parseRefreshTimestamp,\n} from \"../credentials/managedIdentityCredential/utils.js\";\nimport { getAuthorityHost } from \"../util/authorityHost.js\";\n\nconst noCorrelationId = \"noCorrelationId\";\nconst HttpStatus = {\n CLIENT_ERROR_RANGE_START: 400,\n CLIENT_ERROR_RANGE_END: 499,\n SERVER_ERROR_RANGE_START: 500,\n SERVER_ERROR_RANGE_END: 599,\n};\n\n/**\n * An internal type used to communicate details of a token request's\n * response that should not be sent back as part of the access token.\n */\nexport interface TokenResponse {\n /**\n * The AccessToken to be returned from getToken.\n */\n accessToken: AccessToken;\n /**\n * The refresh token if the 'offline_access' scope was used.\n */\n refreshToken?: string;\n}\n\n/**\n * The network module used by the Identity credentials.\n *\n * It allows for credentials to abort any pending request independently of the MSAL flow,\n * by calling to the `abortRequests()` method.\n *\n */\nexport class IdentityClient extends ServiceClient implements INetworkModule {\n public authorityHost: string;\n private allowLoggingAccountIdentifiers?: boolean;\n private abortControllers: Map<string, AbortController[] | undefined>;\n private allowInsecureConnection: boolean = false;\n // used for WorkloadIdentity\n private tokenCredentialOptions: TokenCredentialOptions;\n\n constructor(options?: TokenCredentialOptions) {\n const packageDetails = `azsdk-js-identity/${SDK_VERSION}`;\n const userAgentPrefix = options?.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const baseUri = getAuthorityHost(options);\n if (!baseUri.startsWith(\"https:\")) {\n throw new Error(\"The authorityHost address must use the 'https' protocol.\");\n }\n\n super({\n requestContentType: \"application/json; charset=utf-8\",\n retryOptions: {\n maxRetries: 3,\n },\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n baseUri,\n });\n\n this.authorityHost = baseUri;\n this.abortControllers = new Map();\n this.allowLoggingAccountIdentifiers = options?.loggingOptions?.allowLoggingAccountIdentifiers;\n // used for WorkloadIdentity\n this.tokenCredentialOptions = { ...options };\n\n // used for ManagedIdentity\n if (options?.allowInsecureConnection) {\n this.allowInsecureConnection = options.allowInsecureConnection;\n }\n }\n\n async sendTokenRequest(request: PipelineRequest): Promise<TokenResponse | null> {\n logger.info(`IdentityClient: sending token request to [${request.url}]`);\n const response = await this.sendRequest(request);\n if (response.bodyAsText && (response.status === 200 || response.status === 201)) {\n const parsedBody: TokenResponseParsedBody = JSON.parse(response.bodyAsText);\n\n if (!parsedBody.access_token) {\n return null;\n }\n\n this.logIdentifiers(response);\n\n const token = {\n accessToken: {\n token: parsedBody.access_token,\n expiresOnTimestamp: parseExpirationTimestamp(parsedBody),\n refreshAfterTimestamp: parseRefreshTimestamp(parsedBody),\n tokenType: \"Bearer\",\n } as AccessToken,\n refreshToken: parsedBody.refresh_token,\n };\n\n logger.info(\n `IdentityClient: [${request.url}] token acquired, expires on ${token.accessToken.expiresOnTimestamp}`,\n );\n return token;\n } else {\n const error = new AuthenticationError(response.status, response.bodyAsText);\n logger.warning(\n `IdentityClient: authentication error. HTTP status: ${response.status}, ${error.errorResponse.errorDescription}`,\n );\n throw error;\n }\n }\n\n async refreshAccessToken(\n tenantId: string,\n clientId: string,\n scopes: string,\n refreshToken: string | undefined,\n clientSecret: string | undefined,\n options: GetTokenOptions = {},\n ): Promise<TokenResponse | null> {\n if (refreshToken === undefined) {\n return null;\n }\n logger.info(\n `IdentityClient: refreshing access token with client ID: ${clientId}, scopes: ${scopes} started`,\n );\n\n const refreshParams = {\n grant_type: \"refresh_token\",\n client_id: clientId,\n refresh_token: refreshToken,\n scope: scopes,\n };\n\n if (clientSecret !== undefined) {\n (refreshParams as any).client_secret = clientSecret;\n }\n\n const query = new URLSearchParams(refreshParams);\n\n return tracingClient.withSpan(\n \"IdentityClient.refreshAccessToken\",\n options,\n async (updatedOptions) => {\n try {\n const urlSuffix = getIdentityTokenEndpointSuffix(tenantId);\n const request = createPipelineRequest({\n url: `${this.authorityHost}/${tenantId}/${urlSuffix}`,\n method: \"POST\",\n body: query.toString(),\n abortSignal: options.abortSignal,\n headers: createHttpHeaders({\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n }),\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n const response = await this.sendTokenRequest(request);\n logger.info(`IdentityClient: refreshed token for client ID: ${clientId}`);\n return response;\n } catch (err: any) {\n if (\n err.name === AuthenticationErrorName &&\n err.errorResponse.error === \"interaction_required\"\n ) {\n // It's likely that the refresh token has expired, so\n // return null so that the credential implementation will\n // initiate the authentication flow again.\n logger.info(`IdentityClient: interaction required for client ID: ${clientId}`);\n return null;\n } else {\n logger.warning(\n `IdentityClient: failed refreshing token for client ID: ${clientId}: ${err}`,\n );\n throw err;\n }\n }\n },\n );\n }\n\n // Here is a custom layer that allows us to abort requests that go through MSAL,\n // since MSAL doesn't allow us to pass options all the way through.\n\n generateAbortSignal(correlationId: string): AbortSignalLike {\n const controller = new AbortController();\n const controllers = this.abortControllers.get(correlationId) || [];\n controllers.push(controller);\n this.abortControllers.set(correlationId, controllers);\n const existingOnAbort = controller.signal.onabort;\n controller.signal.onabort = (...params) => {\n this.abortControllers.set(correlationId, undefined);\n if (existingOnAbort) {\n existingOnAbort.apply(controller.signal, params);\n }\n };\n return controller.signal;\n }\n\n abortRequests(correlationId?: string): void {\n const key = correlationId || noCorrelationId;\n const controllers = [\n ...(this.abortControllers.get(key) || []),\n // MSAL passes no correlation ID to the get requests...\n ...(this.abortControllers.get(noCorrelationId) || []),\n ];\n if (!controllers.length) {\n return;\n }\n for (const controller of controllers) {\n controller.abort();\n }\n this.abortControllers.set(key, undefined);\n }\n\n getCorrelationId(options?: NetworkRequestOptions): string {\n const parameter = options?.body\n ?.split(\"&\")\n .map((part) => part.split(\"=\"))\n .find(([key]) => key === \"client-request-id\");\n return parameter && parameter.length ? parameter[1] || noCorrelationId : noCorrelationId;\n }\n\n // The MSAL network module methods follow\n\n async sendGetRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"GET\",\n body: options?.body,\n allowInsecureConnection: this.allowInsecureConnection,\n headers: createHttpHeaders(options?.headers),\n abortSignal: this.generateAbortSignal(noCorrelationId),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n async sendPostRequestAsync<T>(\n url: string,\n options?: NetworkRequestOptions,\n ): Promise<NetworkResponse<T>> {\n const request = createPipelineRequest({\n url,\n method: \"POST\",\n body: options?.body,\n headers: createHttpHeaders(options?.headers),\n allowInsecureConnection: this.allowInsecureConnection,\n // MSAL doesn't send the correlation ID on the get requests.\n abortSignal: this.generateAbortSignal(this.getCorrelationId(options)),\n });\n\n const response = await this.sendRequest(request);\n\n this.logIdentifiers(response);\n\n return {\n body: this.parseResponseBody(response) as T,\n headers: response.headers.toJSON(),\n status: response.status,\n };\n }\n\n /**\n *\n * @internal\n */\n getTokenCredentialOptions(): TokenCredentialOptions {\n return this.tokenCredentialOptions;\n }\n /**\n * If allowLoggingAccountIdentifiers was set on the constructor options\n * we try to log the account identifiers by parsing the received access token.\n *\n * The account identifiers we try to log are:\n * - `appid`: The application or Client Identifier.\n * - `upn`: User Principal Name.\n * - It might not be available in some authentication scenarios.\n * - If it's not available, we put a placeholder: \"No User Principal Name available\".\n * - `tid`: Tenant Identifier.\n * - `oid`: Object Identifier of the authenticated user.\n */\n private logIdentifiers(response: PipelineResponse): void {\n if (!this.allowLoggingAccountIdentifiers || !response.bodyAsText) {\n return;\n }\n const unavailableUpn = \"No User Principal Name available\";\n try {\n const parsed = (response as any).parsedBody || JSON.parse(response.bodyAsText);\n const accessToken = parsed.access_token;\n if (!accessToken) {\n // Without an access token allowLoggingAccountIdentifiers isn't useful.\n return;\n }\n const base64Metadata = accessToken.split(\".\")[1];\n const { appid, upn, tid, oid } = JSON.parse(\n uint8ArrayToString(stringToUint8Array(base64Metadata, \"base64url\"), \"utf-8\"),\n );\n\n logger.info(\n `[Authenticated account] Client ID: ${appid}. Tenant ID: ${tid}. User Principal Name: ${\n upn || unavailableUpn\n }. Object ID (user): ${oid}`,\n );\n } catch (e: any) {\n logger.warning(\n \"allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:\",\n e.message,\n );\n }\n }\n\n /**\n * Parses the response body if possible. Add error properties if parsing fails.\n * This follows MSAL INetworkModule behavior so the response is in expected format.\n */\n private parseResponseBody(response: PipelineResponse) {\n let parsedBody: {};\n try {\n parsedBody = JSON.parse(response.bodyAsText || \"\");\n } catch (error) {\n logger.info(`IdentityClient: Could not parse response body: ${error}`);\n let errorType;\n let errorDescriptionHelper;\n /**\n * Determine error type based on status code ranges following MSAL patterns:\n * Client error responses (400 – 499)\n * Server error responses (500 – 599)\n */\n if (\n response.status >= HttpStatus.CLIENT_ERROR_RANGE_START &&\n response.status <= HttpStatus.CLIENT_ERROR_RANGE_END\n ) {\n errorType = \"client_error\";\n errorDescriptionHelper = \"A client\";\n } else if (\n response.status >= HttpStatus.SERVER_ERROR_RANGE_START &&\n response.status <= HttpStatus.SERVER_ERROR_RANGE_END\n ) {\n errorType = \"server_error\";\n errorDescriptionHelper = \"A server\";\n } else {\n errorType = \"unknown_error\";\n errorDescriptionHelper = \"An unknown\";\n }\n\n const errorDescriptionLines = [\n `${errorDescriptionHelper} error occured.`,\n `Http status code: ${response.status}`,\n `Http status message: ${response.bodyAsText || \"Unknown\"}`,\n `Headers: ${JSON.stringify(response.headers)}`,\n ];\n parsedBody = {\n error: errorType,\n error_description: errorDescriptionLines.join(\"\\n\"),\n };\n }\n return parsedBody;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Current version of the `@azure/identity` package.
3
3
  */
4
- export declare const SDK_VERSION = "4.14.0-beta.2";
4
+ export declare const SDK_VERSION = "4.14.0-beta.4";
5
5
  /**
6
6
  * The default client ID for authentication
7
7
  * @internal
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Current version of the `@azure/identity` package.
5
5
  */
6
- export const SDK_VERSION = `4.14.0-beta.2`;
6
+ export const SDK_VERSION = `4.14.0-beta.4`;
7
7
  /**
8
8
  * The default client ID for authentication
9
9
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.14.0-beta.2`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.14.0-beta.4`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
@@ -1,4 +1,4 @@
1
- import type { AccessToken, TokenCredential } from "@azure/core-auth";
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
2
  import type { AuthorizationCodeCredentialOptions } from "./authorizationCodeCredentialOptions.js";
3
3
  export declare class AuthorizationCodeCredential implements TokenCredential {
4
4
  /**
@@ -6,6 +6,6 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
6
6
  */
7
7
  constructor(tenantId: string | "common", clientId: string, clientSecret: string, authorizationCode: string, redirectUri: string, options?: AuthorizationCodeCredentialOptions);
8
8
  constructor(tenantId: string | "common", clientId: string, authorizationCode: string, redirectUri: string, options?: AuthorizationCodeCredentialOptions);
9
- getToken(): Promise<AccessToken | null>;
9
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
10
10
  }
11
11
  //# sourceMappingURL=authorizationCodeCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorizationCodeCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/authorizationCodeCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAOlG,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBAED,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAC3B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kCAAkC;gBAG5C,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAC3B,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kCAAkC;IAOvC,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
1
+ {"version":3,"file":"authorizationCodeCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/authorizationCodeCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAOlG,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBAED,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAC3B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kCAAkC;gBAG5C,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAC3B,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kCAAkC;IAOvC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -8,7 +8,7 @@ export class AuthorizationCodeCredential {
8
8
  logger.info(formatError("", BrowserNotSupportedError));
9
9
  throw BrowserNotSupportedError;
10
10
  }
11
- getToken() {
11
+ getToken(_scopes, _options) {
12
12
  logger.getToken.info(formatError("", BrowserNotSupportedError));
13
13
  throw BrowserNotSupportedError;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"authorizationCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/authorizationCodeCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,kIAAkI,CACnI,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D,MAAM,OAAO,2BAA2B;IAmBtC;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ;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\";\nimport type { AuthorizationCodeCredentialOptions } from \"./authorizationCodeCredentialOptions.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AuthorizationCodeCredential is not supported in the browser. InteractiveBrowserCredential is more appropriate for this use case.\",\n);\nconst logger = credentialLogger(\"AuthorizationCodeCredential\");\n\nexport class AuthorizationCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n tenantId: string | \"common\",\n clientId: string,\n clientSecret: string,\n authorizationCode: string,\n redirectUri: string,\n options?: AuthorizationCodeCredentialOptions,\n );\n constructor(\n tenantId: string | \"common\",\n clientId: string,\n authorizationCode: string,\n redirectUri: string,\n options?: AuthorizationCodeCredentialOptions,\n );\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
1
+ {"version":3,"file":"authorizationCodeCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/authorizationCodeCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,kIAAkI,CACnI,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D,MAAM,OAAO,2BAA2B;IAmBtC;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\nimport type { AuthorizationCodeCredentialOptions } from \"./authorizationCodeCredentialOptions.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AuthorizationCodeCredential is not supported in the browser. InteractiveBrowserCredential is more appropriate for this use case.\",\n);\nconst logger = credentialLogger(\"AuthorizationCodeCredential\");\n\nexport class AuthorizationCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n tenantId: string | \"common\",\n clientId: string,\n clientSecret: string,\n authorizationCode: string,\n redirectUri: string,\n options?: AuthorizationCodeCredentialOptions,\n );\n constructor(\n tenantId: string | \"common\",\n clientId: string,\n authorizationCode: string,\n redirectUri: string,\n options?: AuthorizationCodeCredentialOptions,\n );\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { AzureCliCredentialOptions } from "./azureCliCredentialOptions.js";
3
+ /**
4
+ * This credential will use the currently logged-in user login information
5
+ * via the Azure CLI ('az') commandline tool.
6
+ */
7
+ export declare class AzureCliCredential implements TokenCredential {
8
+ /**
9
+ * Only available in Node.js
10
+ */
11
+ constructor(_options?: AzureCliCredentialOptions);
12
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
+ }
14
+ //# sourceMappingURL=azureCliCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"azureCliCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azureCliCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMrE;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD;;OAEG;;IAMH,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAIxC"}
1
+ {"version":3,"file":"azureCliCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azureCliCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAMhF;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD;;OAEG;gBACS,QAAQ,CAAC,EAAE,yBAAyB;IAKhD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -11,11 +11,11 @@ export class AzureCliCredential {
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":"azureCliCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azureCliCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAClG,MAAM,MAAM,GAAG,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACH;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(\"AzureCliCredential is not supported in the browser.\");\nconst logger = credentialLogger(\"AzureCliCredential\");\n\n/**\n * This credential will use the currently logged-in user login information\n * via the Azure CLI ('az') commandline tool.\n */\nexport class AzureCliCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\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":"azureCliCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azureCliCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAClG,MAAM,MAAM,GAAG,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACH,YAAY,QAAoC;QAC9C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzureCliCredentialOptions } from \"./azureCliCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\"AzureCliCredential is not supported in the browser.\");\nconst logger = credentialLogger(\"AzureCliCredential\");\n\n/**\n * This credential will use the currently logged-in user login information\n * via the Azure CLI ('az') commandline tool.\n */\nexport class AzureCliCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: AzureCliCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { AzureDeveloperCliCredentialOptions } from "./azureDeveloperCliCredentialOptions.js";
3
+ /**
4
+ * This credential will use the currently logged-in user login information
5
+ * via the Azure Developer CLI ('azd') commandline tool.
6
+ */
7
+ export declare class AzureDeveloperCliCredential implements TokenCredential {
8
+ /**
9
+ * Only available in Node.js
10
+ */
11
+ constructor(_options?: AzureDeveloperCliCredentialOptions);
12
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
+ }
14
+ //# sourceMappingURL=azureDeveloperCliCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"azureDeveloperCliCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;;IAMH,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAIxC"}
1
+ {"version":3,"file":"azureDeveloperCliCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAQlG;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBACS,QAAQ,CAAC,EAAE,kCAAkC;IAKzD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -11,11 +11,11 @@ export class AzureDeveloperCliCredential {
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":"azureDeveloperCliCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential-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,8DAA8D,CAC/D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACtC;;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 \"AzureDeveloperCliCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzureDeveloperCliCredential\");\n\n/**\n * This credential will use the currently logged-in user login information\n * via the Azure Developer CLI ('azd') commandline tool.\n */\nexport class AzureDeveloperCliCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\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":"azureDeveloperCliCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,8DAA8D,CAC/D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACtC;;OAEG;IACH,YAAY,QAA6C;QACvD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzureDeveloperCliCredentialOptions } from \"./azureDeveloperCliCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AzureDeveloperCliCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzureDeveloperCliCredential\");\n\n/**\n * This credential will use the currently logged-in user login information\n * via the Azure Developer CLI ('azd') commandline tool.\n */\nexport class AzureDeveloperCliCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: AzureDeveloperCliCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { AzurePipelinesCredentialOptions } from "./azurePipelinesCredentialOptions.js";
3
+ /**
4
+ * Enables authentication to Microsoft Entra ID using a PEM-encoded
5
+ * certificate that is assigned to an App Registration.
6
+ */
7
+ export declare class AzurePipelinesCredential implements TokenCredential {
8
+ /**
9
+ * Only available in Node.js
10
+ */
11
+ constructor(_tenantId: string, _clientId: string, _serviceConnectionId: string, _systemAccessToken: string, _options?: AzurePipelinesCredentialOptions);
12
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
13
+ }
14
+ //# sourceMappingURL=azurePipelinesCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"azurePipelinesCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,eAAe;IAC9D;;OAEG;;IAMI,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
1
+ {"version":3,"file":"azurePipelinesCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAQ5F;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,eAAe;IAC9D;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,CAAC,EAAE,+BAA+B;IAMrC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -11,11 +11,11 @@ export class AzurePipelinesCredential {
11
11
  /**
12
12
  * Only available in Node.js
13
13
  */
14
- constructor() {
14
+ constructor(_tenantId, _clientId, _serviceConnectionId, _systemAccessToken, _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":"azurePipelinesCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential-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,2DAA2D,CAC5D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IACnC;;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 \"AzurePipelinesCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzurePipelinesCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration.\n */\nexport class AzurePipelinesCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n 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":"azurePipelinesCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,2DAA2D,CAC5D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IACnC;;OAEG;IACH,YACE,SAAiB,EACjB,SAAiB,EACjB,oBAA4B,EAC5B,kBAA0B,EAC1B,QAA0C;QAE1C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzurePipelinesCredentialOptions } from \"./azurePipelinesCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AzurePipelinesCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzurePipelinesCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration.\n */\nexport class AzurePipelinesCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n _tenantId: string,\n _clientId: string,\n _serviceConnectionId: string,\n _systemAccessToken: string,\n _options?: AzurePipelinesCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { AzurePowerShellCredentialOptions } from "./azurePowerShellCredentialOptions.js";
3
+ /**
4
+ * This credential will use the currently-logged-in user's login information via the Azure Power Shell command line tool.
5
+ */
6
+ export declare class AzurePowerShellCredential implements TokenCredential {
7
+ /**
8
+ * Only available in Node.js
9
+ */
10
+ constructor(_options?: AzurePowerShellCredentialOptions);
11
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
12
+ }
13
+ //# sourceMappingURL=azurePowerShellCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"azurePowerShellCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D;;OAEG;;IAMH,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAIxC"}
1
+ {"version":3,"file":"azurePowerShellCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAQ9F;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D;;OAEG;gBACS,QAAQ,CAAC,EAAE,gCAAgC;IAKvD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI9F"}
@@ -10,11 +10,11 @@ export class AzurePowerShellCredential {
10
10
  /**
11
11
  * Only available in Node.js
12
12
  */
13
- constructor() {
13
+ constructor(_options) {
14
14
  logger.info(formatError("", BrowserNotSupportedError));
15
15
  throw BrowserNotSupportedError;
16
16
  }
17
- getToken() {
17
+ getToken(_scopes, _options) {
18
18
  logger.getToken.info(formatError("", BrowserNotSupportedError));
19
19
  throw BrowserNotSupportedError;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"azurePowerShellCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential-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,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACpC;;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 \"AzurePowerShellCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzurePowerShellCredential\");\n\n/**\n * This credential will use the currently-logged-in user's login information via the Azure Power Shell command line tool.\n */\nexport class AzurePowerShellCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\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":"azurePowerShellCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/azurePowerShellCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACpC;;OAEG;IACH,YAAY,QAA2C;QACrD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { AzurePowerShellCredentialOptions } from \"./azurePowerShellCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"AzurePowerShellCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"AzurePowerShellCredential\");\n\n/**\n * This credential will use the currently-logged-in user's login information via the Azure Power Shell command line tool.\n */\nexport class AzurePowerShellCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(_options?: AzurePowerShellCredentialOptions) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { ClientAssertionCredentialOptions } from "./clientAssertionCredentialOptions.js";
3
+ /**
4
+ * Authenticates a service principal with a JWT assertion.
5
+ */
6
+ export declare class ClientAssertionCredential implements TokenCredential {
7
+ /**
8
+ * Only available in Node.js
9
+ */
10
+ constructor(_tenantId: string, _clientId: string, _getAssertion: () => Promise<string>, _options?: ClientAssertionCredentialOptions);
11
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
12
+ }
13
+ //# sourceMappingURL=clientAssertionCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientAssertionCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientAssertionCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D;;OAEG;;IAMI,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
1
+ {"version":3,"file":"clientAssertionCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientAssertionCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAQ9F;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAC/D;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACpC,QAAQ,CAAC,EAAE,gCAAgC;IAMtC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -10,11 +10,11 @@ export class ClientAssertionCredential {
10
10
  /**
11
11
  * Only available in Node.js
12
12
  */
13
- constructor() {
13
+ constructor(_tenantId, _clientId, _getAssertion, _options) {
14
14
  logger.info(formatError("", BrowserNotSupportedError));
15
15
  throw BrowserNotSupportedError;
16
16
  }
17
- getToken() {
17
+ getToken(_scopes, _options) {
18
18
  logger.getToken.info(formatError("", BrowserNotSupportedError));
19
19
  throw BrowserNotSupportedError;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"clientAssertionCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientAssertionCredential-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,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACpC;;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 \"ClientAssertionCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ClientAssertionCredential\");\n\n/**\n * Authenticates a service principal with a JWT assertion.\n */\nexport class ClientAssertionCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n 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":"clientAssertionCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientAssertionCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,4DAA4D,CAC7D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACpC;;OAEG;IACH,YACE,SAAiB,EACjB,SAAiB,EACjB,aAAoC,EACpC,QAA2C;QAE3C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { ClientAssertionCredentialOptions } from \"./clientAssertionCredentialOptions.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"ClientAssertionCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ClientAssertionCredential\");\n\n/**\n * Authenticates a service principal with a JWT assertion.\n */\nexport class ClientAssertionCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n _tenantId: string,\n _clientId: string,\n _getAssertion: () => Promise<string>,\n _options?: ClientAssertionCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { ClientCertificateCredentialOptions } from "./clientCertificateCredentialOptions.js";
3
+ import type { ClientCertificateCredentialPEMConfiguration } from "./clientCertificateCredentialModels.js";
4
+ /**
5
+ * Enables authentication to Microsoft Entra ID using a PEM-encoded
6
+ * certificate that is assigned to an App Registration.
7
+ */
8
+ export declare class ClientCertificateCredential implements TokenCredential {
9
+ /**
10
+ * Only available in Node.js
11
+ */
12
+ constructor(_tenantId: string, _clientId: string, _certificatePathOrConfiguration: string | ClientCertificateCredentialPEMConfiguration, _options?: ClientCertificateCredentialOptions);
13
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null>;
14
+ }
15
+ //# sourceMappingURL=clientCertificateCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientCertificateCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQrE;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;;IAMI,QAAQ,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/C"}
1
+ {"version":3,"file":"clientCertificateCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,wCAAwC,CAAC;AAQ1G;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,+BAA+B,EAAE,MAAM,GAAG,2CAA2C,EACrF,QAAQ,CAAC,EAAE,kCAAkC;IAMxC,QAAQ,CACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAI/B"}
@@ -11,11 +11,11 @@ export class ClientCertificateCredential {
11
11
  /**
12
12
  * Only available in Node.js
13
13
  */
14
- constructor() {
14
+ constructor(_tenantId, _clientId, _certificatePathOrConfiguration, _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":"clientCertificateCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential-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,8DAA8D,CAC/D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACtC;;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 \"ClientCertificateCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ClientCertificateCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration.\n */\nexport class ClientCertificateCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n 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":"clientCertificateCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,8DAA8D,CAC/D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACtC;;OAEG;IACH,YACE,SAAiB,EACjB,SAAiB,EACjB,+BAAqF,EACrF,QAA6C;QAE7C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CACb,OAA0B,EAC1B,QAA0B;QAE1B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { ClientCertificateCredentialOptions } from \"./clientCertificateCredentialOptions.js\";\nimport type { ClientCertificateCredentialPEMConfiguration } from \"./clientCertificateCredentialModels.js\";\nimport { credentialLogger, formatError } from \"../util/logging.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"ClientCertificateCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"ClientCertificateCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration.\n */\nexport class ClientCertificateCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor(\n _tenantId: string,\n _clientId: string,\n _certificatePathOrConfiguration: string | ClientCertificateCredentialPEMConfiguration,\n _options?: ClientCertificateCredentialOptions,\n ) {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { AccessToken } from "@azure/core-auth";
1
+ import type { AccessToken, GetTokenOptions } from "@azure/core-auth";
2
2
  import { ChainedTokenCredential } from "./chainedTokenCredential.js";
3
3
  import type { TokenCredentialOptions } from "../tokenCredentialOptions.js";
4
4
  /**
@@ -14,6 +14,6 @@ export declare class DefaultAzureCredential extends ChainedTokenCredential {
14
14
  * @param options - Options for configuring the client which makes the authentication request.
15
15
  */
16
16
  constructor(_tokenCredentialOptions?: TokenCredentialOptions);
17
- getToken(): Promise<AccessToken>;
17
+ getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken>;
18
18
  }
19
19
  //# sourceMappingURL=defaultAzureCredential-browser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultAzureCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential-browser.mts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAO3E;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;IAChE;;;;OAIG;gBACS,uBAAuB,CAAC,EAAE,sBAAsB;IAMrD,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;CAIxC"}
1
+ {"version":3,"file":"defaultAzureCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential-browser.mts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAO3E;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;IAChE;;;;OAIG;gBACS,uBAAuB,CAAC,EAAE,sBAAsB;IAMrD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CAI9F"}
@@ -21,7 +21,7 @@ export class DefaultAzureCredential extends ChainedTokenCredential {
21
21
  logger.info(formatError("", BrowserNotSupportedError));
22
22
  throw BrowserNotSupportedError;
23
23
  }
24
- getToken() {
24
+ getToken(_scopes, _options) {
25
25
  logger.getToken.info(formatError("", BrowserNotSupportedError));
26
26
  throw BrowserNotSupportedError;
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"defaultAzureCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,mGAAmG,CACpG,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,sBAAuB,SAAQ,sBAAsB;IAChE;;;;OAIG;IACH,YAAY,uBAAgD;QAC1D,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ;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 { credentialLogger, formatError } from \"../util/logging.js\";\nimport type { AccessToken } from \"@azure/core-auth\";\nimport { ChainedTokenCredential } from \"./chainedTokenCredential.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"DefaultAzureCredential is not supported in the browser. Use InteractiveBrowserCredential instead.\",\n);\nconst logger = credentialLogger(\"DefaultAzureCredential\");\n\n/**\n * Provides a default {@link ChainedTokenCredential} configuration for\n * applications that will be deployed to Azure.\n *\n * Only available in Node.js.\n */\nexport class DefaultAzureCredential extends ChainedTokenCredential {\n /**\n * Creates an instance of the DefaultAzureCredential class.\n *\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(_tokenCredentialOptions?: TokenCredentialOptions) {\n super();\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(): Promise<AccessToken> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
1
+ {"version":3,"file":"defaultAzureCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,mGAAmG,CACpG,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,sBAAuB,SAAQ,sBAAsB;IAChE;;;;OAIG;IACH,YAAY,uBAAgD;QAC1D,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ,CAAC,OAA0B,EAAE,QAA0B;QACpE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { credentialLogger, formatError } from \"../util/logging.js\";\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport { ChainedTokenCredential } from \"./chainedTokenCredential.js\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\n\nconst BrowserNotSupportedError = new Error(\n \"DefaultAzureCredential is not supported in the browser. Use InteractiveBrowserCredential instead.\",\n);\nconst logger = credentialLogger(\"DefaultAzureCredential\");\n\n/**\n * Provides a default {@link ChainedTokenCredential} configuration for\n * applications that will be deployed to Azure.\n *\n * Only available in Node.js.\n */\nexport class DefaultAzureCredential extends ChainedTokenCredential {\n /**\n * Creates an instance of the DefaultAzureCredential class.\n *\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(_tokenCredentialOptions?: TokenCredentialOptions) {\n super();\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -44,8 +44,8 @@ export interface DefaultAzureCredentialOptions extends MultiTenantTokenCredentia
44
44
  */
45
45
  tenantId?: string;
46
46
  /**
47
- * Timeout configurable for making token requests for developer credentials, namely, {@link AzurePowershellCredential},
48
- * {@link AzureDeveloperCliCredential} and {@link AzureCliCredential}.
47
+ * Timeout configurable for making token requests for developer credentials, namely, {@link AzurePowerShellCredential},
48
+ * {@link AzureDeveloperCliCredential}, and {@link AzureCliCredential}.
49
49
  * Process timeout for credentials should be provided in milliseconds.
50
50
  */
51
51
  processTimeoutInMs?: number;