@azure/identity 4.5.1-alpha.20241112.1 → 4.5.1-alpha.20241114.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1066) hide show
  1. package/dist/browser/client/identityClient.d.ts +65 -0
  2. package/dist/browser/client/identityClient.d.ts.map +1 -0
  3. package/dist/browser/client/identityClient.js +248 -0
  4. package/dist/browser/client/identityClient.js.map +1 -0
  5. package/dist/browser/constants.d.ts +64 -0
  6. package/dist/browser/constants.d.ts.map +1 -0
  7. package/dist/browser/credentials/authorityValidationOptions.d.ts +16 -0
  8. package/dist/browser/credentials/authorityValidationOptions.d.ts.map +1 -0
  9. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -0
  10. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -0
  11. package/dist/browser/credentials/authorizationCodeCredential.d.ts +11 -0
  12. package/dist/browser/credentials/authorizationCodeCredential.js +16 -0
  13. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  14. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  15. package/dist/browser/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  16. package/dist/browser/credentials/azureApplicationCredential-browser.d.mts.map +1 -0
  17. package/dist/browser/credentials/azureApplicationCredential-browser.mjs.map +1 -0
  18. package/dist/browser/credentials/azureApplicationCredential.d.ts +24 -0
  19. package/dist/browser/credentials/azureApplicationCredential.js +34 -0
  20. package/dist/browser/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  21. package/dist/browser/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  22. package/dist/browser/credentials/azureApplicationCredentialOptions.js.map +1 -0
  23. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -0
  24. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -0
  25. package/dist/browser/credentials/azureCliCredential.d.ts +13 -0
  26. package/dist/browser/credentials/azureCliCredential.js +23 -0
  27. package/dist/browser/credentials/azureCliCredentialOptions.d.ts +20 -0
  28. package/dist/browser/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  29. package/dist/browser/credentials/azureCliCredentialOptions.js.map +1 -0
  30. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -0
  31. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -0
  32. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +13 -0
  33. package/dist/browser/credentials/azureDeveloperCliCredential.js +23 -0
  34. package/dist/browser/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  35. package/dist/browser/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  36. package/dist/browser/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  37. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -0
  38. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -0
  39. package/dist/browser/credentials/azurePipelinesCredential.d.ts +13 -0
  40. package/dist/browser/credentials/azurePipelinesCredential.js +23 -0
  41. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  42. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  43. package/dist/browser/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  44. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -0
  45. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -0
  46. package/dist/browser/credentials/azurePowerShellCredential.d.ts +12 -0
  47. package/dist/browser/credentials/azurePowerShellCredential.js +22 -0
  48. package/dist/browser/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  49. package/dist/browser/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  50. package/dist/browser/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  51. package/dist/browser/credentials/brokerAuthOptions.d.ts +13 -0
  52. package/dist/browser/credentials/brokerAuthOptions.d.ts.map +1 -0
  53. package/dist/browser/credentials/brokerAuthOptions.js.map +1 -0
  54. package/dist/browser/credentials/browserCustomizationOptions.d.ts +19 -0
  55. package/dist/browser/credentials/browserCustomizationOptions.d.ts.map +1 -0
  56. package/dist/browser/credentials/chainedTokenCredential.d.ts +49 -0
  57. package/dist/browser/credentials/chainedTokenCredential.d.ts.map +1 -0
  58. package/dist/browser/credentials/chainedTokenCredential.js +90 -0
  59. package/dist/browser/credentials/chainedTokenCredential.js.map +1 -0
  60. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -0
  61. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -0
  62. package/dist/browser/credentials/clientAssertionCredential.d.ts +12 -0
  63. package/dist/browser/credentials/clientAssertionCredential.js +22 -0
  64. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  65. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  66. package/dist/browser/credentials/clientAssertionCredentialOptions.js.map +1 -0
  67. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -0
  68. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -0
  69. package/dist/browser/credentials/clientCertificateCredential.d.ts +13 -0
  70. package/dist/browser/credentials/clientCertificateCredential.js +23 -0
  71. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  72. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  73. package/dist/browser/credentials/clientCertificateCredentialOptions.js.map +1 -0
  74. package/dist/browser/credentials/clientSecretCredential-browser.d.mts.map +1 -0
  75. package/dist/browser/credentials/clientSecretCredential-browser.mjs.map +1 -0
  76. package/dist/browser/credentials/clientSecretCredential.d.ts +40 -0
  77. package/dist/browser/credentials/clientSecretCredential.js +83 -0
  78. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts +9 -0
  79. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  80. package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -0
  81. package/dist/browser/credentials/credentialPersistenceOptions.d.ts +29 -0
  82. package/dist/browser/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  83. package/dist/browser/credentials/credentialPersistenceOptions.js.map +1 -0
  84. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -0
  85. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -0
  86. package/dist/browser/credentials/defaultAzureCredential.d.ts +19 -0
  87. package/dist/browser/credentials/defaultAzureCredential.js +29 -0
  88. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  89. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  90. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -0
  91. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -0
  92. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -0
  93. package/dist/browser/credentials/deviceCodeCredential.d.ts +13 -0
  94. package/dist/browser/credentials/deviceCodeCredential.js +23 -0
  95. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  96. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  97. package/dist/browser/credentials/deviceCodeCredentialOptions.js.map +1 -0
  98. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -0
  99. package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -0
  100. package/dist/browser/credentials/environmentCredential.d.ts +13 -0
  101. package/dist/browser/credentials/environmentCredential.js +23 -0
  102. package/dist/browser/credentials/environmentCredentialOptions.d.ts +9 -0
  103. package/dist/browser/credentials/environmentCredentialOptions.d.ts.map +1 -0
  104. package/dist/browser/credentials/environmentCredentialOptions.js.map +1 -0
  105. package/dist/browser/credentials/interactiveBrowserCredential-browser.d.mts.map +1 -0
  106. package/dist/browser/credentials/interactiveBrowserCredential-browser.mjs.map +1 -0
  107. package/dist/browser/credentials/interactiveBrowserCredential.d.ts +53 -0
  108. package/dist/browser/credentials/interactiveBrowserCredential.js +86 -0
  109. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  110. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  111. package/dist/browser/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  112. package/dist/browser/credentials/interactiveCredentialOptions.d.ts +25 -0
  113. package/dist/browser/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  114. package/dist/browser/credentials/interactiveCredentialOptions.js.map +1 -0
  115. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  116. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  117. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +122 -0
  118. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  119. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  120. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  121. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  122. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -0
  123. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -0
  124. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +6 -0
  125. package/dist/browser/credentials/managedIdentityCredential/index.js +16 -0
  126. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +24 -0
  127. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  128. package/dist/browser/credentials/managedIdentityCredential/models.js.map +1 -0
  129. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  130. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  131. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
  132. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  133. package/dist/browser/credentials/managedIdentityCredential/utils.d.ts +33 -0
  134. package/dist/browser/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  135. package/dist/browser/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  136. package/dist/browser/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  137. package/dist/browser/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  138. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -0
  139. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -0
  140. package/dist/browser/credentials/onBehalfOfCredential.d.ts +12 -0
  141. package/dist/browser/credentials/onBehalfOfCredential.js +23 -0
  142. package/dist/browser/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  143. package/dist/browser/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  144. package/dist/browser/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  145. package/dist/browser/credentials/usernamePasswordCredential-browser.d.mts.map +1 -0
  146. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -0
  147. package/dist/browser/credentials/usernamePasswordCredential.d.ts +40 -0
  148. package/dist/browser/credentials/usernamePasswordCredential.js +77 -0
  149. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
  150. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  151. package/dist/browser/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  152. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -0
  153. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -0
  154. package/dist/browser/credentials/visualStudioCodeCredential.d.ts +15 -0
  155. package/dist/browser/credentials/visualStudioCodeCredential.js +27 -0
  156. package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
  157. package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  158. package/dist/browser/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  159. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
  160. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  161. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -0
  162. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -0
  163. package/dist/browser/credentials/workloadIdentityCredential.d.ts +17 -0
  164. package/dist/browser/credentials/workloadIdentityCredential.js +27 -0
  165. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  166. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  167. package/dist/browser/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  168. package/dist/browser/errors.d.ts +139 -0
  169. package/dist/browser/errors.d.ts.map +1 -0
  170. package/dist/browser/index.d.ts +59 -0
  171. package/dist/browser/index.d.ts.map +1 -0
  172. package/dist/browser/index.js +34 -0
  173. package/dist/browser/index.js.map +1 -0
  174. package/dist/browser/msal/browserFlows/flows.d.ts +42 -0
  175. package/dist/browser/msal/browserFlows/flows.d.ts.map +1 -0
  176. package/dist/browser/msal/browserFlows/flows.js.map +1 -0
  177. package/dist/browser/msal/browserFlows/msalAuthCode.d.ts +50 -0
  178. package/dist/browser/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
  179. package/dist/browser/msal/browserFlows/msalAuthCode.js +203 -0
  180. package/dist/browser/msal/browserFlows/msalAuthCode.js.map +1 -0
  181. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
  182. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  183. package/dist/browser/msal/browserFlows/msalBrowserCommon.js +116 -0
  184. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  185. package/dist/browser/msal/credentials.d.ts +52 -0
  186. package/dist/browser/msal/credentials.d.ts.map +1 -0
  187. package/dist/browser/msal/credentials.js.map +1 -0
  188. package/dist/browser/msal/msal-browser.d.mts.map +1 -0
  189. package/dist/browser/msal/msal-browser.mjs.map +1 -0
  190. package/dist/browser/msal/msal.d.ts +3 -0
  191. package/dist/browser/msal/msal.js +5 -0
  192. package/dist/browser/msal/nodeFlows/brokerOptions.d.ts +44 -0
  193. package/dist/browser/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  194. package/dist/browser/msal/nodeFlows/msalClient.d.ts +186 -0
  195. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +1 -0
  196. package/dist/browser/msal/nodeFlows/msalClient.js +477 -0
  197. package/dist/browser/msal/nodeFlows/msalClient.js.map +1 -0
  198. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +91 -0
  199. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  200. package/dist/browser/msal/nodeFlows/msalPlugins.js +87 -0
  201. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +1 -0
  202. package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  203. package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  204. package/dist/browser/msal/types.d.ts +87 -0
  205. package/dist/browser/msal/types.d.ts.map +1 -0
  206. package/dist/browser/msal/utils.d.ts +95 -0
  207. package/dist/browser/msal/utils.d.ts.map +1 -0
  208. package/dist/browser/msal/utils.js +232 -0
  209. package/dist/browser/msal/utils.js.map +1 -0
  210. package/dist/browser/package.json +3 -0
  211. package/dist/browser/plugins/consumer-browser.d.mts.map +1 -0
  212. package/dist/browser/plugins/consumer-browser.mjs.map +1 -0
  213. package/dist/browser/plugins/consumer.d.ts +2 -0
  214. package/dist/browser/plugins/consumer.js +7 -0
  215. package/dist/browser/plugins/provider.d.ts +36 -0
  216. package/dist/browser/plugins/provider.d.ts.map +1 -0
  217. package/dist/browser/plugins/provider.js.map +1 -0
  218. package/dist/browser/regionalAuthority.d.ts +122 -0
  219. package/dist/browser/regionalAuthority.d.ts.map +1 -0
  220. package/dist/browser/tokenCredentialOptions.d.ts +28 -0
  221. package/dist/browser/tokenCredentialOptions.d.ts.map +1 -0
  222. package/dist/browser/tokenProvider.d.ts +38 -0
  223. package/dist/browser/tokenProvider.d.ts.map +1 -0
  224. package/dist/browser/util/authHostEnv-browser.d.mts +4 -0
  225. package/dist/browser/util/authHostEnv-browser.d.mts.map +1 -0
  226. package/dist/browser/util/authHostEnv-browser.mjs +7 -0
  227. package/dist/browser/util/authHostEnv-browser.mjs.map +1 -0
  228. package/dist/browser/util/identityTokenEndpoint.d.ts +2 -0
  229. package/dist/browser/util/identityTokenEndpoint.d.ts.map +1 -0
  230. package/dist/browser/util/logging.d.ts +70 -0
  231. package/dist/browser/util/logging.d.ts.map +1 -0
  232. package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +1 -0
  233. package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +1 -0
  234. package/dist/browser/util/processMultiTenantRequest.d.ts +9 -0
  235. package/dist/browser/util/processMultiTenantRequest.js +29 -0
  236. package/dist/browser/util/processUtils.d.ts +13 -0
  237. package/dist/browser/util/processUtils.d.ts.map +1 -0
  238. package/dist/browser/util/scopeUtils.d.ts +17 -0
  239. package/dist/browser/util/scopeUtils.d.ts.map +1 -0
  240. package/dist/browser/util/scopeUtils.js +29 -0
  241. package/dist/browser/util/scopeUtils.js.map +1 -0
  242. package/dist/browser/util/subscriptionUtils.d.ts +6 -0
  243. package/dist/browser/util/subscriptionUtils.d.ts.map +1 -0
  244. package/dist/browser/util/subscriptionUtils.js +14 -0
  245. package/dist/browser/util/subscriptionUtils.js.map +1 -0
  246. package/dist/browser/util/tenantIdUtils.d.ts +15 -0
  247. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -0
  248. package/dist/browser/util/tenantIdUtils.js +44 -0
  249. package/dist/browser/util/tenantIdUtils.js.map +1 -0
  250. package/dist/browser/util/tracing.d.ts +6 -0
  251. package/dist/browser/util/tracing.d.ts.map +1 -0
  252. package/dist/browser/util/tracing.js +14 -0
  253. package/dist/browser/util/tracing.js.map +1 -0
  254. package/dist/commonjs/client/identityClient.d.ts +65 -0
  255. package/dist/commonjs/client/identityClient.d.ts.map +1 -0
  256. package/dist/commonjs/client/identityClient.js +253 -0
  257. package/dist/commonjs/client/identityClient.js.map +1 -0
  258. package/dist/commonjs/constants.d.ts +64 -0
  259. package/dist/commonjs/constants.d.ts.map +1 -0
  260. package/dist/commonjs/constants.js +73 -0
  261. package/dist/commonjs/constants.js.map +1 -0
  262. package/dist/commonjs/credentials/authorityValidationOptions.d.ts +16 -0
  263. package/dist/commonjs/credentials/authorityValidationOptions.d.ts.map +1 -0
  264. package/dist/commonjs/credentials/authorityValidationOptions.js +5 -0
  265. package/dist/commonjs/credentials/authorityValidationOptions.js.map +1 -0
  266. package/dist/commonjs/credentials/authorizationCodeCredential.d.ts +73 -0
  267. package/dist/commonjs/credentials/authorizationCodeCredential.d.ts.map +1 -0
  268. package/dist/commonjs/credentials/authorizationCodeCredential.js +64 -0
  269. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +1 -0
  270. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  271. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  272. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +5 -0
  273. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  274. package/dist/commonjs/credentials/azureApplicationCredential.d.ts +24 -0
  275. package/dist/commonjs/credentials/azureApplicationCredential.d.ts.map +1 -0
  276. package/dist/commonjs/credentials/azureApplicationCredential.js +36 -0
  277. package/dist/commonjs/credentials/azureApplicationCredential.js.map +1 -0
  278. package/dist/commonjs/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  279. package/dist/commonjs/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  280. package/dist/commonjs/credentials/azureApplicationCredentialOptions.js +5 -0
  281. package/dist/commonjs/credentials/azureApplicationCredentialOptions.js.map +1 -0
  282. package/dist/commonjs/credentials/azureCliCredential.d.ts +64 -0
  283. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -0
  284. package/dist/commonjs/credentials/azureCliCredential.js +194 -0
  285. package/dist/commonjs/credentials/azureCliCredential.js.map +1 -0
  286. package/dist/commonjs/credentials/azureCliCredentialOptions.d.ts +20 -0
  287. package/dist/commonjs/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  288. package/dist/commonjs/credentials/azureCliCredentialOptions.js +5 -0
  289. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +1 -0
  290. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts +71 -0
  291. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  292. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +176 -0
  293. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +1 -0
  294. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  295. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  296. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +5 -0
  297. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  298. package/dist/commonjs/credentials/azurePipelinesCredential.d.ts +38 -0
  299. package/dist/commonjs/credentials/azurePipelinesCredential.d.ts.map +1 -0
  300. package/dist/commonjs/credentials/azurePipelinesCredential.js +146 -0
  301. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +1 -0
  302. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  303. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  304. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +5 -0
  305. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  306. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts +75 -0
  307. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -0
  308. package/dist/commonjs/credentials/azurePowerShellCredential.js +235 -0
  309. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +1 -0
  310. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  311. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  312. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +5 -0
  313. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  314. package/dist/commonjs/credentials/brokerAuthOptions.d.ts +13 -0
  315. package/dist/commonjs/credentials/brokerAuthOptions.d.ts.map +1 -0
  316. package/dist/commonjs/credentials/brokerAuthOptions.js +3 -0
  317. package/dist/commonjs/credentials/brokerAuthOptions.js.map +1 -0
  318. package/dist/commonjs/credentials/browserCustomizationOptions.d.ts +19 -0
  319. package/dist/commonjs/credentials/browserCustomizationOptions.d.ts.map +1 -0
  320. package/dist/commonjs/credentials/browserCustomizationOptions.js +5 -0
  321. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +1 -0
  322. package/dist/commonjs/credentials/chainedTokenCredential.d.ts +49 -0
  323. package/dist/commonjs/credentials/chainedTokenCredential.d.ts.map +1 -0
  324. package/dist/commonjs/credentials/chainedTokenCredential.js +94 -0
  325. package/dist/commonjs/credentials/chainedTokenCredential.js.map +1 -0
  326. package/dist/commonjs/credentials/clientAssertionCredential.d.ts +33 -0
  327. package/dist/commonjs/credentials/clientAssertionCredential.d.ts.map +1 -0
  328. package/dist/commonjs/credentials/clientAssertionCredential.js +59 -0
  329. package/dist/commonjs/credentials/clientAssertionCredential.js.map +1 -0
  330. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  331. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  332. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +5 -0
  333. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +1 -0
  334. package/dist/commonjs/credentials/clientCertificateCredential.d.ts +101 -0
  335. package/dist/commonjs/credentials/clientCertificateCredential.d.ts.map +1 -0
  336. package/dist/commonjs/credentials/clientCertificateCredential.js +124 -0
  337. package/dist/commonjs/credentials/clientCertificateCredential.js.map +1 -0
  338. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  339. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  340. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +5 -0
  341. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +1 -0
  342. package/dist/commonjs/credentials/clientSecretCredential.d.ts +37 -0
  343. package/dist/commonjs/credentials/clientSecretCredential.d.ts.map +1 -0
  344. package/dist/commonjs/credentials/clientSecretCredential.js +64 -0
  345. package/dist/commonjs/credentials/clientSecretCredential.js.map +1 -0
  346. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts +9 -0
  347. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  348. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +5 -0
  349. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +1 -0
  350. package/dist/commonjs/credentials/credentialPersistenceOptions.d.ts +29 -0
  351. package/dist/commonjs/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  352. package/dist/commonjs/credentials/credentialPersistenceOptions.js +5 -0
  353. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +1 -0
  354. package/dist/commonjs/credentials/defaultAzureCredential.d.ts +65 -0
  355. package/dist/commonjs/credentials/defaultAzureCredential.d.ts.map +1 -0
  356. package/dist/commonjs/credentials/defaultAzureCredential.js +171 -0
  357. package/dist/commonjs/credentials/defaultAzureCredential.js.map +1 -0
  358. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  359. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  360. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +5 -0
  361. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +1 -0
  362. package/dist/commonjs/credentials/deviceCodeCredential.d.ts +67 -0
  363. package/dist/commonjs/credentials/deviceCodeCredential.d.ts.map +1 -0
  364. package/dist/commonjs/credentials/deviceCodeCredential.js +96 -0
  365. package/dist/commonjs/credentials/deviceCodeCredential.js.map +1 -0
  366. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  367. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  368. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +5 -0
  369. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +1 -0
  370. package/dist/commonjs/credentials/environmentCredential.d.ts +52 -0
  371. package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -0
  372. package/dist/commonjs/credentials/environmentCredential.js +135 -0
  373. package/dist/commonjs/credentials/environmentCredential.js.map +1 -0
  374. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts +9 -0
  375. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -0
  376. package/dist/commonjs/credentials/environmentCredentialOptions.js +5 -0
  377. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +1 -0
  378. package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts +56 -0
  379. package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  380. package/dist/commonjs/credentials/interactiveBrowserCredential.js +95 -0
  381. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +1 -0
  382. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  383. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  384. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +5 -0
  385. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  386. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts +25 -0
  387. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  388. package/dist/commonjs/credentials/interactiveCredentialOptions.js +5 -0
  389. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +1 -0
  390. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  391. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  392. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +125 -0
  393. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  394. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  395. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  396. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +36 -0
  397. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  398. package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts +95 -0
  399. package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  400. package/dist/commonjs/credentials/managedIdentityCredential/index.js +221 -0
  401. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +1 -0
  402. package/dist/commonjs/credentials/managedIdentityCredential/models.d.ts +24 -0
  403. package/dist/commonjs/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  404. package/dist/commonjs/credentials/managedIdentityCredential/models.js +5 -0
  405. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +1 -0
  406. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  407. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  408. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +35 -0
  409. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  410. package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts +33 -0
  411. package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  412. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +82 -0
  413. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +1 -0
  414. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  415. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  416. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +5 -0
  417. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  418. package/dist/commonjs/credentials/onBehalfOfCredential.d.ts +102 -0
  419. package/dist/commonjs/credentials/onBehalfOfCredential.d.ts.map +1 -0
  420. package/dist/commonjs/credentials/onBehalfOfCredential.js +116 -0
  421. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +1 -0
  422. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  423. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  424. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +5 -0
  425. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  426. package/dist/commonjs/credentials/usernamePasswordCredential.d.ts +41 -0
  427. package/dist/commonjs/credentials/usernamePasswordCredential.d.ts.map +1 -0
  428. package/dist/commonjs/credentials/usernamePasswordCredential.js +71 -0
  429. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +1 -0
  430. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
  431. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  432. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +5 -0
  433. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  434. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts +60 -0
  435. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  436. package/dist/commonjs/credentials/visualStudioCodeCredential.js +196 -0
  437. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +1 -0
  438. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
  439. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  440. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +5 -0
  441. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  442. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
  443. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  444. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +5 -0
  445. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
  446. package/dist/commonjs/credentials/workloadIdentityCredential.d.ts +47 -0
  447. package/dist/commonjs/credentials/workloadIdentityCredential.d.ts.map +1 -0
  448. package/dist/commonjs/credentials/workloadIdentityCredential.js +118 -0
  449. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +1 -0
  450. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  451. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  452. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +5 -0
  453. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  454. package/dist/commonjs/errors.d.ts +139 -0
  455. package/dist/commonjs/errors.d.ts.map +1 -0
  456. package/dist/commonjs/errors.js +130 -0
  457. package/dist/commonjs/errors.js.map +1 -0
  458. package/dist/commonjs/index.d.ts +59 -0
  459. package/dist/commonjs/index.d.ts.map +1 -0
  460. package/dist/commonjs/index.js +69 -0
  461. package/dist/commonjs/index.js.map +1 -0
  462. package/dist/commonjs/msal/browserFlows/flows.d.ts +42 -0
  463. package/dist/commonjs/msal/browserFlows/flows.d.ts.map +1 -0
  464. package/dist/commonjs/msal/browserFlows/flows.js +5 -0
  465. package/dist/commonjs/msal/browserFlows/flows.js.map +1 -0
  466. package/dist/commonjs/msal/browserFlows/msalAuthCode.d.ts +50 -0
  467. package/dist/commonjs/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
  468. package/dist/commonjs/msal/browserFlows/msalAuthCode.js +208 -0
  469. package/dist/commonjs/msal/browserFlows/msalAuthCode.js.map +1 -0
  470. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
  471. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  472. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +121 -0
  473. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  474. package/dist/commonjs/msal/credentials.d.ts +52 -0
  475. package/dist/commonjs/msal/credentials.d.ts.map +1 -0
  476. package/dist/commonjs/msal/credentials.js +5 -0
  477. package/dist/commonjs/msal/credentials.js.map +1 -0
  478. package/dist/commonjs/msal/msal.d.ts +3 -0
  479. package/dist/commonjs/msal/msal.d.ts.map +1 -0
  480. package/dist/commonjs/msal/msal.js +9 -0
  481. package/dist/commonjs/msal/msal.js.map +1 -0
  482. package/dist/commonjs/msal/nodeFlows/brokerOptions.d.ts +44 -0
  483. package/dist/commonjs/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  484. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +3 -0
  485. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +1 -0
  486. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts +186 -0
  487. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -0
  488. package/dist/commonjs/msal/nodeFlows/msalClient.js +482 -0
  489. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +1 -0
  490. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts +91 -0
  491. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  492. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +91 -0
  493. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +1 -0
  494. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  495. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  496. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +5 -0
  497. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
  498. package/dist/commonjs/msal/types.d.ts +87 -0
  499. package/dist/commonjs/msal/types.d.ts.map +1 -0
  500. package/dist/commonjs/msal/types.js +5 -0
  501. package/dist/commonjs/msal/types.js.map +1 -0
  502. package/dist/commonjs/msal/utils.d.ts +95 -0
  503. package/dist/commonjs/msal/utils.d.ts.map +1 -0
  504. package/dist/commonjs/msal/utils.js +247 -0
  505. package/dist/commonjs/msal/utils.js.map +1 -0
  506. package/dist/commonjs/package.json +3 -0
  507. package/dist/commonjs/plugins/consumer.d.ts +28 -0
  508. package/dist/commonjs/plugins/consumer.d.ts.map +1 -0
  509. package/dist/commonjs/plugins/consumer.js +46 -0
  510. package/dist/commonjs/plugins/consumer.js.map +1 -0
  511. package/dist/commonjs/plugins/provider.d.ts +36 -0
  512. package/dist/commonjs/plugins/provider.d.ts.map +1 -0
  513. package/dist/commonjs/plugins/provider.js +5 -0
  514. package/dist/commonjs/plugins/provider.js.map +1 -0
  515. package/dist/commonjs/regionalAuthority.d.ts +122 -0
  516. package/dist/commonjs/regionalAuthority.d.ts.map +1 -0
  517. package/dist/commonjs/regionalAuthority.js +144 -0
  518. package/dist/commonjs/regionalAuthority.js.map +1 -0
  519. package/dist/commonjs/tokenCredentialOptions.d.ts +28 -0
  520. package/dist/commonjs/tokenCredentialOptions.d.ts.map +1 -0
  521. package/dist/commonjs/tokenCredentialOptions.js +5 -0
  522. package/dist/commonjs/tokenCredentialOptions.js.map +1 -0
  523. package/dist/commonjs/tokenProvider.d.ts +38 -0
  524. package/dist/commonjs/tokenProvider.d.ts.map +1 -0
  525. package/dist/commonjs/tokenProvider.js +55 -0
  526. package/dist/commonjs/tokenProvider.js.map +1 -0
  527. package/dist/commonjs/tsdoc-metadata.json +11 -0
  528. package/dist/commonjs/util/identityTokenEndpoint.d.ts +2 -0
  529. package/dist/commonjs/util/identityTokenEndpoint.d.ts.map +1 -0
  530. package/dist/commonjs/util/identityTokenEndpoint.js +14 -0
  531. package/dist/commonjs/util/identityTokenEndpoint.js.map +1 -0
  532. package/dist/commonjs/util/logging.d.ts +70 -0
  533. package/dist/commonjs/util/logging.d.ts.map +1 -0
  534. package/dist/commonjs/util/logging.js +103 -0
  535. package/dist/commonjs/util/logging.js.map +1 -0
  536. package/dist/commonjs/util/processMultiTenantRequest.d.ts +10 -0
  537. package/dist/commonjs/util/processMultiTenantRequest.d.ts.map +1 -0
  538. package/dist/commonjs/util/processMultiTenantRequest.js +38 -0
  539. package/dist/commonjs/util/processMultiTenantRequest.js.map +1 -0
  540. package/dist/commonjs/util/processUtils.d.ts +13 -0
  541. package/dist/commonjs/util/processUtils.d.ts.map +1 -0
  542. package/dist/commonjs/util/processUtils.js +36 -0
  543. package/dist/commonjs/util/processUtils.js.map +1 -0
  544. package/dist/commonjs/util/scopeUtils.d.ts +17 -0
  545. package/dist/commonjs/util/scopeUtils.d.ts.map +1 -0
  546. package/dist/commonjs/util/scopeUtils.js +34 -0
  547. package/dist/commonjs/util/scopeUtils.js.map +1 -0
  548. package/dist/commonjs/util/subscriptionUtils.d.ts +6 -0
  549. package/dist/commonjs/util/subscriptionUtils.d.ts.map +1 -0
  550. package/dist/commonjs/util/subscriptionUtils.js +17 -0
  551. package/dist/commonjs/util/subscriptionUtils.js.map +1 -0
  552. package/dist/commonjs/util/tenantIdUtils.d.ts +15 -0
  553. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -0
  554. package/dist/commonjs/util/tenantIdUtils.js +51 -0
  555. package/dist/commonjs/util/tenantIdUtils.js.map +1 -0
  556. package/dist/commonjs/util/tracing.d.ts +6 -0
  557. package/dist/commonjs/util/tracing.d.ts.map +1 -0
  558. package/dist/commonjs/util/tracing.js +17 -0
  559. package/dist/commonjs/util/tracing.js.map +1 -0
  560. package/dist/esm/client/identityClient.d.ts +65 -0
  561. package/dist/esm/client/identityClient.d.ts.map +1 -0
  562. package/dist/esm/client/identityClient.js +248 -0
  563. package/dist/esm/client/identityClient.js.map +1 -0
  564. package/dist/esm/constants.d.ts +64 -0
  565. package/dist/esm/constants.d.ts.map +1 -0
  566. package/dist/esm/constants.js +70 -0
  567. package/dist/esm/constants.js.map +1 -0
  568. package/dist/esm/credentials/authorityValidationOptions.d.ts +16 -0
  569. package/dist/esm/credentials/authorityValidationOptions.d.ts.map +1 -0
  570. package/dist/esm/credentials/authorityValidationOptions.js +4 -0
  571. package/dist/esm/credentials/authorityValidationOptions.js.map +1 -0
  572. package/dist/esm/credentials/authorizationCodeCredential.d.ts +73 -0
  573. package/dist/esm/credentials/authorizationCodeCredential.d.ts.map +1 -0
  574. package/dist/esm/credentials/authorizationCodeCredential.js +60 -0
  575. package/dist/esm/credentials/authorizationCodeCredential.js.map +1 -0
  576. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  577. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  578. package/dist/esm/credentials/authorizationCodeCredentialOptions.js +4 -0
  579. package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  580. package/dist/esm/credentials/azureApplicationCredential.d.ts +24 -0
  581. package/dist/esm/credentials/azureApplicationCredential.d.ts.map +1 -0
  582. package/dist/esm/credentials/azureApplicationCredential.js +32 -0
  583. package/dist/esm/credentials/azureApplicationCredential.js.map +1 -0
  584. package/dist/esm/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  585. package/dist/esm/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  586. package/dist/esm/credentials/azureApplicationCredentialOptions.js +4 -0
  587. package/dist/esm/credentials/azureApplicationCredentialOptions.js.map +1 -0
  588. package/dist/esm/credentials/azureCliCredential.d.ts +64 -0
  589. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -0
  590. package/dist/esm/credentials/azureCliCredential.js +189 -0
  591. package/dist/esm/credentials/azureCliCredential.js.map +1 -0
  592. package/dist/esm/credentials/azureCliCredentialOptions.d.ts +20 -0
  593. package/dist/esm/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  594. package/dist/esm/credentials/azureCliCredentialOptions.js +4 -0
  595. package/dist/esm/credentials/azureCliCredentialOptions.js.map +1 -0
  596. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts +71 -0
  597. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  598. package/dist/esm/credentials/azureDeveloperCliCredential.js +171 -0
  599. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -0
  600. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  601. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  602. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.js +4 -0
  603. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  604. package/dist/esm/credentials/azurePipelinesCredential.d.ts +38 -0
  605. package/dist/esm/credentials/azurePipelinesCredential.d.ts.map +1 -0
  606. package/dist/esm/credentials/azurePipelinesCredential.js +141 -0
  607. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -0
  608. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  609. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  610. package/dist/esm/credentials/azurePipelinesCredentialOptions.js +4 -0
  611. package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  612. package/dist/esm/credentials/azurePowerShellCredential.d.ts +75 -0
  613. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -0
  614. package/dist/esm/credentials/azurePowerShellCredential.js +229 -0
  615. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -0
  616. package/dist/esm/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  617. package/dist/esm/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  618. package/dist/esm/credentials/azurePowerShellCredentialOptions.js +4 -0
  619. package/dist/esm/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  620. package/dist/esm/credentials/brokerAuthOptions.d.ts +13 -0
  621. package/dist/esm/credentials/brokerAuthOptions.d.ts.map +1 -0
  622. package/dist/esm/credentials/brokerAuthOptions.js +2 -0
  623. package/dist/esm/credentials/brokerAuthOptions.js.map +1 -0
  624. package/dist/esm/credentials/browserCustomizationOptions.d.ts +19 -0
  625. package/dist/esm/credentials/browserCustomizationOptions.d.ts.map +1 -0
  626. package/dist/esm/credentials/browserCustomizationOptions.js +4 -0
  627. package/dist/esm/credentials/browserCustomizationOptions.js.map +1 -0
  628. package/dist/esm/credentials/chainedTokenCredential.d.ts +49 -0
  629. package/dist/esm/credentials/chainedTokenCredential.d.ts.map +1 -0
  630. package/dist/esm/credentials/chainedTokenCredential.js +90 -0
  631. package/dist/esm/credentials/chainedTokenCredential.js.map +1 -0
  632. package/dist/esm/credentials/clientAssertionCredential.d.ts +33 -0
  633. package/dist/esm/credentials/clientAssertionCredential.d.ts.map +1 -0
  634. package/dist/esm/credentials/clientAssertionCredential.js +55 -0
  635. package/dist/esm/credentials/clientAssertionCredential.js.map +1 -0
  636. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  637. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  638. package/dist/esm/credentials/clientAssertionCredentialOptions.js +4 -0
  639. package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -0
  640. package/dist/esm/credentials/clientCertificateCredential.d.ts +101 -0
  641. package/dist/esm/credentials/clientCertificateCredential.d.ts.map +1 -0
  642. package/dist/esm/credentials/clientCertificateCredential.js +119 -0
  643. package/dist/esm/credentials/clientCertificateCredential.js.map +1 -0
  644. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  645. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  646. package/dist/esm/credentials/clientCertificateCredentialOptions.js +4 -0
  647. package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -0
  648. package/dist/esm/credentials/clientSecretCredential.d.ts +37 -0
  649. package/dist/esm/credentials/clientSecretCredential.d.ts.map +1 -0
  650. package/dist/esm/credentials/clientSecretCredential.js +60 -0
  651. package/dist/esm/credentials/clientSecretCredential.js.map +1 -0
  652. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts +9 -0
  653. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  654. package/dist/esm/credentials/clientSecretCredentialOptions.js +4 -0
  655. package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -0
  656. package/dist/esm/credentials/credentialPersistenceOptions.d.ts +29 -0
  657. package/dist/esm/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  658. package/dist/esm/credentials/credentialPersistenceOptions.js +4 -0
  659. package/dist/esm/credentials/credentialPersistenceOptions.js.map +1 -0
  660. package/dist/esm/credentials/defaultAzureCredential.d.ts +65 -0
  661. package/dist/esm/credentials/defaultAzureCredential.d.ts.map +1 -0
  662. package/dist/esm/credentials/defaultAzureCredential.js +164 -0
  663. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -0
  664. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  665. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  666. package/dist/esm/credentials/defaultAzureCredentialOptions.js +4 -0
  667. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -0
  668. package/dist/esm/credentials/deviceCodeCredential.d.ts +67 -0
  669. package/dist/esm/credentials/deviceCodeCredential.d.ts.map +1 -0
  670. package/dist/esm/credentials/deviceCodeCredential.js +91 -0
  671. package/dist/esm/credentials/deviceCodeCredential.js.map +1 -0
  672. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  673. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  674. package/dist/esm/credentials/deviceCodeCredentialOptions.js +4 -0
  675. package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -0
  676. package/dist/esm/credentials/environmentCredential.d.ts +52 -0
  677. package/dist/esm/credentials/environmentCredential.d.ts.map +1 -0
  678. package/dist/esm/credentials/environmentCredential.js +130 -0
  679. package/dist/esm/credentials/environmentCredential.js.map +1 -0
  680. package/dist/esm/credentials/environmentCredentialOptions.d.ts +9 -0
  681. package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -0
  682. package/dist/esm/credentials/environmentCredentialOptions.js +4 -0
  683. package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -0
  684. package/dist/esm/credentials/interactiveBrowserCredential.d.ts +56 -0
  685. package/dist/esm/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  686. package/dist/esm/credentials/interactiveBrowserCredential.js +91 -0
  687. package/dist/esm/credentials/interactiveBrowserCredential.js.map +1 -0
  688. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  689. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  690. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js +4 -0
  691. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  692. package/dist/esm/credentials/interactiveCredentialOptions.d.ts +25 -0
  693. package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  694. package/dist/esm/credentials/interactiveCredentialOptions.js +4 -0
  695. package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -0
  696. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  697. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  698. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js +122 -0
  699. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  700. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  701. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  702. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js +33 -0
  703. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  704. package/dist/esm/credentials/managedIdentityCredential/index.d.ts +95 -0
  705. package/dist/esm/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  706. package/dist/esm/credentials/managedIdentityCredential/index.js +217 -0
  707. package/dist/esm/credentials/managedIdentityCredential/index.js.map +1 -0
  708. package/dist/esm/credentials/managedIdentityCredential/models.d.ts +24 -0
  709. package/dist/esm/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  710. package/dist/esm/credentials/managedIdentityCredential/models.js +4 -0
  711. package/dist/esm/credentials/managedIdentityCredential/models.js.map +1 -0
  712. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  713. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  714. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
  715. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  716. package/dist/esm/credentials/managedIdentityCredential/utils.d.ts +33 -0
  717. package/dist/esm/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  718. package/dist/esm/credentials/managedIdentityCredential/utils.js +77 -0
  719. package/dist/esm/credentials/managedIdentityCredential/utils.js.map +1 -0
  720. package/dist/esm/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  721. package/dist/esm/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  722. package/dist/esm/credentials/multiTenantTokenCredentialOptions.js +4 -0
  723. package/dist/esm/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  724. package/dist/esm/credentials/onBehalfOfCredential.d.ts +102 -0
  725. package/dist/esm/credentials/onBehalfOfCredential.d.ts.map +1 -0
  726. package/dist/esm/credentials/onBehalfOfCredential.js +112 -0
  727. package/dist/esm/credentials/onBehalfOfCredential.js.map +1 -0
  728. package/dist/esm/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  729. package/dist/esm/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  730. package/dist/esm/credentials/onBehalfOfCredentialOptions.js +4 -0
  731. package/dist/esm/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  732. package/dist/esm/credentials/usernamePasswordCredential.d.ts +41 -0
  733. package/dist/esm/credentials/usernamePasswordCredential.d.ts.map +1 -0
  734. package/dist/esm/credentials/usernamePasswordCredential.js +67 -0
  735. package/dist/esm/credentials/usernamePasswordCredential.js.map +1 -0
  736. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
  737. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  738. package/dist/esm/credentials/usernamePasswordCredentialOptions.js +4 -0
  739. package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  740. package/dist/esm/credentials/visualStudioCodeCredential.d.ts +60 -0
  741. package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  742. package/dist/esm/credentials/visualStudioCodeCredential.js +190 -0
  743. package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -0
  744. package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
  745. package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  746. package/dist/esm/credentials/visualStudioCodeCredentialOptions.js +4 -0
  747. package/dist/esm/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  748. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
  749. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  750. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +4 -0
  751. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
  752. package/dist/esm/credentials/workloadIdentityCredential.d.ts +47 -0
  753. package/dist/esm/credentials/workloadIdentityCredential.d.ts.map +1 -0
  754. package/dist/esm/credentials/workloadIdentityCredential.js +114 -0
  755. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -0
  756. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  757. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  758. package/dist/esm/credentials/workloadIdentityCredentialOptions.js +4 -0
  759. package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  760. package/dist/esm/errors.d.ts +139 -0
  761. package/dist/esm/errors.d.ts.map +1 -0
  762. package/dist/esm/errors.js +123 -0
  763. package/dist/esm/errors.js.map +1 -0
  764. package/dist/esm/index.d.ts +59 -0
  765. package/dist/esm/index.d.ts.map +1 -0
  766. package/dist/esm/index.js +34 -0
  767. package/dist/esm/index.js.map +1 -0
  768. package/dist/esm/msal/browserFlows/flows.d.ts +42 -0
  769. package/dist/esm/msal/browserFlows/flows.d.ts.map +1 -0
  770. package/dist/esm/msal/browserFlows/flows.js +4 -0
  771. package/dist/esm/msal/browserFlows/flows.js.map +1 -0
  772. package/dist/esm/msal/browserFlows/msalAuthCode.d.ts +50 -0
  773. package/dist/esm/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
  774. package/dist/esm/msal/browserFlows/msalAuthCode.js +203 -0
  775. package/dist/esm/msal/browserFlows/msalAuthCode.js.map +1 -0
  776. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
  777. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  778. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +116 -0
  779. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  780. package/dist/esm/msal/credentials.d.ts +52 -0
  781. package/dist/esm/msal/credentials.d.ts.map +1 -0
  782. package/dist/esm/msal/credentials.js +4 -0
  783. package/dist/esm/msal/credentials.js.map +1 -0
  784. package/dist/esm/msal/msal.d.ts +3 -0
  785. package/dist/esm/msal/msal.d.ts.map +1 -0
  786. package/dist/esm/msal/nodeFlows/brokerOptions.d.ts +44 -0
  787. package/dist/esm/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  788. package/dist/esm/msal/nodeFlows/brokerOptions.js +2 -0
  789. package/dist/esm/msal/nodeFlows/brokerOptions.js.map +1 -0
  790. package/dist/esm/msal/nodeFlows/msalClient.d.ts +186 -0
  791. package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -0
  792. package/dist/esm/msal/nodeFlows/msalClient.js +477 -0
  793. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -0
  794. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts +91 -0
  795. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  796. package/dist/esm/msal/nodeFlows/msalPlugins.js +87 -0
  797. package/dist/esm/msal/nodeFlows/msalPlugins.js.map +1 -0
  798. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  799. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  800. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.js +4 -0
  801. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
  802. package/dist/esm/msal/types.d.ts +87 -0
  803. package/dist/esm/msal/types.d.ts.map +1 -0
  804. package/dist/esm/msal/types.js +4 -0
  805. package/dist/esm/msal/types.js.map +1 -0
  806. package/dist/esm/msal/utils.d.ts +95 -0
  807. package/dist/esm/msal/utils.d.ts.map +1 -0
  808. package/dist/esm/msal/utils.js +232 -0
  809. package/dist/esm/msal/utils.js.map +1 -0
  810. package/dist/esm/package.json +3 -0
  811. package/dist/esm/plugins/consumer.d.ts +28 -0
  812. package/dist/esm/plugins/consumer.d.ts.map +1 -0
  813. package/dist/esm/plugins/consumer.js +43 -0
  814. package/dist/esm/plugins/consumer.js.map +1 -0
  815. package/dist/esm/plugins/provider.d.ts +36 -0
  816. package/dist/esm/plugins/provider.d.ts.map +1 -0
  817. package/dist/esm/plugins/provider.js +4 -0
  818. package/dist/esm/plugins/provider.js.map +1 -0
  819. package/dist/esm/regionalAuthority.d.ts +122 -0
  820. package/dist/esm/regionalAuthority.d.ts.map +1 -0
  821. package/dist/esm/regionalAuthority.js +140 -0
  822. package/dist/esm/regionalAuthority.js.map +1 -0
  823. package/dist/esm/tokenCredentialOptions.d.ts +28 -0
  824. package/dist/esm/tokenCredentialOptions.d.ts.map +1 -0
  825. package/dist/esm/tokenCredentialOptions.js +4 -0
  826. package/dist/esm/tokenCredentialOptions.js.map +1 -0
  827. package/dist/esm/tokenProvider.d.ts +38 -0
  828. package/dist/esm/tokenProvider.d.ts.map +1 -0
  829. package/dist/esm/tokenProvider.js +52 -0
  830. package/dist/esm/tokenProvider.js.map +1 -0
  831. package/dist/esm/util/authHostEnv-browser.d.mts +4 -0
  832. package/dist/esm/util/authHostEnv-browser.d.mts.map +1 -0
  833. package/dist/esm/util/authHostEnv-browser.mjs +7 -0
  834. package/dist/esm/util/authHostEnv-browser.mjs.map +1 -0
  835. package/dist/esm/util/identityTokenEndpoint.d.ts +2 -0
  836. package/dist/esm/util/identityTokenEndpoint.d.ts.map +1 -0
  837. package/dist/esm/util/identityTokenEndpoint.js +11 -0
  838. package/dist/esm/util/identityTokenEndpoint.js.map +1 -0
  839. package/dist/esm/util/logging.d.ts +70 -0
  840. package/dist/esm/util/logging.d.ts.map +1 -0
  841. package/dist/esm/util/logging.js +94 -0
  842. package/dist/esm/util/logging.js.map +1 -0
  843. package/dist/esm/util/processMultiTenantRequest.d.ts +10 -0
  844. package/dist/esm/util/processMultiTenantRequest.d.ts.map +1 -0
  845. package/dist/esm/util/processMultiTenantRequest.js +35 -0
  846. package/dist/esm/util/processMultiTenantRequest.js.map +1 -0
  847. package/dist/esm/util/processUtils.d.ts +13 -0
  848. package/dist/esm/util/processUtils.d.ts.map +1 -0
  849. package/dist/esm/util/processUtils.js +32 -0
  850. package/dist/esm/util/processUtils.js.map +1 -0
  851. package/dist/esm/util/scopeUtils.d.ts +17 -0
  852. package/dist/esm/util/scopeUtils.d.ts.map +1 -0
  853. package/dist/esm/util/scopeUtils.js +29 -0
  854. package/dist/esm/util/scopeUtils.js.map +1 -0
  855. package/dist/esm/util/subscriptionUtils.d.ts +6 -0
  856. package/dist/esm/util/subscriptionUtils.d.ts.map +1 -0
  857. package/dist/esm/util/subscriptionUtils.js +14 -0
  858. package/dist/esm/util/subscriptionUtils.js.map +1 -0
  859. package/dist/esm/util/tenantIdUtils.d.ts +15 -0
  860. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -0
  861. package/dist/esm/util/tenantIdUtils.js +44 -0
  862. package/dist/esm/util/tenantIdUtils.js.map +1 -0
  863. package/dist/esm/util/tracing.d.ts +6 -0
  864. package/dist/esm/util/tracing.d.ts.map +1 -0
  865. package/dist/esm/util/tracing.js +14 -0
  866. package/dist/esm/util/tracing.js.map +1 -0
  867. package/package.json +52 -63
  868. package/dist/index.js +0 -4200
  869. package/dist/index.js.map +0 -1
  870. package/dist-esm/src/client/identityClient.js +0 -248
  871. package/dist-esm/src/client/identityClient.js.map +0 -1
  872. package/dist-esm/src/credentials/authorizationCodeCredential.browser.js +0 -16
  873. package/dist-esm/src/credentials/authorizationCodeCredential.browser.js.map +0 -1
  874. package/dist-esm/src/credentials/authorizationCodeCredential.js +0 -60
  875. package/dist-esm/src/credentials/authorizationCodeCredential.js.map +0 -1
  876. package/dist-esm/src/credentials/authorizationCodeCredentialOptions.js.map +0 -1
  877. package/dist-esm/src/credentials/azureApplicationCredential.browser.js +0 -34
  878. package/dist-esm/src/credentials/azureApplicationCredential.browser.js.map +0 -1
  879. package/dist-esm/src/credentials/azureApplicationCredential.js +0 -32
  880. package/dist-esm/src/credentials/azureApplicationCredential.js.map +0 -1
  881. package/dist-esm/src/credentials/azureApplicationCredentialOptions.js.map +0 -1
  882. package/dist-esm/src/credentials/azureCliCredential.browser.js +0 -23
  883. package/dist-esm/src/credentials/azureCliCredential.browser.js.map +0 -1
  884. package/dist-esm/src/credentials/azureCliCredential.js +0 -189
  885. package/dist-esm/src/credentials/azureCliCredential.js.map +0 -1
  886. package/dist-esm/src/credentials/azureCliCredentialOptions.js.map +0 -1
  887. package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js +0 -23
  888. package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js.map +0 -1
  889. package/dist-esm/src/credentials/azureDeveloperCliCredential.js +0 -171
  890. package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +0 -1
  891. package/dist-esm/src/credentials/azureDeveloperCliCredentialOptions.js.map +0 -1
  892. package/dist-esm/src/credentials/azurePipelinesCredential.browser.js +0 -23
  893. package/dist-esm/src/credentials/azurePipelinesCredential.browser.js.map +0 -1
  894. package/dist-esm/src/credentials/azurePipelinesCredential.js +0 -141
  895. package/dist-esm/src/credentials/azurePipelinesCredential.js.map +0 -1
  896. package/dist-esm/src/credentials/azurePipelinesCredentialOptions.js.map +0 -1
  897. package/dist-esm/src/credentials/azurePowerShellCredential.browser.js +0 -22
  898. package/dist-esm/src/credentials/azurePowerShellCredential.browser.js.map +0 -1
  899. package/dist-esm/src/credentials/azurePowerShellCredential.js +0 -229
  900. package/dist-esm/src/credentials/azurePowerShellCredential.js.map +0 -1
  901. package/dist-esm/src/credentials/azurePowerShellCredentialOptions.js.map +0 -1
  902. package/dist-esm/src/credentials/brokerAuthOptions.js.map +0 -1
  903. package/dist-esm/src/credentials/chainedTokenCredential.js +0 -90
  904. package/dist-esm/src/credentials/chainedTokenCredential.js.map +0 -1
  905. package/dist-esm/src/credentials/clientAssertionCredential.browser.js +0 -22
  906. package/dist-esm/src/credentials/clientAssertionCredential.browser.js.map +0 -1
  907. package/dist-esm/src/credentials/clientAssertionCredential.js +0 -55
  908. package/dist-esm/src/credentials/clientAssertionCredential.js.map +0 -1
  909. package/dist-esm/src/credentials/clientAssertionCredentialOptions.js.map +0 -1
  910. package/dist-esm/src/credentials/clientCertificateCredential.browser.js +0 -23
  911. package/dist-esm/src/credentials/clientCertificateCredential.browser.js.map +0 -1
  912. package/dist-esm/src/credentials/clientCertificateCredential.js +0 -119
  913. package/dist-esm/src/credentials/clientCertificateCredential.js.map +0 -1
  914. package/dist-esm/src/credentials/clientCertificateCredentialOptions.js.map +0 -1
  915. package/dist-esm/src/credentials/clientSecretCredential.browser.js +0 -83
  916. package/dist-esm/src/credentials/clientSecretCredential.browser.js.map +0 -1
  917. package/dist-esm/src/credentials/clientSecretCredential.js +0 -60
  918. package/dist-esm/src/credentials/clientSecretCredential.js.map +0 -1
  919. package/dist-esm/src/credentials/clientSecretCredentialOptions.js.map +0 -1
  920. package/dist-esm/src/credentials/credentialPersistenceOptions.js.map +0 -1
  921. package/dist-esm/src/credentials/defaultAzureCredential.browser.js +0 -29
  922. package/dist-esm/src/credentials/defaultAzureCredential.browser.js.map +0 -1
  923. package/dist-esm/src/credentials/defaultAzureCredential.js +0 -164
  924. package/dist-esm/src/credentials/defaultAzureCredential.js.map +0 -1
  925. package/dist-esm/src/credentials/defaultAzureCredentialOptions.js.map +0 -1
  926. package/dist-esm/src/credentials/deviceCodeCredential.browser.js +0 -23
  927. package/dist-esm/src/credentials/deviceCodeCredential.browser.js.map +0 -1
  928. package/dist-esm/src/credentials/deviceCodeCredential.js +0 -91
  929. package/dist-esm/src/credentials/deviceCodeCredential.js.map +0 -1
  930. package/dist-esm/src/credentials/deviceCodeCredentialOptions.js.map +0 -1
  931. package/dist-esm/src/credentials/environmentCredential.browser.js +0 -23
  932. package/dist-esm/src/credentials/environmentCredential.browser.js.map +0 -1
  933. package/dist-esm/src/credentials/environmentCredential.js +0 -130
  934. package/dist-esm/src/credentials/environmentCredential.js.map +0 -1
  935. package/dist-esm/src/credentials/environmentCredentialOptions.js.map +0 -1
  936. package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js +0 -86
  937. package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js.map +0 -1
  938. package/dist-esm/src/credentials/interactiveBrowserCredential.js +0 -91
  939. package/dist-esm/src/credentials/interactiveBrowserCredential.js.map +0 -1
  940. package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +0 -1
  941. package/dist-esm/src/credentials/interactiveCredentialOptions.js.map +0 -1
  942. package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js +0 -122
  943. package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  944. package/dist-esm/src/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  945. package/dist-esm/src/credentials/managedIdentityCredential/index.browser.js +0 -16
  946. package/dist-esm/src/credentials/managedIdentityCredential/index.browser.js.map +0 -1
  947. package/dist-esm/src/credentials/managedIdentityCredential/index.js +0 -217
  948. package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +0 -1
  949. package/dist-esm/src/credentials/managedIdentityCredential/models.js.map +0 -1
  950. package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -32
  951. package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  952. package/dist-esm/src/credentials/multiTenantTokenCredentialOptions.js.map +0 -1
  953. package/dist-esm/src/credentials/onBehalfOfCredential.browser.js +0 -23
  954. package/dist-esm/src/credentials/onBehalfOfCredential.browser.js.map +0 -1
  955. package/dist-esm/src/credentials/onBehalfOfCredential.js +0 -112
  956. package/dist-esm/src/credentials/onBehalfOfCredential.js.map +0 -1
  957. package/dist-esm/src/credentials/onBehalfOfCredentialOptions.js.map +0 -1
  958. package/dist-esm/src/credentials/usernamePasswordCredential.browser.js +0 -77
  959. package/dist-esm/src/credentials/usernamePasswordCredential.browser.js.map +0 -1
  960. package/dist-esm/src/credentials/usernamePasswordCredential.js +0 -67
  961. package/dist-esm/src/credentials/usernamePasswordCredential.js.map +0 -1
  962. package/dist-esm/src/credentials/usernamePasswordCredentialOptions.js.map +0 -1
  963. package/dist-esm/src/credentials/visualStudioCodeCredential.browser.js +0 -27
  964. package/dist-esm/src/credentials/visualStudioCodeCredential.browser.js.map +0 -1
  965. package/dist-esm/src/credentials/visualStudioCodeCredential.js +0 -190
  966. package/dist-esm/src/credentials/visualStudioCodeCredential.js.map +0 -1
  967. package/dist-esm/src/credentials/visualStudioCodeCredentialOptions.js.map +0 -1
  968. package/dist-esm/src/credentials/workloadIdentityCredential.browser.js +0 -27
  969. package/dist-esm/src/credentials/workloadIdentityCredential.browser.js.map +0 -1
  970. package/dist-esm/src/credentials/workloadIdentityCredential.js +0 -114
  971. package/dist-esm/src/credentials/workloadIdentityCredential.js.map +0 -1
  972. package/dist-esm/src/credentials/workloadIdentityCredentialOptions.js.map +0 -1
  973. package/dist-esm/src/index.js +0 -34
  974. package/dist-esm/src/index.js.map +0 -1
  975. package/dist-esm/src/msal/browserFlows/flows.js.map +0 -1
  976. package/dist-esm/src/msal/browserFlows/msalAuthCode.js +0 -203
  977. package/dist-esm/src/msal/browserFlows/msalAuthCode.js.map +0 -1
  978. package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js +0 -116
  979. package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  980. package/dist-esm/src/msal/credentials.js.map +0 -1
  981. package/dist-esm/src/msal/msal.browser.js +0 -5
  982. package/dist-esm/src/msal/msal.browser.js.map +0 -1
  983. package/dist-esm/src/msal/nodeFlows/msalClient.js +0 -484
  984. package/dist-esm/src/msal/nodeFlows/msalClient.js.map +0 -1
  985. package/dist-esm/src/msal/nodeFlows/msalPlugins.js +0 -87
  986. package/dist-esm/src/msal/nodeFlows/msalPlugins.js.map +0 -1
  987. package/dist-esm/src/msal/utils.js +0 -232
  988. package/dist-esm/src/msal/utils.js.map +0 -1
  989. package/dist-esm/src/plugins/consumer.browser.js +0 -7
  990. package/dist-esm/src/plugins/consumer.browser.js.map +0 -1
  991. package/dist-esm/src/plugins/consumer.js +0 -43
  992. package/dist-esm/src/plugins/consumer.js.map +0 -1
  993. package/dist-esm/src/plugins/provider.js.map +0 -1
  994. package/dist-esm/src/util/authHostEnv.browser.js +0 -7
  995. package/dist-esm/src/util/authHostEnv.browser.js.map +0 -1
  996. package/dist-esm/src/util/processMultiTenantRequest.browser.js +0 -29
  997. package/dist-esm/src/util/processMultiTenantRequest.browser.js.map +0 -1
  998. package/dist-esm/src/util/processMultiTenantRequest.js +0 -35
  999. package/dist-esm/src/util/processMultiTenantRequest.js.map +0 -1
  1000. package/dist-esm/src/util/scopeUtils.js +0 -29
  1001. package/dist-esm/src/util/scopeUtils.js.map +0 -1
  1002. package/dist-esm/src/util/subscriptionUtils.js +0 -14
  1003. package/dist-esm/src/util/subscriptionUtils.js.map +0 -1
  1004. package/dist-esm/src/util/tenantIdUtils.js +0 -44
  1005. package/dist-esm/src/util/tenantIdUtils.js.map +0 -1
  1006. package/dist-esm/src/util/tracing.js +0 -14
  1007. package/dist-esm/src/util/tracing.js.map +0 -1
  1008. /package/{dist-esm/src → dist/browser}/constants.js +0 -0
  1009. /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
  1010. /package/{dist-esm/src → dist/browser}/credentials/authorityValidationOptions.js +0 -0
  1011. /package/{dist-esm/src → dist/browser}/credentials/authorityValidationOptions.js.map +0 -0
  1012. /package/{dist-esm/src → dist/browser}/credentials/authorizationCodeCredentialOptions.js +0 -0
  1013. /package/{dist-esm/src → dist/browser}/credentials/azureApplicationCredentialOptions.js +0 -0
  1014. /package/{dist-esm/src → dist/browser}/credentials/azureCliCredentialOptions.js +0 -0
  1015. /package/{dist-esm/src → dist/browser}/credentials/azureDeveloperCliCredentialOptions.js +0 -0
  1016. /package/{dist-esm/src → dist/browser}/credentials/azurePipelinesCredentialOptions.js +0 -0
  1017. /package/{dist-esm/src → dist/browser}/credentials/azurePowerShellCredentialOptions.js +0 -0
  1018. /package/{dist-esm/src → dist/browser}/credentials/brokerAuthOptions.js +0 -0
  1019. /package/{dist-esm/src → dist/browser}/credentials/browserCustomizationOptions.js +0 -0
  1020. /package/{dist-esm/src → dist/browser}/credentials/browserCustomizationOptions.js.map +0 -0
  1021. /package/{dist-esm/src → dist/browser}/credentials/clientAssertionCredentialOptions.js +0 -0
  1022. /package/{dist-esm/src → dist/browser}/credentials/clientCertificateCredentialOptions.js +0 -0
  1023. /package/{dist-esm/src → dist/browser}/credentials/clientSecretCredentialOptions.js +0 -0
  1024. /package/{dist-esm/src → dist/browser}/credentials/credentialPersistenceOptions.js +0 -0
  1025. /package/{dist-esm/src → dist/browser}/credentials/defaultAzureCredentialOptions.js +0 -0
  1026. /package/{dist-esm/src → dist/browser}/credentials/deviceCodeCredentialOptions.js +0 -0
  1027. /package/{dist-esm/src → dist/browser}/credentials/environmentCredentialOptions.js +0 -0
  1028. /package/{dist-esm/src → dist/browser}/credentials/interactiveBrowserCredentialOptions.js +0 -0
  1029. /package/{dist-esm/src → dist/browser}/credentials/interactiveCredentialOptions.js +0 -0
  1030. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -0
  1031. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/models.js +0 -0
  1032. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/utils.js +0 -0
  1033. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/utils.js.map +0 -0
  1034. /package/{dist-esm/src → dist/browser}/credentials/multiTenantTokenCredentialOptions.js +0 -0
  1035. /package/{dist-esm/src → dist/browser}/credentials/onBehalfOfCredentialOptions.js +0 -0
  1036. /package/{dist-esm/src → dist/browser}/credentials/usernamePasswordCredentialOptions.js +0 -0
  1037. /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialOptions.js +0 -0
  1038. /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialPlugin.js +0 -0
  1039. /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialPlugin.js.map +0 -0
  1040. /package/{dist-esm/src → dist/browser}/credentials/workloadIdentityCredentialOptions.js +0 -0
  1041. /package/{dist-esm/src → dist/browser}/errors.js +0 -0
  1042. /package/{dist-esm/src → dist/browser}/errors.js.map +0 -0
  1043. /package/{dist-esm/src → dist/browser}/msal/browserFlows/flows.js +0 -0
  1044. /package/{dist-esm/src → dist/browser}/msal/credentials.js +0 -0
  1045. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/brokerOptions.js +0 -0
  1046. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/brokerOptions.js.map +0 -0
  1047. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/tokenCachePersistenceOptions.js +0 -0
  1048. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/tokenCachePersistenceOptions.js.map +0 -0
  1049. /package/{dist-esm/src → dist/browser}/msal/types.js +0 -0
  1050. /package/{dist-esm/src → dist/browser}/msal/types.js.map +0 -0
  1051. /package/{dist-esm/src → dist/browser}/plugins/provider.js +0 -0
  1052. /package/{dist-esm/src → dist/browser}/regionalAuthority.js +0 -0
  1053. /package/{dist-esm/src → dist/browser}/regionalAuthority.js.map +0 -0
  1054. /package/{dist-esm/src → dist/browser}/tokenCredentialOptions.js +0 -0
  1055. /package/{dist-esm/src → dist/browser}/tokenCredentialOptions.js.map +0 -0
  1056. /package/{dist-esm/src → dist/browser}/tokenProvider.js +0 -0
  1057. /package/{dist-esm/src → dist/browser}/tokenProvider.js.map +0 -0
  1058. /package/{dist-esm/src → dist/browser}/util/identityTokenEndpoint.js +0 -0
  1059. /package/{dist-esm/src → dist/browser}/util/identityTokenEndpoint.js.map +0 -0
  1060. /package/{dist-esm/src → dist/browser}/util/logging.js +0 -0
  1061. /package/{dist-esm/src → dist/browser}/util/logging.js.map +0 -0
  1062. /package/{dist-esm/src → dist/browser}/util/processUtils.js +0 -0
  1063. /package/{dist-esm/src → dist/browser}/util/processUtils.js.map +0 -0
  1064. /package/{dist-esm/src → dist/esm}/msal/msal.js +0 -0
  1065. /package/{dist-esm/src → dist/esm}/msal/msal.js.map +0 -0
  1066. /package/{types → dist}/identity.d.ts +0 -0
@@ -1,119 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { createMsalClient } from "../msal/nodeFlows/msalClient";
4
- import { createHash, createPrivateKey } from "crypto";
5
- import { processMultiTenantRequest, resolveAdditionallyAllowedTenantIds, } from "../util/tenantIdUtils";
6
- import { credentialLogger } from "../util/logging";
7
- import { readFile } from "fs/promises";
8
- import { tracingClient } from "../util/tracing";
9
- const credentialName = "ClientCertificateCredential";
10
- const logger = credentialLogger(credentialName);
11
- /**
12
- * Enables authentication to Microsoft Entra ID using a PEM-encoded
13
- * certificate that is assigned to an App Registration. More information
14
- * on how to configure certificate authentication can be found here:
15
- *
16
- * https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad
17
- *
18
- */
19
- export class ClientCertificateCredential {
20
- constructor(tenantId, clientId, certificatePathOrConfiguration, options = {}) {
21
- if (!tenantId || !clientId) {
22
- throw new Error(`${credentialName}: tenantId and clientId are required parameters.`);
23
- }
24
- this.tenantId = tenantId;
25
- this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(options === null || options === void 0 ? void 0 : options.additionallyAllowedTenants);
26
- this.sendCertificateChain = options.sendCertificateChain;
27
- this.certificateConfiguration = Object.assign({}, (typeof certificatePathOrConfiguration === "string"
28
- ? {
29
- certificatePath: certificatePathOrConfiguration,
30
- }
31
- : certificatePathOrConfiguration));
32
- const certificate = this.certificateConfiguration.certificate;
33
- const certificatePath = this.certificateConfiguration.certificatePath;
34
- if (!this.certificateConfiguration || !(certificate || certificatePath)) {
35
- throw new Error(`${credentialName}: Provide either a PEM certificate in string form, or the path to that certificate in the filesystem. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);
36
- }
37
- if (certificate && certificatePath) {
38
- throw new Error(`${credentialName}: To avoid unexpected behaviors, providing both the contents of a PEM certificate and the path to a PEM certificate is forbidden. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);
39
- }
40
- this.msalClient = createMsalClient(clientId, tenantId, Object.assign(Object.assign({}, options), { logger, tokenCredentialOptions: options }));
41
- }
42
- /**
43
- * Authenticates with Microsoft Entra ID and returns an access token if successful.
44
- * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
45
- *
46
- * @param scopes - The list of scopes for which the token will have access.
47
- * @param options - The options used to configure any requests this
48
- * TokenCredential implementation might make.
49
- */
50
- async getToken(scopes, options = {}) {
51
- return tracingClient.withSpan(`${credentialName}.getToken`, options, async (newOptions) => {
52
- newOptions.tenantId = processMultiTenantRequest(this.tenantId, newOptions, this.additionallyAllowedTenantIds, logger);
53
- const arrayScopes = Array.isArray(scopes) ? scopes : [scopes];
54
- const certificate = await this.buildClientCertificate();
55
- return this.msalClient.getTokenByClientCertificate(arrayScopes, certificate, newOptions);
56
- });
57
- }
58
- async buildClientCertificate() {
59
- var _a;
60
- const parts = await parseCertificate(this.certificateConfiguration, (_a = this.sendCertificateChain) !== null && _a !== void 0 ? _a : false);
61
- let privateKey;
62
- if (this.certificateConfiguration.certificatePassword !== undefined) {
63
- privateKey = createPrivateKey({
64
- key: parts.certificateContents,
65
- passphrase: this.certificateConfiguration.certificatePassword,
66
- format: "pem",
67
- })
68
- .export({
69
- format: "pem",
70
- type: "pkcs8",
71
- })
72
- .toString();
73
- }
74
- else {
75
- privateKey = parts.certificateContents;
76
- }
77
- return {
78
- thumbprint: parts.thumbprint,
79
- privateKey,
80
- x5c: parts.x5c,
81
- };
82
- }
83
- }
84
- /**
85
- * Parses a certificate into its relevant parts
86
- *
87
- * @param certificateConfiguration - The certificate contents or path to the certificate
88
- * @param sendCertificateChain - true if the entire certificate chain should be sent for SNI, false otherwise
89
- * @returns The parsed certificate parts and the certificate contents
90
- */
91
- export async function parseCertificate(certificateConfiguration, sendCertificateChain) {
92
- const certificate = certificateConfiguration.certificate;
93
- const certificatePath = certificateConfiguration.certificatePath;
94
- const certificateContents = certificate || (await readFile(certificatePath, "utf8"));
95
- const x5c = sendCertificateChain ? certificateContents : undefined;
96
- const certificatePattern = /(-+BEGIN CERTIFICATE-+)(\n\r?|\r\n?)([A-Za-z0-9+/\n\r]+=*)(\n\r?|\r\n?)(-+END CERTIFICATE-+)/g;
97
- const publicKeys = [];
98
- // Match all possible certificates, in the order they are in the file. These will form the chain that is used for x5c
99
- let match;
100
- do {
101
- match = certificatePattern.exec(certificateContents);
102
- if (match) {
103
- publicKeys.push(match[3]);
104
- }
105
- } while (match);
106
- if (publicKeys.length === 0) {
107
- throw new Error("The file at the specified path does not contain a PEM-encoded certificate.");
108
- }
109
- const thumbprint = createHash("sha1")
110
- .update(Buffer.from(publicKeys[0], "base64"))
111
- .digest("hex")
112
- .toUpperCase();
113
- return {
114
- certificateContents,
115
- thumbprint,
116
- x5c,
117
- };
118
- }
119
- //# sourceMappingURL=clientCertificateCredential.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientCertificateCredential.js","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredential.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { MsalClient } from \"../msal/nodeFlows/msalClient\";\nimport { createMsalClient } from \"../msal/nodeFlows/msalClient\";\nimport { createHash, createPrivateKey } from \"crypto\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils\";\n\nimport type { CertificateParts } from \"../msal/types\";\nimport type { ClientCertificateCredentialOptions } from \"./clientCertificateCredentialOptions\";\nimport { credentialLogger } from \"../util/logging\";\nimport { readFile } from \"fs/promises\";\nimport { tracingClient } from \"../util/tracing\";\n\nconst credentialName = \"ClientCertificateCredential\";\nconst logger = credentialLogger(credentialName);\n\n/**\n * Required configuration options for the {@link ClientCertificateCredential}, with the string contents of a PEM certificate\n */\nexport interface ClientCertificatePEMCertificate {\n /**\n * The PEM-encoded public/private key certificate on the filesystem.\n */\n certificate: string;\n\n /**\n * The password for the certificate file.\n */\n certificatePassword?: string;\n}\n/**\n * Required configuration options for the {@link ClientCertificateCredential}, with the path to a PEM certificate.\n */\nexport interface ClientCertificatePEMCertificatePath {\n /**\n * The path to the PEM-encoded public/private key certificate on the filesystem.\n */\n certificatePath: string;\n\n /**\n * The password for the certificate file.\n */\n certificatePassword?: string;\n}\n/**\n * Required configuration options for the {@link ClientCertificateCredential}, with either the string contents of a PEM certificate, or the path to a PEM certificate.\n */\nexport type ClientCertificateCredentialPEMConfiguration =\n | ClientCertificatePEMCertificate\n | ClientCertificatePEMCertificatePath;\n\n/**\n * Enables authentication to Microsoft Entra ID using a PEM-encoded\n * certificate that is assigned to an App Registration. More information\n * on how to configure certificate authentication can be found here:\n *\n * https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad\n *\n */\nexport class ClientCertificateCredential implements TokenCredential {\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private certificateConfiguration: ClientCertificateCredentialPEMConfiguration;\n private sendCertificateChain?: boolean;\n private msalClient: MsalClient;\n\n /**\n * Creates an instance of the ClientCertificateCredential with the details\n * needed to authenticate against Microsoft Entra ID with a certificate.\n *\n * @param tenantId - The Microsoft Entra tenant (directory) ID.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param certificatePath - The path to a PEM-encoded public/private key certificate on the filesystem.\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n tenantId: string,\n clientId: string,\n certificatePath: string,\n options?: ClientCertificateCredentialOptions,\n );\n /**\n * Creates an instance of the ClientCertificateCredential with the details\n * needed to authenticate against Microsoft Entra ID with a certificate.\n *\n * @param tenantId - The Microsoft Entra tenant (directory) ID.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param configuration - Other parameters required, including the path of the certificate on the filesystem.\n * If the type is ignored, we will throw the value of the path to a PEM certificate.\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n tenantId: string,\n clientId: string,\n configuration: ClientCertificatePEMCertificatePath,\n options?: ClientCertificateCredentialOptions,\n );\n /**\n * Creates an instance of the ClientCertificateCredential with the details\n * needed to authenticate against Microsoft Entra ID with a certificate.\n *\n * @param tenantId - The Microsoft Entra tenant (directory) ID.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param configuration - Other parameters required, including the PEM-encoded certificate as a string.\n * If the type is ignored, we will throw the value of the PEM-encoded certificate.\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n tenantId: string,\n clientId: string,\n configuration: ClientCertificatePEMCertificate,\n options?: ClientCertificateCredentialOptions,\n );\n constructor(\n tenantId: string,\n clientId: string,\n certificatePathOrConfiguration: string | ClientCertificateCredentialPEMConfiguration,\n options: ClientCertificateCredentialOptions = {},\n ) {\n if (!tenantId || !clientId) {\n throw new Error(`${credentialName}: tenantId and clientId are required parameters.`);\n }\n\n this.tenantId = tenantId;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n\n this.sendCertificateChain = options.sendCertificateChain;\n\n this.certificateConfiguration = {\n ...(typeof certificatePathOrConfiguration === \"string\"\n ? {\n certificatePath: certificatePathOrConfiguration,\n }\n : certificatePathOrConfiguration),\n };\n const certificate: string | undefined = (\n this.certificateConfiguration as ClientCertificatePEMCertificate\n ).certificate;\n const certificatePath: string | undefined = (\n this.certificateConfiguration as ClientCertificatePEMCertificatePath\n ).certificatePath;\n if (!this.certificateConfiguration || !(certificate || certificatePath)) {\n throw new Error(\n `${credentialName}: Provide either a PEM certificate in string form, or the path to that certificate in the filesystem. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`,\n );\n }\n if (certificate && certificatePath) {\n throw new Error(\n `${credentialName}: To avoid unexpected behaviors, providing both the contents of a PEM certificate and the path to a PEM certificate is forbidden. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`,\n );\n }\n this.msalClient = createMsalClient(clientId, tenantId, {\n ...options,\n logger,\n tokenCredentialOptions: options,\n });\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n async getToken(scopes: string | string[], options: GetTokenOptions = {}): Promise<AccessToken> {\n return tracingClient.withSpan(`${credentialName}.getToken`, options, async (newOptions) => {\n newOptions.tenantId = processMultiTenantRequest(\n this.tenantId,\n newOptions,\n this.additionallyAllowedTenantIds,\n logger,\n );\n\n const arrayScopes = Array.isArray(scopes) ? scopes : [scopes];\n const certificate = await this.buildClientCertificate();\n return this.msalClient.getTokenByClientCertificate(arrayScopes, certificate, newOptions);\n });\n }\n\n private async buildClientCertificate(): Promise<CertificateParts> {\n const parts = await parseCertificate(\n this.certificateConfiguration,\n this.sendCertificateChain ?? false,\n );\n\n let privateKey: string;\n if (this.certificateConfiguration.certificatePassword !== undefined) {\n privateKey = createPrivateKey({\n key: parts.certificateContents,\n passphrase: this.certificateConfiguration.certificatePassword,\n format: \"pem\",\n })\n .export({\n format: \"pem\",\n type: \"pkcs8\",\n })\n .toString();\n } else {\n privateKey = parts.certificateContents;\n }\n\n return {\n thumbprint: parts.thumbprint,\n privateKey,\n x5c: parts.x5c,\n };\n }\n}\n\n/**\n * Parses a certificate into its relevant parts\n *\n * @param certificateConfiguration - The certificate contents or path to the certificate\n * @param sendCertificateChain - true if the entire certificate chain should be sent for SNI, false otherwise\n * @returns The parsed certificate parts and the certificate contents\n */\nexport async function parseCertificate(\n certificateConfiguration: ClientCertificateCredentialPEMConfiguration,\n sendCertificateChain: boolean,\n): Promise<Omit<CertificateParts, \"privateKey\"> & { certificateContents: string }> {\n const certificate: string | undefined = (\n certificateConfiguration as ClientCertificatePEMCertificate\n ).certificate;\n const certificatePath: string | undefined = (\n certificateConfiguration as ClientCertificatePEMCertificatePath\n ).certificatePath;\n const certificateContents = certificate || (await readFile(certificatePath!, \"utf8\"));\n const x5c = sendCertificateChain ? certificateContents : undefined;\n\n const certificatePattern =\n /(-+BEGIN CERTIFICATE-+)(\\n\\r?|\\r\\n?)([A-Za-z0-9+/\\n\\r]+=*)(\\n\\r?|\\r\\n?)(-+END CERTIFICATE-+)/g;\n const publicKeys: string[] = [];\n\n // Match all possible certificates, in the order they are in the file. These will form the chain that is used for x5c\n let match;\n do {\n match = certificatePattern.exec(certificateContents);\n if (match) {\n publicKeys.push(match[3]);\n }\n } while (match);\n\n if (publicKeys.length === 0) {\n throw new Error(\"The file at the specified path does not contain a PEM-encoded certificate.\");\n }\n\n const thumbprint = createHash(\"sha1\")\n .update(Buffer.from(publicKeys[0], \"base64\"))\n .digest(\"hex\")\n .toUpperCase();\n\n return {\n certificateContents,\n thumbprint,\n x5c,\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientCertificateCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/clientCertificateCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions\";\n\n/**\n * Optional parameters for the {@link ClientCertificateCredential} class.\n */\nexport interface ClientCertificateCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {\n /**\n * Option to include x5c header for SubjectName and Issuer name authorization.\n * Set this option to send base64 encoded public certificate in the client assertion header as an x5c claim\n */\n sendCertificateChain?: boolean;\n // TODO: Export again once we're ready to release this feature.\n // /**\n // * Specifies a regional authority. Please refer to the {@link RegionalAuthority} type for the accepted values.\n // * If {@link RegionalAuthority.AutoDiscoverRegion} is specified, we will try to discover the regional authority endpoint.\n // * If the property is not specified, the credential uses the global authority endpoint.\n // */\n // regionalAuthority?: string;\n}\n"]}
@@ -1,83 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
4
- import { credentialLogger, formatError, formatSuccess } from "../util/logging";
5
- import { processMultiTenantRequest, resolveAdditionallyAllowedTenantIds, } from "../util/tenantIdUtils";
6
- import { IdentityClient } from "../client/identityClient";
7
- import { getIdentityTokenEndpointSuffix } from "../util/identityTokenEndpoint";
8
- import { tracingClient } from "../util/tracing";
9
- const logger = credentialLogger("ClientSecretCredential");
10
- // This credential is exported on browser bundles for development purposes.
11
- // For this credential to work in browsers, browsers would need to have security features disabled.
12
- // Please do not disable your browser security features.
13
- /**
14
- * Enables authentication to Microsoft Entra ID using a client secret
15
- * that was generated for an App Registration. More information on how
16
- * to configure a client secret can be found here:
17
- *
18
- * https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application
19
- *
20
- */
21
- export class ClientSecretCredential {
22
- /**
23
- * Creates an instance of the ClientSecretCredential with the details
24
- * needed to authenticate against Microsoft Entra ID with a client
25
- * secret.
26
- *
27
- * @param tenantId - The Microsoft Entra tenant (directory) ID.
28
- * @param clientId - The client (application) ID of an App Registration in the tenant.
29
- * @param clientSecret - A client secret that was generated for the App Registration.
30
- * @param options - Options for configuring the client which makes the authentication request.
31
- */
32
- constructor(tenantId, clientId, clientSecret, options) {
33
- this.identityClient = new IdentityClient(options);
34
- this.tenantId = tenantId;
35
- this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(options === null || options === void 0 ? void 0 : options.additionallyAllowedTenants);
36
- this.clientId = clientId;
37
- this.clientSecret = clientSecret;
38
- }
39
- /**
40
- * Authenticates with Microsoft Entra ID and returns an access token if
41
- * successful. If authentication cannot be performed at this time, this method may
42
- * return null. If an error occurs during authentication, an {@link AuthenticationError}
43
- * containing failure details will be thrown.
44
- *
45
- * @param scopes - The list of scopes for which the token will have access.
46
- * @param options - The options used to configure any requests this
47
- * TokenCredential implementation might make.
48
- */
49
- async getToken(scopes, options = {}) {
50
- return tracingClient.withSpan(`${this.constructor.name}.getToken`, options, async (newOptions) => {
51
- const tenantId = processMultiTenantRequest(this.tenantId, newOptions, this.additionallyAllowedTenantIds);
52
- const query = new URLSearchParams({
53
- response_type: "token",
54
- grant_type: "client_credentials",
55
- client_id: this.clientId,
56
- client_secret: this.clientSecret,
57
- scope: typeof scopes === "string" ? scopes : scopes.join(" "),
58
- });
59
- try {
60
- const urlSuffix = getIdentityTokenEndpointSuffix(tenantId);
61
- const request = createPipelineRequest({
62
- url: `${this.identityClient.authorityHost}/${tenantId}/${urlSuffix}`,
63
- method: "POST",
64
- body: query.toString(),
65
- headers: createHttpHeaders({
66
- Accept: "application/json",
67
- "Content-Type": "application/x-www-form-urlencoded",
68
- }),
69
- abortSignal: options && options.abortSignal,
70
- tracingOptions: newOptions === null || newOptions === void 0 ? void 0 : newOptions.tracingOptions,
71
- });
72
- const tokenResponse = await this.identityClient.sendTokenRequest(request);
73
- logger.getToken.info(formatSuccess(scopes));
74
- return (tokenResponse && tokenResponse.accessToken) || null;
75
- }
76
- catch (err) {
77
- logger.getToken.info(formatError(scopes, err));
78
- throw err;
79
- }
80
- });
81
- }
82
- }
83
- //# sourceMappingURL=clientSecretCredential.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientSecretCredential.browser.js","sourceRoot":"","sources":["../../../src/credentials/clientSecretCredential.browser.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { credentialLogger, formatError, formatSuccess } from \"../util/logging\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils\";\nimport type { ClientSecretCredentialOptions } from \"./clientSecretCredentialOptions\";\nimport { IdentityClient } from \"../client/identityClient\";\nimport { getIdentityTokenEndpointSuffix } from \"../util/identityTokenEndpoint\";\nimport { tracingClient } from \"../util/tracing\";\n\nconst logger = credentialLogger(\"ClientSecretCredential\");\n\n// This credential is exported on browser bundles for development purposes.\n// For this credential to work in browsers, browsers would need to have security features disabled.\n// Please do not disable your browser security features.\n\n/**\n * Enables authentication to Microsoft Entra ID using a client secret\n * that was generated for an App Registration. More information on how\n * to configure a client secret can be found here:\n *\n * https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application\n *\n */\nexport class ClientSecretCredential implements TokenCredential {\n private identityClient: IdentityClient;\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private clientId: string;\n private clientSecret: string;\n\n /**\n * Creates an instance of the ClientSecretCredential with the details\n * needed to authenticate against Microsoft Entra ID with a client\n * secret.\n *\n * @param tenantId - The Microsoft Entra tenant (directory) ID.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param clientSecret - A client secret that was generated for the App Registration.\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n tenantId: string,\n clientId: string,\n clientSecret: string,\n options?: ClientSecretCredentialOptions,\n ) {\n this.identityClient = new IdentityClient(options);\n this.tenantId = tenantId;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n this.clientId = clientId;\n this.clientSecret = clientSecret;\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if\n * successful. If authentication cannot be performed at this time, this method may\n * return null. If an error occurs during authentication, an {@link AuthenticationError}\n * containing failure details will be thrown.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options: GetTokenOptions = {},\n ): Promise<AccessToken | null> {\n return tracingClient.withSpan(\n `${this.constructor.name}.getToken`,\n options,\n async (newOptions) => {\n const tenantId = processMultiTenantRequest(\n this.tenantId,\n newOptions,\n this.additionallyAllowedTenantIds,\n );\n\n const query = new URLSearchParams({\n response_type: \"token\",\n grant_type: \"client_credentials\",\n client_id: this.clientId,\n client_secret: this.clientSecret,\n scope: typeof scopes === \"string\" ? scopes : scopes.join(\" \"),\n });\n\n try {\n const urlSuffix = getIdentityTokenEndpointSuffix(tenantId!);\n const request = createPipelineRequest({\n url: `${this.identityClient.authorityHost}/${tenantId!}/${urlSuffix}`,\n method: \"POST\",\n body: query.toString(),\n headers: createHttpHeaders({\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n }),\n abortSignal: options && options.abortSignal,\n tracingOptions: newOptions?.tracingOptions,\n });\n\n const tokenResponse = await this.identityClient.sendTokenRequest(request);\n logger.getToken.info(formatSuccess(scopes));\n return (tokenResponse && tokenResponse.accessToken) || null;\n } catch (err: any) {\n logger.getToken.info(formatError(scopes, err));\n throw err;\n }\n },\n );\n }\n}\n"]}
@@ -1,60 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { createMsalClient } from "../msal/nodeFlows/msalClient";
4
- import { processMultiTenantRequest, resolveAdditionallyAllowedTenantIds, } from "../util/tenantIdUtils";
5
- import { CredentialUnavailableError } from "../errors";
6
- import { credentialLogger } from "../util/logging";
7
- import { ensureScopes } from "../util/scopeUtils";
8
- import { tracingClient } from "../util/tracing";
9
- const logger = credentialLogger("ClientSecretCredential");
10
- /**
11
- * Enables authentication to Microsoft Entra ID using a client secret
12
- * that was generated for an App Registration. More information on how
13
- * to configure a client secret can be found here:
14
- *
15
- * https://learn.microsoft.com/entra/identity-platform/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application
16
- *
17
- */
18
- export class ClientSecretCredential {
19
- /**
20
- * Creates an instance of the ClientSecretCredential with the details
21
- * needed to authenticate against Microsoft Entra ID with a client
22
- * secret.
23
- *
24
- * @param tenantId - The Microsoft Entra tenant (directory) ID.
25
- * @param clientId - The client (application) ID of an App Registration in the tenant.
26
- * @param clientSecret - A client secret that was generated for the App Registration.
27
- * @param options - Options for configuring the client which makes the authentication request.
28
- */
29
- constructor(tenantId, clientId, clientSecret, options = {}) {
30
- if (!tenantId) {
31
- throw new CredentialUnavailableError("ClientSecretCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");
32
- }
33
- if (!clientId) {
34
- throw new CredentialUnavailableError("ClientSecretCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");
35
- }
36
- if (!clientSecret) {
37
- throw new CredentialUnavailableError("ClientSecretCredential: clientSecret is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");
38
- }
39
- this.clientSecret = clientSecret;
40
- this.tenantId = tenantId;
41
- this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(options === null || options === void 0 ? void 0 : options.additionallyAllowedTenants);
42
- this.msalClient = createMsalClient(clientId, tenantId, Object.assign(Object.assign({}, options), { logger, tokenCredentialOptions: options }));
43
- }
44
- /**
45
- * Authenticates with Microsoft Entra ID and returns an access token if successful.
46
- * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
47
- *
48
- * @param scopes - The list of scopes for which the token will have access.
49
- * @param options - The options used to configure any requests this
50
- * TokenCredential implementation might make.
51
- */
52
- async getToken(scopes, options = {}) {
53
- return tracingClient.withSpan(`${this.constructor.name}.getToken`, options, async (newOptions) => {
54
- newOptions.tenantId = processMultiTenantRequest(this.tenantId, newOptions, this.additionallyAllowedTenantIds, logger);
55
- const arrayScopes = ensureScopes(scopes);
56
- return this.msalClient.getTokenByClientSecret(arrayScopes, this.clientSecret, newOptions);
57
- });
58
- }
59
- }
60
- //# sourceMappingURL=clientSecretCredential.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientSecretCredential.js","sourceRoot":"","sources":["../../../src/credentials/clientSecretCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EACL,yBAAyB,EACzB,mCAAmC,GACpC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,MAAM,GAAG,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,OAAO,sBAAsB;IAMjC;;;;;;;;;OASG;IACH,YACE,QAAgB,EAChB,QAAgB,EAChB,YAAoB,EACpB,UAAyC,EAAE;QAE3C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAA0B,CAClC,gKAAgK,CACjK,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAA0B,CAClC,gKAAgK,CACjK,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,0BAA0B,CAClC,oKAAoK,CACrK,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,4BAA4B,GAAG,mCAAmC,CACrE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B,CACpC,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,kCAChD,OAAO,KACV,MAAM,EACN,sBAAsB,EAAE,OAAO,IAC/B,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAyB,EAAE,UAA2B,EAAE;QACrE,OAAO,aAAa,CAAC,QAAQ,CAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,WAAW,EACnC,OAAO,EACP,KAAK,EAAE,UAAU,EAAE,EAAE;YACnB,UAAU,CAAC,QAAQ,GAAG,yBAAyB,CAC7C,IAAI,CAAC,QAAQ,EACb,UAAU,EACV,IAAI,CAAC,4BAA4B,EACjC,MAAM,CACP,CAAC;YAEF,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;YACzC,OAAO,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAC5F,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type { MsalClient } from \"../msal/nodeFlows/msalClient\";\nimport { createMsalClient } from \"../msal/nodeFlows/msalClient\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils\";\n\nimport type { ClientSecretCredentialOptions } from \"./clientSecretCredentialOptions\";\nimport { CredentialUnavailableError } from \"../errors\";\nimport { credentialLogger } from \"../util/logging\";\nimport { ensureScopes } from \"../util/scopeUtils\";\nimport { tracingClient } from \"../util/tracing\";\n\nconst logger = credentialLogger(\"ClientSecretCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a client secret\n * that was generated for an App Registration. More information on how\n * to configure a client secret can be found here:\n *\n * https://learn.microsoft.com/entra/identity-platform/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application\n *\n */\nexport class ClientSecretCredential implements TokenCredential {\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private msalClient: MsalClient;\n private clientSecret: string;\n\n /**\n * Creates an instance of the ClientSecretCredential with the details\n * needed to authenticate against Microsoft Entra ID with a client\n * secret.\n *\n * @param tenantId - The Microsoft Entra tenant (directory) ID.\n * @param clientId - The client (application) ID of an App Registration in the tenant.\n * @param clientSecret - A client secret that was generated for the App Registration.\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(\n tenantId: string,\n clientId: string,\n clientSecret: string,\n options: ClientSecretCredentialOptions = {},\n ) {\n if (!tenantId) {\n throw new CredentialUnavailableError(\n \"ClientSecretCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.\",\n );\n }\n\n if (!clientId) {\n throw new CredentialUnavailableError(\n \"ClientSecretCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.\",\n );\n }\n\n if (!clientSecret) {\n throw new CredentialUnavailableError(\n \"ClientSecretCredential: clientSecret is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.\",\n );\n }\n\n this.clientSecret = clientSecret;\n this.tenantId = tenantId;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n\n this.msalClient = createMsalClient(clientId, tenantId, {\n ...options,\n logger,\n tokenCredentialOptions: options,\n });\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n async getToken(scopes: string | string[], options: GetTokenOptions = {}): Promise<AccessToken> {\n return tracingClient.withSpan(\n `${this.constructor.name}.getToken`,\n options,\n async (newOptions) => {\n newOptions.tenantId = processMultiTenantRequest(\n this.tenantId,\n newOptions,\n this.additionallyAllowedTenantIds,\n logger,\n );\n\n const arrayScopes = ensureScopes(scopes);\n return this.msalClient.getTokenByClientSecret(arrayScopes, this.clientSecret, newOptions);\n },\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientSecretCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/clientSecretCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions\";\n\n/**\n * Optional parameters for the {@link ClientSecretCredential} class.\n */\nexport interface ClientSecretCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {\n // TODO: Export again once we're ready to release this feature.\n // /**\n // * Specifies a regional authority. Please refer to the {@link RegionalAuthority} type for the accepted values.\n // * If {@link RegionalAuthority.AutoDiscoverRegion} is specified, we will try to discover the regional authority endpoint.\n // * If the property is not specified, the credential uses the global authority endpoint.\n // */\n // regionalAuthority?: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"credentialPersistenceOptions.js","sourceRoot":"","sources":["../../../src/credentials/credentialPersistenceOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCachePersistenceOptions } from \"../msal/nodeFlows/tokenCachePersistenceOptions\";\n\n/**\n * Shared configuration options for credentials that support persistent token\n * caching.\n */\nexport interface CredentialPersistenceOptions {\n /**\n * Options to provide to the persistence layer (if one is available) when\n * storing credentials.\n *\n * You must first register a persistence provider plugin. See the\n * `@azure/identity-cache-persistence` package on NPM.\n *\n * Example:\n *\n * ```ts snippet:credential_persistence_options_example\n * import { useIdentityPlugin, DeviceCodeCredential } from \"@azure/identity\";\n *\n * useIdentityPlugin(cachePersistencePlugin);\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n * ```\n */\n\n tokenCachePersistenceOptions?: TokenCachePersistenceOptions;\n}\n"]}
@@ -1,29 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { credentialLogger, formatError } from "../util/logging";
4
- import { ChainedTokenCredential } from "./chainedTokenCredential";
5
- const BrowserNotSupportedError = new Error("DefaultAzureCredential is not supported in the browser. Use InteractiveBrowserCredential instead.");
6
- const logger = credentialLogger("DefaultAzureCredential");
7
- /**
8
- * Provides a default {@link ChainedTokenCredential} configuration for
9
- * applications that will be deployed to Azure.
10
- *
11
- * Only available in Node.js.
12
- */
13
- export class DefaultAzureCredential extends ChainedTokenCredential {
14
- /**
15
- * Creates an instance of the DefaultAzureCredential class.
16
- *
17
- * @param options - Options for configuring the client which makes the authentication request.
18
- */
19
- constructor(_tokenCredentialOptions) {
20
- super();
21
- logger.info(formatError("", BrowserNotSupportedError));
22
- throw BrowserNotSupportedError;
23
- }
24
- getToken() {
25
- logger.getToken.info(formatError("", BrowserNotSupportedError));
26
- throw BrowserNotSupportedError;
27
- }
28
- }
29
- //# sourceMappingURL=defaultAzureCredential.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultAzureCredential.browser.js","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,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\";\nimport type { AccessToken } from \"@azure/core-auth\";\nimport { ChainedTokenCredential } from \"./chainedTokenCredential\";\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions\";\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,164 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { ManagedIdentityCredential } from "./managedIdentityCredential";
4
- import { AzureCliCredential } from "./azureCliCredential";
5
- import { AzureDeveloperCliCredential } from "./azureDeveloperCliCredential";
6
- import { AzurePowerShellCredential } from "./azurePowerShellCredential";
7
- import { ChainedTokenCredential } from "./chainedTokenCredential";
8
- import { EnvironmentCredential } from "./environmentCredential";
9
- import { WorkloadIdentityCredential } from "./workloadIdentityCredential";
10
- import { credentialLogger } from "../util/logging";
11
- const logger = credentialLogger("DefaultAzureCredential");
12
- /**
13
- * Creates a {@link ManagedIdentityCredential} from the provided options.
14
- * @param options - Options to configure the credential.
15
- *
16
- * @internal
17
- */
18
- export function createDefaultManagedIdentityCredential(options = {}) {
19
- var _a, _b, _c, _d;
20
- (_a = options.retryOptions) !== null && _a !== void 0 ? _a : (options.retryOptions = {
21
- maxRetries: 5,
22
- retryDelayInMs: 800,
23
- });
24
- const managedIdentityClientId = (_b = options === null || options === void 0 ? void 0 : options.managedIdentityClientId) !== null && _b !== void 0 ? _b : process.env.AZURE_CLIENT_ID;
25
- const workloadIdentityClientId = (_c = options === null || options === void 0 ? void 0 : options.workloadIdentityClientId) !== null && _c !== void 0 ? _c : managedIdentityClientId;
26
- const managedResourceId = options === null || options === void 0 ? void 0 : options.managedIdentityResourceId;
27
- const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;
28
- const tenantId = (_d = options === null || options === void 0 ? void 0 : options.tenantId) !== null && _d !== void 0 ? _d : process.env.AZURE_TENANT_ID;
29
- if (managedResourceId) {
30
- const managedIdentityResourceIdOptions = Object.assign(Object.assign({}, options), { resourceId: managedResourceId });
31
- return new ManagedIdentityCredential(managedIdentityResourceIdOptions);
32
- }
33
- if (workloadFile && workloadIdentityClientId) {
34
- const workloadIdentityCredentialOptions = Object.assign(Object.assign({}, options), { tenantId: tenantId });
35
- return new ManagedIdentityCredential(workloadIdentityClientId, workloadIdentityCredentialOptions);
36
- }
37
- if (managedIdentityClientId) {
38
- const managedIdentityClientOptions = Object.assign(Object.assign({}, options), { clientId: managedIdentityClientId });
39
- return new ManagedIdentityCredential(managedIdentityClientOptions);
40
- }
41
- // We may be able to return a UnavailableCredential here, but that may be a breaking change
42
- return new ManagedIdentityCredential(options);
43
- }
44
- /**
45
- * Creates a {@link WorkloadIdentityCredential} from the provided options.
46
- * @param options - Options to configure the credential.
47
- *
48
- * @internal
49
- */
50
- function createDefaultWorkloadIdentityCredential(options) {
51
- var _a, _b, _c;
52
- const managedIdentityClientId = (_a = options === null || options === void 0 ? void 0 : options.managedIdentityClientId) !== null && _a !== void 0 ? _a : process.env.AZURE_CLIENT_ID;
53
- const workloadIdentityClientId = (_b = options === null || options === void 0 ? void 0 : options.workloadIdentityClientId) !== null && _b !== void 0 ? _b : managedIdentityClientId;
54
- const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;
55
- const tenantId = (_c = options === null || options === void 0 ? void 0 : options.tenantId) !== null && _c !== void 0 ? _c : process.env.AZURE_TENANT_ID;
56
- if (workloadFile && workloadIdentityClientId) {
57
- const workloadIdentityCredentialOptions = Object.assign(Object.assign({}, options), { tenantId, clientId: workloadIdentityClientId, tokenFilePath: workloadFile });
58
- return new WorkloadIdentityCredential(workloadIdentityCredentialOptions);
59
- }
60
- if (tenantId) {
61
- const workloadIdentityClientTenantOptions = Object.assign(Object.assign({}, options), { tenantId });
62
- return new WorkloadIdentityCredential(workloadIdentityClientTenantOptions);
63
- }
64
- // We may be able to return a UnavailableCredential here, but that may be a breaking change
65
- return new WorkloadIdentityCredential(options);
66
- }
67
- /**
68
- * Creates a {@link AzureDeveloperCliCredential} from the provided options.
69
- * @param options - Options to configure the credential.
70
- *
71
- * @internal
72
- */
73
- function createDefaultAzureDeveloperCliCredential(options = {}) {
74
- const processTimeoutInMs = options.processTimeoutInMs;
75
- return new AzureDeveloperCliCredential(Object.assign({ processTimeoutInMs }, options));
76
- }
77
- /**
78
- * Creates a {@link AzureCliCredential} from the provided options.
79
- * @param options - Options to configure the credential.
80
- *
81
- * @internal
82
- */
83
- function createDefaultAzureCliCredential(options = {}) {
84
- const processTimeoutInMs = options.processTimeoutInMs;
85
- return new AzureCliCredential(Object.assign({ processTimeoutInMs }, options));
86
- }
87
- /**
88
- * Creates a {@link AzurePowerShellCredential} from the provided options.
89
- * @param options - Options to configure the credential.
90
- *
91
- * @internal
92
- */
93
- function createDefaultAzurePowershellCredential(options = {}) {
94
- const processTimeoutInMs = options.processTimeoutInMs;
95
- return new AzurePowerShellCredential(Object.assign({ processTimeoutInMs }, options));
96
- }
97
- /**
98
- * Creates an {@link EnvironmentCredential} from the provided options.
99
- * @param options - Options to configure the credential.
100
- *
101
- * @internal
102
- */
103
- export function createEnvironmentCredential(options = {}) {
104
- return new EnvironmentCredential(options);
105
- }
106
- /**
107
- * A no-op credential that logs the reason it was skipped if getToken is called.
108
- * @internal
109
- */
110
- export class UnavailableDefaultCredential {
111
- constructor(credentialName, message) {
112
- this.credentialName = credentialName;
113
- this.credentialUnavailableErrorMessage = message;
114
- }
115
- getToken() {
116
- logger.getToken.info(`Skipping ${this.credentialName}, reason: ${this.credentialUnavailableErrorMessage}`);
117
- return Promise.resolve(null);
118
- }
119
- }
120
- /**
121
- * Provides a default {@link ChainedTokenCredential} configuration that works for most
122
- * applications that use Azure SDK client libraries. For more information, see
123
- * [DefaultAzureCredential overview](https://aka.ms/azsdk/js/identity/credential-chains#use-defaultazurecredential-for-flexibility).
124
- *
125
- * The following credential types will be tried, in order:
126
- *
127
- * - {@link EnvironmentCredential}
128
- * - {@link WorkloadIdentityCredential}
129
- * - {@link ManagedIdentityCredential}
130
- * - {@link AzureCliCredential}
131
- * - {@link AzurePowerShellCredential}
132
- * - {@link AzureDeveloperCliCredential}
133
- *
134
- * Consult the documentation of these credential types for more information
135
- * on how they attempt authentication.
136
- */
137
- export class DefaultAzureCredential extends ChainedTokenCredential {
138
- constructor(options) {
139
- const credentialFunctions = [
140
- createEnvironmentCredential,
141
- createDefaultWorkloadIdentityCredential,
142
- createDefaultManagedIdentityCredential,
143
- createDefaultAzureCliCredential,
144
- createDefaultAzurePowershellCredential,
145
- createDefaultAzureDeveloperCliCredential,
146
- ];
147
- // DefaultCredential constructors should not throw, instead throwing on getToken() which is handled by ChainedTokenCredential.
148
- // When adding new credentials to the default chain, consider:
149
- // 1. Making the constructor parameters required and explicit
150
- // 2. Validating any required parameters in the factory function
151
- // 3. Returning a UnavailableDefaultCredential from the factory function if a credential is unavailable for any reason
152
- const credentials = credentialFunctions.map((createCredentialFn) => {
153
- try {
154
- return createCredentialFn(options);
155
- }
156
- catch (err) {
157
- logger.warning(`Skipped ${createCredentialFn.name} because of an error creating the credential: ${err}`);
158
- return new UnavailableDefaultCredential(createCredentialFn.name, err.message);
159
- }
160
- });
161
- super(...credentials);
162
- }
163
- }
164
- //# sourceMappingURL=defaultAzureCredential.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultAzureCredential.js","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredential.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialResourceIdOptions,\n} from \"./defaultAzureCredentialOptions\";\nimport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n} from \"./managedIdentityCredential\";\nimport { ManagedIdentityCredential } from \"./managedIdentityCredential\";\n\nimport { AzureCliCredential } from \"./azureCliCredential\";\nimport { AzureDeveloperCliCredential } from \"./azureDeveloperCliCredential\";\nimport { AzurePowerShellCredential } from \"./azurePowerShellCredential\";\nimport { ChainedTokenCredential } from \"./chainedTokenCredential\";\nimport { EnvironmentCredential } from \"./environmentCredential\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { WorkloadIdentityCredential } from \"./workloadIdentityCredential\";\nimport type { WorkloadIdentityCredentialOptions } from \"./workloadIdentityCredentialOptions\";\nimport { credentialLogger } from \"../util/logging\";\n\nconst logger = credentialLogger(\"DefaultAzureCredential\");\n\n/**\n * Creates a {@link ManagedIdentityCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createDefaultManagedIdentityCredential(\n options:\n | DefaultAzureCredentialOptions\n | DefaultAzureCredentialResourceIdOptions\n | DefaultAzureCredentialClientIdOptions = {},\n): TokenCredential {\n options.retryOptions ??= {\n maxRetries: 5,\n retryDelayInMs: 800,\n };\n const managedIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.managedIdentityClientId ??\n process.env.AZURE_CLIENT_ID;\n const workloadIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.workloadIdentityClientId ??\n managedIdentityClientId;\n const managedResourceId = (options as DefaultAzureCredentialResourceIdOptions)\n ?.managedIdentityResourceId;\n const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;\n const tenantId = options?.tenantId ?? process.env.AZURE_TENANT_ID;\n if (managedResourceId) {\n const managedIdentityResourceIdOptions: ManagedIdentityCredentialResourceIdOptions = {\n ...options,\n resourceId: managedResourceId,\n };\n return new ManagedIdentityCredential(managedIdentityResourceIdOptions);\n }\n\n if (workloadFile && workloadIdentityClientId) {\n const workloadIdentityCredentialOptions: DefaultAzureCredentialOptions = {\n ...options,\n tenantId: tenantId,\n };\n\n return new ManagedIdentityCredential(\n workloadIdentityClientId,\n workloadIdentityCredentialOptions,\n );\n }\n\n if (managedIdentityClientId) {\n const managedIdentityClientOptions: ManagedIdentityCredentialClientIdOptions = {\n ...options,\n clientId: managedIdentityClientId,\n };\n\n return new ManagedIdentityCredential(managedIdentityClientOptions);\n }\n\n // We may be able to return a UnavailableCredential here, but that may be a breaking change\n return new ManagedIdentityCredential(options);\n}\n\n/**\n * Creates a {@link WorkloadIdentityCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nfunction createDefaultWorkloadIdentityCredential(\n options?: DefaultAzureCredentialOptions | DefaultAzureCredentialClientIdOptions,\n): TokenCredential {\n const managedIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.managedIdentityClientId ??\n process.env.AZURE_CLIENT_ID;\n const workloadIdentityClientId =\n (options as DefaultAzureCredentialClientIdOptions)?.workloadIdentityClientId ??\n managedIdentityClientId;\n const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;\n const tenantId = options?.tenantId ?? process.env.AZURE_TENANT_ID;\n if (workloadFile && workloadIdentityClientId) {\n const workloadIdentityCredentialOptions: WorkloadIdentityCredentialOptions = {\n ...options,\n tenantId,\n clientId: workloadIdentityClientId,\n tokenFilePath: workloadFile,\n };\n return new WorkloadIdentityCredential(workloadIdentityCredentialOptions);\n }\n if (tenantId) {\n const workloadIdentityClientTenantOptions: WorkloadIdentityCredentialOptions = {\n ...options,\n tenantId,\n };\n return new WorkloadIdentityCredential(workloadIdentityClientTenantOptions);\n }\n\n // We may be able to return a UnavailableCredential here, but that may be a breaking change\n return new WorkloadIdentityCredential(options);\n}\n\n/**\n * Creates a {@link AzureDeveloperCliCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nfunction createDefaultAzureDeveloperCliCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n const processTimeoutInMs = options.processTimeoutInMs;\n return new AzureDeveloperCliCredential({ processTimeoutInMs, ...options });\n}\n\n/**\n * Creates a {@link AzureCliCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nfunction createDefaultAzureCliCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n const processTimeoutInMs = options.processTimeoutInMs;\n return new AzureCliCredential({ processTimeoutInMs, ...options });\n}\n\n/**\n * Creates a {@link AzurePowerShellCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nfunction createDefaultAzurePowershellCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n const processTimeoutInMs = options.processTimeoutInMs;\n return new AzurePowerShellCredential({ processTimeoutInMs, ...options });\n}\n\n/**\n * Creates an {@link EnvironmentCredential} from the provided options.\n * @param options - Options to configure the credential.\n *\n * @internal\n */\nexport function createEnvironmentCredential(\n options: DefaultAzureCredentialOptions = {},\n): TokenCredential {\n return new EnvironmentCredential(options);\n}\n\n/**\n * A no-op credential that logs the reason it was skipped if getToken is called.\n * @internal\n */\nexport class UnavailableDefaultCredential implements TokenCredential {\n credentialUnavailableErrorMessage: string;\n credentialName: string;\n\n constructor(credentialName: string, message: string) {\n this.credentialName = credentialName;\n this.credentialUnavailableErrorMessage = message;\n }\n\n getToken(): Promise<null> {\n logger.getToken.info(\n `Skipping ${this.credentialName}, reason: ${this.credentialUnavailableErrorMessage}`,\n );\n return Promise.resolve(null);\n }\n}\n\n/**\n * Provides a default {@link ChainedTokenCredential} configuration that works for most\n * applications that use Azure SDK client libraries. For more information, see\n * [DefaultAzureCredential overview](https://aka.ms/azsdk/js/identity/credential-chains#use-defaultazurecredential-for-flexibility).\n *\n * The following credential types will be tried, in order:\n *\n * - {@link EnvironmentCredential}\n * - {@link WorkloadIdentityCredential}\n * - {@link ManagedIdentityCredential}\n * - {@link AzureCliCredential}\n * - {@link AzurePowerShellCredential}\n * - {@link AzureDeveloperCliCredential}\n *\n * Consult the documentation of these credential types for more information\n * on how they attempt authentication.\n */\nexport class DefaultAzureCredential extends ChainedTokenCredential {\n /**\n * Creates an instance of the DefaultAzureCredential class with {@link DefaultAzureCredentialClientIdOptions}.\n *\n * @param options - Optional parameters. See {@link DefaultAzureCredentialClientIdOptions}.\n */\n constructor(options?: DefaultAzureCredentialClientIdOptions);\n\n /**\n * Creates an instance of the DefaultAzureCredential class with {@link DefaultAzureCredentialResourceIdOptions}.\n *\n * @param options - Optional parameters. See {@link DefaultAzureCredentialResourceIdOptions}.\n */\n constructor(options?: DefaultAzureCredentialResourceIdOptions);\n\n /**\n * Creates an instance of the DefaultAzureCredential class with {@link DefaultAzureCredentialOptions}.\n *\n * @param options - Optional parameters. See {@link DefaultAzureCredentialOptions}.\n */\n constructor(options?: DefaultAzureCredentialOptions);\n\n constructor(options?: DefaultAzureCredentialOptions) {\n const credentialFunctions = [\n createEnvironmentCredential,\n createDefaultWorkloadIdentityCredential,\n createDefaultManagedIdentityCredential,\n createDefaultAzureCliCredential,\n createDefaultAzurePowershellCredential,\n createDefaultAzureDeveloperCliCredential,\n ];\n\n // DefaultCredential constructors should not throw, instead throwing on getToken() which is handled by ChainedTokenCredential.\n\n // When adding new credentials to the default chain, consider:\n // 1. Making the constructor parameters required and explicit\n // 2. Validating any required parameters in the factory function\n // 3. Returning a UnavailableDefaultCredential from the factory function if a credential is unavailable for any reason\n const credentials: TokenCredential[] = credentialFunctions.map((createCredentialFn) => {\n try {\n return createCredentialFn(options);\n } catch (err: any) {\n logger.warning(\n `Skipped ${createCredentialFn.name} because of an error creating the credential: ${err}`,\n );\n return new UnavailableDefaultCredential(createCredentialFn.name, err.message);\n }\n });\n\n super(...credentials);\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultAzureCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/defaultAzureCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions\";\n\n/**\n * Provides options to configure the {@link DefaultAzureCredential} class.\n * This variation supports `managedIdentityClientId` and not `managedIdentityResourceId`, since only one of both is supported.\n */\nexport interface DefaultAzureCredentialClientIdOptions extends DefaultAzureCredentialOptions {\n /**\n * Optionally pass in a user assigned client ID to be used by the {@link ManagedIdentityCredential}.\n * This client ID can also be passed through to the {@link ManagedIdentityCredential} through the environment variable: AZURE_CLIENT_ID.\n */\n managedIdentityClientId?: string;\n /**\n * Optionally pass in a user assigned client ID to be used by the {@link WorkloadIdentityCredential}.\n * This client ID can also be passed through to the {@link WorkloadIdentityCredential} through the environment variable: AZURE_CLIENT_ID.\n */\n workloadIdentityClientId?: string;\n}\n\n/**\n * Provides options to configure the {@link DefaultAzureCredential} class.\n * This variation supports `managedIdentityResourceId` and not `managedIdentityClientId`, since only one of both is supported.\n */\nexport interface DefaultAzureCredentialResourceIdOptions extends DefaultAzureCredentialOptions {\n /**\n * Optionally pass in a resource ID to be used by the {@link ManagedIdentityCredential}.\n * In scenarios such as when user assigned identities are created using an ARM template,\n * where the resource Id of the identity is known but the client Id can't be known ahead of time,\n * this parameter allows programs to use these user assigned identities\n * without having to first determine the client Id of the created identity.\n */\n managedIdentityResourceId: string;\n}\n\n/**\n * Provides options to configure the {@link DefaultAzureCredential} class.\n */\nexport interface DefaultAzureCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {\n /**\n * Optionally pass in a Tenant ID to be used as part of the credential.\n * By default it may use a generic tenant ID depending on the underlying credential.\n */\n tenantId?: string;\n\n /**\n * Timeout configurable for making token requests for developer credentials, namely, {@link AzurePowershellCredential},\n * {@link AzureDeveloperCliCredential} and {@link AzureCliCredential}.\n * Process timeout for credentials should be provided in milliseconds.\n */\n processTimeoutInMs?: number;\n}\n"]}
@@ -1,23 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { credentialLogger, formatError } from "../util/logging";
4
- const BrowserNotSupportedError = new Error("DeviceCodeCredential is not supported in the browser.");
5
- const logger = credentialLogger("DeviceCodeCredential");
6
- /**
7
- * Enables authentication to Microsoft Entra ID using a device code
8
- * that the user can enter into https://microsoft.com/devicelogin.
9
- */
10
- export class DeviceCodeCredential {
11
- /**
12
- * Only available in Node.js
13
- */
14
- constructor() {
15
- logger.info(formatError("", BrowserNotSupportedError));
16
- throw BrowserNotSupportedError;
17
- }
18
- getToken() {
19
- logger.getToken.info(formatError("", BrowserNotSupportedError));
20
- throw BrowserNotSupportedError;
21
- }
22
- }
23
- //# sourceMappingURL=deviceCodeCredential.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deviceCodeCredential.browser.js","sourceRoot":"","sources":["../../../src/credentials/deviceCodeCredential.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;AACpG,MAAM,MAAM,GAAG,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAEM,QAAQ;QACb,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, TokenCredential } from \"@azure/core-auth\";\n\nimport { credentialLogger, formatError } from \"../util/logging\";\n\nconst BrowserNotSupportedError = new Error(\"DeviceCodeCredential is not supported in the browser.\");\nconst logger = credentialLogger(\"DeviceCodeCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID using a device code\n * that the user can enter into https://microsoft.com/devicelogin.\n */\nexport class DeviceCodeCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}