@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
@@ -0,0 +1,482 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.generateMsalConfiguration = generateMsalConfiguration;
6
+ exports.createMsalClient = createMsalClient;
7
+ const tslib_1 = require("tslib");
8
+ const msal = tslib_1.__importStar(require("@azure/msal-node"));
9
+ const logging_js_1 = require("../../util/logging.js");
10
+ const msalPlugins_js_1 = require("./msalPlugins.js");
11
+ const utils_js_1 = require("../utils.js");
12
+ const errors_js_1 = require("../../errors.js");
13
+ const identityClient_js_1 = require("../../client/identityClient.js");
14
+ const regionalAuthority_js_1 = require("../../regionalAuthority.js");
15
+ const logger_1 = require("@azure/logger");
16
+ const tenantIdUtils_js_1 = require("../../util/tenantIdUtils.js");
17
+ /**
18
+ * The default logger used if no logger was passed in by the credential.
19
+ */
20
+ const msalLogger = (0, logging_js_1.credentialLogger)("MsalClient");
21
+ /**
22
+ * Generates the configuration for MSAL (Microsoft Authentication Library).
23
+ *
24
+ * @param clientId - The client ID of the application.
25
+ * @param tenantId - The tenant ID of the Azure Active Directory.
26
+ * @param msalClientOptions - Optional. Additional options for creating the MSAL client.
27
+ * @returns The MSAL configuration object.
28
+ */
29
+ function generateMsalConfiguration(clientId, tenantId, msalClientOptions = {}) {
30
+ var _a, _b, _c;
31
+ const resolvedTenant = (0, tenantIdUtils_js_1.resolveTenantId)((_a = msalClientOptions.logger) !== null && _a !== void 0 ? _a : msalLogger, tenantId, clientId);
32
+ // TODO: move and reuse getIdentityClientAuthorityHost
33
+ const authority = (0, utils_js_1.getAuthority)(resolvedTenant, (0, utils_js_1.getAuthorityHost)(msalClientOptions));
34
+ const httpClient = new identityClient_js_1.IdentityClient(Object.assign(Object.assign({}, msalClientOptions.tokenCredentialOptions), { authorityHost: authority, loggingOptions: msalClientOptions.loggingOptions }));
35
+ const msalConfig = {
36
+ auth: {
37
+ clientId,
38
+ authority,
39
+ knownAuthorities: (0, utils_js_1.getKnownAuthorities)(resolvedTenant, authority, msalClientOptions.disableInstanceDiscovery),
40
+ },
41
+ system: {
42
+ networkClient: httpClient,
43
+ loggerOptions: {
44
+ loggerCallback: (0, utils_js_1.defaultLoggerCallback)((_b = msalClientOptions.logger) !== null && _b !== void 0 ? _b : msalLogger),
45
+ logLevel: (0, utils_js_1.getMSALLogLevel)((0, logger_1.getLogLevel)()),
46
+ piiLoggingEnabled: (_c = msalClientOptions.loggingOptions) === null || _c === void 0 ? void 0 : _c.enableUnsafeSupportLogging,
47
+ },
48
+ },
49
+ };
50
+ return msalConfig;
51
+ }
52
+ /**
53
+ * Creates an instance of the MSAL (Microsoft Authentication Library) client.
54
+ *
55
+ * @param clientId - The client ID of the application.
56
+ * @param tenantId - The tenant ID of the Azure Active Directory.
57
+ * @param createMsalClientOptions - Optional. Additional options for creating the MSAL client.
58
+ * @returns An instance of the MSAL client.
59
+ *
60
+ * @public
61
+ */
62
+ function createMsalClient(clientId, tenantId, createMsalClientOptions = {}) {
63
+ var _a;
64
+ const state = {
65
+ msalConfig: generateMsalConfiguration(clientId, tenantId, createMsalClientOptions),
66
+ cachedAccount: createMsalClientOptions.authenticationRecord
67
+ ? (0, utils_js_1.publicToMsal)(createMsalClientOptions.authenticationRecord)
68
+ : null,
69
+ pluginConfiguration: msalPlugins_js_1.msalPlugins.generatePluginConfiguration(createMsalClientOptions),
70
+ logger: (_a = createMsalClientOptions.logger) !== null && _a !== void 0 ? _a : msalLogger,
71
+ };
72
+ const publicApps = new Map();
73
+ async function getPublicApp(options = {}) {
74
+ const appKey = options.enableCae ? "CAE" : "default";
75
+ let publicClientApp = publicApps.get(appKey);
76
+ if (publicClientApp) {
77
+ state.logger.getToken.info("Existing PublicClientApplication found in cache, returning it.");
78
+ return publicClientApp;
79
+ }
80
+ // Initialize a new app and cache it
81
+ state.logger.getToken.info(`Creating new PublicClientApplication with CAE ${options.enableCae ? "enabled" : "disabled"}.`);
82
+ const cachePlugin = options.enableCae
83
+ ? state.pluginConfiguration.cache.cachePluginCae
84
+ : state.pluginConfiguration.cache.cachePlugin;
85
+ state.msalConfig.auth.clientCapabilities = options.enableCae ? ["cp1"] : undefined;
86
+ publicClientApp = new msal.PublicClientApplication(Object.assign(Object.assign({}, state.msalConfig), { broker: { nativeBrokerPlugin: state.pluginConfiguration.broker.nativeBrokerPlugin }, cache: { cachePlugin: await cachePlugin } }));
87
+ publicApps.set(appKey, publicClientApp);
88
+ return publicClientApp;
89
+ }
90
+ const confidentialApps = new Map();
91
+ async function getConfidentialApp(options = {}) {
92
+ const appKey = options.enableCae ? "CAE" : "default";
93
+ let confidentialClientApp = confidentialApps.get(appKey);
94
+ if (confidentialClientApp) {
95
+ state.logger.getToken.info("Existing ConfidentialClientApplication found in cache, returning it.");
96
+ return confidentialClientApp;
97
+ }
98
+ // Initialize a new app and cache it
99
+ state.logger.getToken.info(`Creating new ConfidentialClientApplication with CAE ${options.enableCae ? "enabled" : "disabled"}.`);
100
+ const cachePlugin = options.enableCae
101
+ ? state.pluginConfiguration.cache.cachePluginCae
102
+ : state.pluginConfiguration.cache.cachePlugin;
103
+ state.msalConfig.auth.clientCapabilities = options.enableCae ? ["cp1"] : undefined;
104
+ confidentialClientApp = new msal.ConfidentialClientApplication(Object.assign(Object.assign({}, state.msalConfig), { broker: { nativeBrokerPlugin: state.pluginConfiguration.broker.nativeBrokerPlugin }, cache: { cachePlugin: await cachePlugin } }));
105
+ confidentialApps.set(appKey, confidentialClientApp);
106
+ return confidentialClientApp;
107
+ }
108
+ async function getTokenSilent(app, scopes, options = {}) {
109
+ if (state.cachedAccount === null) {
110
+ state.logger.getToken.info("No cached account found in local state, attempting to load it from MSAL cache.");
111
+ const cache = app.getTokenCache();
112
+ const accounts = await cache.getAllAccounts();
113
+ if (accounts === undefined || accounts.length === 0) {
114
+ throw new errors_js_1.AuthenticationRequiredError({ scopes });
115
+ }
116
+ if (accounts.length > 1) {
117
+ state.logger
118
+ .info(`More than one account was found authenticated for this Client ID and Tenant ID.
119
+ However, no "authenticationRecord" has been provided for this credential,
120
+ therefore we're unable to pick between these accounts.
121
+ A new login attempt will be requested, to ensure the correct account is picked.
122
+ To work with multiple accounts for the same Client ID and Tenant ID, please provide an "authenticationRecord" when initializing a credential to prevent this from happening.`);
123
+ throw new errors_js_1.AuthenticationRequiredError({ scopes });
124
+ }
125
+ state.cachedAccount = accounts[0];
126
+ }
127
+ // Keep track and reuse the claims we received across challenges
128
+ if (options.claims) {
129
+ state.cachedClaims = options.claims;
130
+ }
131
+ const silentRequest = {
132
+ account: state.cachedAccount,
133
+ scopes,
134
+ claims: state.cachedClaims,
135
+ };
136
+ if (state.pluginConfiguration.broker.isEnabled) {
137
+ silentRequest.tokenQueryParameters || (silentRequest.tokenQueryParameters = {});
138
+ if (state.pluginConfiguration.broker.enableMsaPassthrough) {
139
+ silentRequest.tokenQueryParameters["msal_request_type"] = "consumer_passthrough";
140
+ }
141
+ }
142
+ if (options.proofOfPossessionOptions) {
143
+ silentRequest.shrNonce = options.proofOfPossessionOptions.nonce;
144
+ silentRequest.authenticationScheme = "pop";
145
+ silentRequest.resourceRequestMethod = options.proofOfPossessionOptions.resourceRequestMethod;
146
+ silentRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;
147
+ }
148
+ state.logger.getToken.info("Attempting to acquire token silently");
149
+ return app.acquireTokenSilent(silentRequest);
150
+ }
151
+ /**
152
+ * Builds an authority URL for the given request. The authority may be different than the one used when creating the MSAL client
153
+ * if the user is creating cross-tenant requests
154
+ */
155
+ function calculateRequestAuthority(options) {
156
+ if (options === null || options === void 0 ? void 0 : options.tenantId) {
157
+ return (0, utils_js_1.getAuthority)(options.tenantId, (0, utils_js_1.getAuthorityHost)(createMsalClientOptions));
158
+ }
159
+ return state.msalConfig.auth.authority;
160
+ }
161
+ /**
162
+ * Performs silent authentication using MSAL to acquire an access token.
163
+ * If silent authentication fails, falls back to interactive authentication.
164
+ *
165
+ * @param msalApp - The MSAL application instance.
166
+ * @param scopes - The scopes for which to acquire the access token.
167
+ * @param options - The options for acquiring the access token.
168
+ * @param onAuthenticationRequired - A callback function to handle interactive authentication when silent authentication fails.
169
+ * @returns A promise that resolves to an AccessToken object containing the access token and its expiration timestamp.
170
+ */
171
+ async function withSilentAuthentication(msalApp, scopes, options, onAuthenticationRequired) {
172
+ var _a, _b;
173
+ let response = null;
174
+ try {
175
+ response = await getTokenSilent(msalApp, scopes, options);
176
+ }
177
+ catch (e) {
178
+ if (e.name !== "AuthenticationRequiredError") {
179
+ throw e;
180
+ }
181
+ if (options.disableAutomaticAuthentication) {
182
+ throw new errors_js_1.AuthenticationRequiredError({
183
+ scopes,
184
+ getTokenOptions: options,
185
+ message: "Automatic authentication has been disabled. You may call the authentication() method.",
186
+ });
187
+ }
188
+ }
189
+ // Silent authentication failed
190
+ if (response === null) {
191
+ try {
192
+ response = await onAuthenticationRequired();
193
+ }
194
+ catch (err) {
195
+ throw (0, utils_js_1.handleMsalError)(scopes, err, options);
196
+ }
197
+ }
198
+ // At this point we should have a token, process it
199
+ (0, utils_js_1.ensureValidMsalToken)(scopes, response, options);
200
+ state.cachedAccount = (_a = response === null || response === void 0 ? void 0 : response.account) !== null && _a !== void 0 ? _a : null;
201
+ state.logger.getToken.info((0, logging_js_1.formatSuccess)(scopes));
202
+ return {
203
+ token: response.accessToken,
204
+ expiresOnTimestamp: response.expiresOn.getTime(),
205
+ refreshAfterTimestamp: (_b = response.refreshOn) === null || _b === void 0 ? void 0 : _b.getTime(),
206
+ tokenType: response.tokenType,
207
+ };
208
+ }
209
+ async function getTokenByClientSecret(scopes, clientSecret, options = {}) {
210
+ var _a;
211
+ state.logger.getToken.info(`Attempting to acquire token using client secret`);
212
+ state.msalConfig.auth.clientSecret = clientSecret;
213
+ const msalApp = await getConfidentialApp(options);
214
+ try {
215
+ const response = await msalApp.acquireTokenByClientCredential({
216
+ scopes,
217
+ authority: calculateRequestAuthority(options),
218
+ azureRegion: (0, regionalAuthority_js_1.calculateRegionalAuthority)(),
219
+ claims: options === null || options === void 0 ? void 0 : options.claims,
220
+ });
221
+ (0, utils_js_1.ensureValidMsalToken)(scopes, response, options);
222
+ state.logger.getToken.info((0, logging_js_1.formatSuccess)(scopes));
223
+ return {
224
+ token: response.accessToken,
225
+ expiresOnTimestamp: response.expiresOn.getTime(),
226
+ refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
227
+ tokenType: response.tokenType,
228
+ };
229
+ }
230
+ catch (err) {
231
+ throw (0, utils_js_1.handleMsalError)(scopes, err, options);
232
+ }
233
+ }
234
+ async function getTokenByClientAssertion(scopes, clientAssertion, options = {}) {
235
+ var _a;
236
+ state.logger.getToken.info(`Attempting to acquire token using client assertion`);
237
+ state.msalConfig.auth.clientAssertion = clientAssertion;
238
+ const msalApp = await getConfidentialApp(options);
239
+ try {
240
+ const response = await msalApp.acquireTokenByClientCredential({
241
+ scopes,
242
+ authority: calculateRequestAuthority(options),
243
+ azureRegion: (0, regionalAuthority_js_1.calculateRegionalAuthority)(),
244
+ claims: options === null || options === void 0 ? void 0 : options.claims,
245
+ clientAssertion,
246
+ });
247
+ (0, utils_js_1.ensureValidMsalToken)(scopes, response, options);
248
+ state.logger.getToken.info((0, logging_js_1.formatSuccess)(scopes));
249
+ return {
250
+ token: response.accessToken,
251
+ expiresOnTimestamp: response.expiresOn.getTime(),
252
+ refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
253
+ tokenType: response.tokenType,
254
+ };
255
+ }
256
+ catch (err) {
257
+ throw (0, utils_js_1.handleMsalError)(scopes, err, options);
258
+ }
259
+ }
260
+ async function getTokenByClientCertificate(scopes, certificate, options = {}) {
261
+ var _a;
262
+ state.logger.getToken.info(`Attempting to acquire token using client certificate`);
263
+ state.msalConfig.auth.clientCertificate = certificate;
264
+ const msalApp = await getConfidentialApp(options);
265
+ try {
266
+ const response = await msalApp.acquireTokenByClientCredential({
267
+ scopes,
268
+ authority: calculateRequestAuthority(options),
269
+ azureRegion: (0, regionalAuthority_js_1.calculateRegionalAuthority)(),
270
+ claims: options === null || options === void 0 ? void 0 : options.claims,
271
+ });
272
+ (0, utils_js_1.ensureValidMsalToken)(scopes, response, options);
273
+ state.logger.getToken.info((0, logging_js_1.formatSuccess)(scopes));
274
+ return {
275
+ token: response.accessToken,
276
+ expiresOnTimestamp: response.expiresOn.getTime(),
277
+ refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
278
+ tokenType: response.tokenType,
279
+ };
280
+ }
281
+ catch (err) {
282
+ throw (0, utils_js_1.handleMsalError)(scopes, err, options);
283
+ }
284
+ }
285
+ async function getTokenByDeviceCode(scopes, deviceCodeCallback, options = {}) {
286
+ state.logger.getToken.info(`Attempting to acquire token using device code`);
287
+ const msalApp = await getPublicApp(options);
288
+ return withSilentAuthentication(msalApp, scopes, options, () => {
289
+ var _a, _b;
290
+ const requestOptions = {
291
+ scopes,
292
+ cancel: (_b = (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) !== null && _b !== void 0 ? _b : false,
293
+ deviceCodeCallback,
294
+ authority: calculateRequestAuthority(options),
295
+ claims: options === null || options === void 0 ? void 0 : options.claims,
296
+ };
297
+ const deviceCodeRequest = msalApp.acquireTokenByDeviceCode(requestOptions);
298
+ if (options.abortSignal) {
299
+ options.abortSignal.addEventListener("abort", () => {
300
+ requestOptions.cancel = true;
301
+ });
302
+ }
303
+ return deviceCodeRequest;
304
+ });
305
+ }
306
+ async function getTokenByUsernamePassword(scopes, username, password, options = {}) {
307
+ state.logger.getToken.info(`Attempting to acquire token using username and password`);
308
+ const msalApp = await getPublicApp(options);
309
+ return withSilentAuthentication(msalApp, scopes, options, () => {
310
+ const requestOptions = {
311
+ scopes,
312
+ username,
313
+ password,
314
+ authority: calculateRequestAuthority(options),
315
+ claims: options === null || options === void 0 ? void 0 : options.claims,
316
+ };
317
+ return msalApp.acquireTokenByUsernamePassword(requestOptions);
318
+ });
319
+ }
320
+ function getActiveAccount() {
321
+ if (!state.cachedAccount) {
322
+ return undefined;
323
+ }
324
+ return (0, utils_js_1.msalToPublic)(clientId, state.cachedAccount);
325
+ }
326
+ async function getTokenByAuthorizationCode(scopes, redirectUri, authorizationCode, clientSecret, options = {}) {
327
+ state.logger.getToken.info(`Attempting to acquire token using authorization code`);
328
+ let msalApp;
329
+ if (clientSecret) {
330
+ // If a client secret is provided, we need to use a confidential client application
331
+ // See https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow#request-an-access-token-with-a-client_secret
332
+ state.msalConfig.auth.clientSecret = clientSecret;
333
+ msalApp = await getConfidentialApp(options);
334
+ }
335
+ else {
336
+ msalApp = await getPublicApp(options);
337
+ }
338
+ return withSilentAuthentication(msalApp, scopes, options, () => {
339
+ return msalApp.acquireTokenByCode({
340
+ scopes,
341
+ redirectUri,
342
+ code: authorizationCode,
343
+ authority: calculateRequestAuthority(options),
344
+ claims: options === null || options === void 0 ? void 0 : options.claims,
345
+ });
346
+ });
347
+ }
348
+ async function getTokenOnBehalfOf(scopes, userAssertionToken, clientCredentials, options = {}) {
349
+ var _a;
350
+ msalLogger.getToken.info(`Attempting to acquire token on behalf of another user`);
351
+ if (typeof clientCredentials === "string") {
352
+ // Client secret
353
+ msalLogger.getToken.info(`Using client secret for on behalf of flow`);
354
+ state.msalConfig.auth.clientSecret = clientCredentials;
355
+ }
356
+ else if (typeof clientCredentials === "function") {
357
+ // Client Assertion
358
+ msalLogger.getToken.info(`Using client assertion callback for on behalf of flow`);
359
+ state.msalConfig.auth.clientAssertion = clientCredentials;
360
+ }
361
+ else {
362
+ // Client certificate
363
+ msalLogger.getToken.info(`Using client certificate for on behalf of flow`);
364
+ state.msalConfig.auth.clientCertificate = clientCredentials;
365
+ }
366
+ const msalApp = await getConfidentialApp(options);
367
+ try {
368
+ const response = await msalApp.acquireTokenOnBehalfOf({
369
+ scopes,
370
+ authority: calculateRequestAuthority(options),
371
+ claims: options.claims,
372
+ oboAssertion: userAssertionToken,
373
+ });
374
+ (0, utils_js_1.ensureValidMsalToken)(scopes, response, options);
375
+ msalLogger.getToken.info((0, logging_js_1.formatSuccess)(scopes));
376
+ return {
377
+ token: response.accessToken,
378
+ expiresOnTimestamp: response.expiresOn.getTime(),
379
+ refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
380
+ tokenType: response.tokenType,
381
+ };
382
+ }
383
+ catch (err) {
384
+ throw (0, utils_js_1.handleMsalError)(scopes, err, options);
385
+ }
386
+ }
387
+ async function getTokenByInteractiveRequest(scopes, options = {}) {
388
+ msalLogger.getToken.info(`Attempting to acquire token interactively`);
389
+ const app = await getPublicApp(options);
390
+ /**
391
+ * A helper function that supports brokered authentication through the MSAL's public application.
392
+ *
393
+ * When options.useDefaultBrokerAccount is true, the method will attempt to authenticate using the default broker account.
394
+ * If the default broker account is not available, the method will fall back to interactive authentication.
395
+ */
396
+ async function getBrokeredToken(useDefaultBrokerAccount) {
397
+ var _a;
398
+ msalLogger.verbose("Authentication will resume through the broker");
399
+ const interactiveRequest = createBaseInteractiveRequest();
400
+ if (state.pluginConfiguration.broker.parentWindowHandle) {
401
+ interactiveRequest.windowHandle = Buffer.from(state.pluginConfiguration.broker.parentWindowHandle);
402
+ }
403
+ else {
404
+ // this is a bug, as the pluginConfiguration handler should validate this case.
405
+ msalLogger.warning("Parent window handle is not specified for the broker. This may cause unexpected behavior. Please provide the parentWindowHandle.");
406
+ }
407
+ if (state.pluginConfiguration.broker.enableMsaPassthrough) {
408
+ ((_a = interactiveRequest.tokenQueryParameters) !== null && _a !== void 0 ? _a : (interactiveRequest.tokenQueryParameters = {}))["msal_request_type"] =
409
+ "consumer_passthrough";
410
+ }
411
+ if (useDefaultBrokerAccount) {
412
+ interactiveRequest.prompt = "none";
413
+ msalLogger.verbose("Attempting broker authentication using the default broker account");
414
+ }
415
+ else {
416
+ msalLogger.verbose("Attempting broker authentication without the default broker account");
417
+ }
418
+ if (options.proofOfPossessionOptions) {
419
+ interactiveRequest.shrNonce = options.proofOfPossessionOptions.nonce;
420
+ interactiveRequest.authenticationScheme = "pop";
421
+ interactiveRequest.resourceRequestMethod =
422
+ options.proofOfPossessionOptions.resourceRequestMethod;
423
+ interactiveRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;
424
+ }
425
+ try {
426
+ return await app.acquireTokenInteractive(interactiveRequest);
427
+ }
428
+ catch (e) {
429
+ msalLogger.verbose(`Failed to authenticate through the broker: ${e.message}`);
430
+ // If we tried to use the default broker account and failed, fall back to interactive authentication
431
+ if (useDefaultBrokerAccount) {
432
+ return getBrokeredToken(/* useDefaultBrokerAccount: */ false);
433
+ }
434
+ else {
435
+ throw e;
436
+ }
437
+ }
438
+ }
439
+ function createBaseInteractiveRequest() {
440
+ var _a, _b;
441
+ return {
442
+ openBrowser: async (url) => {
443
+ const open = await import("open");
444
+ await open.default(url, { wait: true, newInstance: true });
445
+ },
446
+ scopes,
447
+ authority: calculateRequestAuthority(options),
448
+ claims: options === null || options === void 0 ? void 0 : options.claims,
449
+ loginHint: options === null || options === void 0 ? void 0 : options.loginHint,
450
+ errorTemplate: (_a = options === null || options === void 0 ? void 0 : options.browserCustomizationOptions) === null || _a === void 0 ? void 0 : _a.errorMessage,
451
+ successTemplate: (_b = options === null || options === void 0 ? void 0 : options.browserCustomizationOptions) === null || _b === void 0 ? void 0 : _b.successMessage,
452
+ };
453
+ }
454
+ return withSilentAuthentication(app, scopes, options, async () => {
455
+ var _a;
456
+ const interactiveRequest = createBaseInteractiveRequest();
457
+ if (state.pluginConfiguration.broker.isEnabled) {
458
+ return getBrokeredToken((_a = state.pluginConfiguration.broker.useDefaultBrokerAccount) !== null && _a !== void 0 ? _a : false);
459
+ }
460
+ if (options.proofOfPossessionOptions) {
461
+ interactiveRequest.shrNonce = options.proofOfPossessionOptions.nonce;
462
+ interactiveRequest.authenticationScheme = "pop";
463
+ interactiveRequest.resourceRequestMethod =
464
+ options.proofOfPossessionOptions.resourceRequestMethod;
465
+ interactiveRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;
466
+ }
467
+ return app.acquireTokenInteractive(interactiveRequest);
468
+ });
469
+ }
470
+ return {
471
+ getActiveAccount,
472
+ getTokenByClientSecret,
473
+ getTokenByClientAssertion,
474
+ getTokenByClientCertificate,
475
+ getTokenByDeviceCode,
476
+ getTokenByUsernamePassword,
477
+ getTokenByAuthorizationCode,
478
+ getTokenOnBehalfOf,
479
+ getTokenByInteractiveRequest,
480
+ };
481
+ }
482
+ //# sourceMappingURL=msalClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msalClient.js","sourceRoot":"","sources":["../../../../src/msal/nodeFlows/msalClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA4PlC,8DAwCC;AAmCD,4CA4hBC;;AAj2BD,+DAAyC;AAKzC,sDAAwE;AAExE,qDAA+C;AAC/C,0CAUqB;AAErB,+CAA8D;AAG9D,sEAAgE;AAGhE,qEAAwE;AACxE,0CAA4C;AAC5C,kEAA8D;AAE9D;;GAEG;AACH,MAAM,UAAU,GAAG,IAAA,6BAAgB,EAAC,YAAY,CAAC,CAAC;AAiNlD;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CACvC,QAAgB,EAChB,QAAgB,EAChB,oBAAuC,EAAE;;IAEzC,MAAM,cAAc,GAAG,IAAA,kCAAe,EACpC,MAAA,iBAAiB,CAAC,MAAM,mCAAI,UAAU,EACtC,QAAQ,EACR,QAAQ,CACT,CAAC;IAEF,sDAAsD;IACtD,MAAM,SAAS,GAAG,IAAA,uBAAY,EAAC,cAAc,EAAE,IAAA,2BAAgB,EAAC,iBAAiB,CAAC,CAAC,CAAC;IAEpF,MAAM,UAAU,GAAG,IAAI,kCAAc,iCAChC,iBAAiB,CAAC,sBAAsB,KAC3C,aAAa,EAAE,SAAS,EACxB,cAAc,EAAE,iBAAiB,CAAC,cAAc,IAChD,CAAC;IAEH,MAAM,UAAU,GAAuB;QACrC,IAAI,EAAE;YACJ,QAAQ;YACR,SAAS;YACT,gBAAgB,EAAE,IAAA,8BAAmB,EACnC,cAAc,EACd,SAAS,EACT,iBAAiB,CAAC,wBAAwB,CAC3C;SACF;QACD,MAAM,EAAE;YACN,aAAa,EAAE,UAAU;YACzB,aAAa,EAAE;gBACb,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OAAO,CAAE,SAAS;gBAC7B,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,2BAA2B,0CAAE,YAAY;gBACjE,eAAe,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,2BAA2B,0CAAE,cAAc;aACtE,CAAC;QACJ,CAAC;QAED,OAAO,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;;YAC/D,MAAM,kBAAkB,GAAG,4BAA4B,EAAE,CAAC;YAE1D,IAAI,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;gBAC/C,OAAO,gBAAgB,CAAC,MAAA,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,uBAAuB,mCAAI,KAAK,CAAC,CAAC;YAC7F,CAAC;YACD,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;gBACrC,kBAAkB,CAAC,QAAQ,GAAG,OAAO,CAAC,wBAAwB,CAAC,KAAK,CAAC;gBACrE,kBAAkB,CAAC,oBAAoB,GAAG,KAAK,CAAC;gBAChD,kBAAkB,CAAC,qBAAqB;oBACtC,OAAO,CAAC,wBAAwB,CAAC,qBAAqB,CAAC;gBACzD,kBAAkB,CAAC,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC;YAC9F,CAAC;YACD,OAAO,GAAG,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,gBAAgB;QAChB,sBAAsB;QACtB,yBAAyB;QACzB,2BAA2B;QAC3B,oBAAoB;QACpB,0BAA0B;QAC1B,2BAA2B;QAC3B,kBAAkB;QAClB,4BAA4B;KAC7B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as msal from \"@azure/msal-node\";\n\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport type { AuthenticationRecord, CertificateParts } from \"../types.js\";\nimport type { CredentialLogger } from \"../../util/logging.js\";\nimport { credentialLogger, formatSuccess } from \"../../util/logging.js\";\nimport type { PluginConfiguration } from \"./msalPlugins.js\";\nimport { msalPlugins } from \"./msalPlugins.js\";\nimport {\n defaultLoggerCallback,\n ensureValidMsalToken,\n getAuthority,\n getAuthorityHost,\n getKnownAuthorities,\n getMSALLogLevel,\n handleMsalError,\n msalToPublic,\n publicToMsal,\n} from \"../utils.js\";\n\nimport { AuthenticationRequiredError } from \"../../errors.js\";\nimport type { BrokerOptions } from \"./brokerOptions.js\";\nimport type { DeviceCodePromptCallback } from \"../../credentials/deviceCodeCredentialOptions.js\";\nimport { IdentityClient } from \"../../client/identityClient.js\";\nimport type { InteractiveBrowserCredentialNodeOptions } from \"../../credentials/interactiveBrowserCredentialOptions.js\";\nimport type { TokenCachePersistenceOptions } from \"./tokenCachePersistenceOptions.js\";\nimport { calculateRegionalAuthority } from \"../../regionalAuthority.js\";\nimport { getLogLevel } from \"@azure/logger\";\nimport { resolveTenantId } from \"../../util/tenantIdUtils.js\";\n\n/**\n * The default logger used if no logger was passed in by the credential.\n */\nconst msalLogger = credentialLogger(\"MsalClient\");\n\n/**\n * Represents the options for acquiring a token using flows that support silent authentication.\n */\nexport interface GetTokenWithSilentAuthOptions extends GetTokenOptions {\n /**\n * Disables automatic authentication. If set to true, the method will throw an error if the user needs to authenticate.\n *\n * @remarks\n *\n * This option will be set to `false` when the user calls `authenticate` directly on a credential that supports it.\n */\n disableAutomaticAuthentication?: boolean;\n}\n\n/**\n * Represents the options for acquiring a token interactively.\n */\nexport interface GetTokenInteractiveOptions extends GetTokenWithSilentAuthOptions {\n /**\n * Window handle for parent window, required for WAM authentication.\n */\n parentWindowHandle?: Buffer;\n /**\n * Shared configuration options for browser customization\n */\n browserCustomizationOptions?: InteractiveBrowserCredentialNodeOptions[\"browserCustomizationOptions\"];\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n\n/**\n * Represents a client for interacting with the Microsoft Authentication Library (MSAL).\n */\nexport interface MsalClient {\n /**\n *\n * Retrieves an access token by using the on-behalf-of flow and a client assertion callback of the calling service.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param userAssertionToken - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.\n * @param clientCredentials - The client secret OR client certificate OR client `getAssertion` callback.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenOnBehalfOf(\n scopes: string[],\n userAssertionToken: string,\n clientCredentials: string | CertificateParts | (() => Promise<string>),\n options?: GetTokenOptions,\n ): Promise<AccessToken>;\n\n /**\n * Retrieves an access token by using an interactive prompt (InteractiveBrowserCredential).\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenByInteractiveRequest(\n scopes: string[],\n options: GetTokenInteractiveOptions,\n ): Promise<AccessToken>;\n /**\n * Retrieves an access token by using a user's username and password.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param username - The username provided by the developer.\n * @param password - The user's password provided by the developer.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenByUsernamePassword(\n scopes: string[],\n username: string,\n password: string,\n options?: GetTokenOptions,\n ): Promise<AccessToken>;\n /**\n * Retrieves an access token by prompting the user to authenticate using a device code.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param userPromptCallback - The callback function that allows developers to customize the prompt message.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenByDeviceCode(\n scopes: string[],\n userPromptCallback: DeviceCodePromptCallback,\n options?: GetTokenWithSilentAuthOptions,\n ): Promise<AccessToken>;\n /**\n * Retrieves an access token by using a client certificate.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param certificate - The client certificate used for authentication.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenByClientCertificate(\n scopes: string[],\n certificate: CertificateParts,\n options?: GetTokenOptions,\n ): Promise<AccessToken>;\n\n /**\n * Retrieves an access token by using a client assertion.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param clientAssertion - The client `getAssertion` callback used for authentication.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenByClientAssertion(\n scopes: string[],\n clientAssertion: () => Promise<string>,\n options?: GetTokenOptions,\n ): Promise<AccessToken>;\n\n /**\n * Retrieves an access token by using a client secret.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param clientSecret - The client secret of the application. This is a credential that the application can use to authenticate itself.\n * @param options - Additional options that may be provided to the method.\n * @returns An access token.\n */\n getTokenByClientSecret(\n scopes: string[],\n clientSecret: string,\n options?: GetTokenOptions,\n ): Promise<AccessToken>;\n\n /**\n * Retrieves an access token by using an authorization code flow.\n *\n * @param scopes - The scopes for which the access token is requested. These represent the resources that the application wants to access.\n * @param authorizationCode - An authorization code that was received from following the\n authorization code flow. This authorization code must not\n have already been used to obtain an access token.\n * @param redirectUri - The redirect URI that was used to request the authorization code.\n Must be the same URI that is configured for the App Registration.\n * @param clientSecret - An optional client secret that was generated for the App Registration.\n * @param options - Additional options that may be provided to the method.\n */\n getTokenByAuthorizationCode(\n scopes: string[],\n redirectUri: string,\n authorizationCode: string,\n clientSecret?: string,\n options?: GetTokenWithSilentAuthOptions,\n ): Promise<AccessToken>;\n\n /**\n * Retrieves the last authenticated account. This method expects an authentication record to have been previously loaded.\n *\n * An authentication record could be loaded by calling the `getToken` method, or by providing an `authenticationRecord` when creating a credential.\n */\n getActiveAccount(): AuthenticationRecord | undefined;\n}\n\n/**\n * Represents the options for configuring the MsalClient.\n */\nexport interface MsalClientOptions {\n /**\n * Parameters that enable WAM broker authentication in the InteractiveBrowserCredential.\n */\n brokerOptions?: BrokerOptions;\n\n /**\n * Parameters that enable token cache persistence in the Identity credentials.\n */\n tokenCachePersistenceOptions?: TokenCachePersistenceOptions;\n\n /**\n * A custom authority host.\n */\n authorityHost?: IdentityClient[\"tokenCredentialOptions\"][\"authorityHost\"];\n\n /**\n * Allows users to configure settings for logging policy options, allow logging account information and personally identifiable information for customer support.\n */\n loggingOptions?: IdentityClient[\"tokenCredentialOptions\"][\"loggingOptions\"];\n\n /**\n * The token credential options for the MsalClient.\n */\n tokenCredentialOptions?: IdentityClient[\"tokenCredentialOptions\"];\n\n /**\n * Determines whether instance discovery is disabled.\n */\n disableInstanceDiscovery?: boolean;\n\n /**\n * The logger for the MsalClient.\n */\n logger?: CredentialLogger;\n\n /**\n * The authentication record for the MsalClient.\n */\n authenticationRecord?: AuthenticationRecord;\n}\n\n/**\n * Generates the configuration for MSAL (Microsoft Authentication Library).\n *\n * @param clientId - The client ID of the application.\n * @param tenantId - The tenant ID of the Azure Active Directory.\n * @param msalClientOptions - Optional. Additional options for creating the MSAL client.\n * @returns The MSAL configuration object.\n */\nexport function generateMsalConfiguration(\n clientId: string,\n tenantId: string,\n msalClientOptions: MsalClientOptions = {},\n): msal.Configuration {\n const resolvedTenant = resolveTenantId(\n msalClientOptions.logger ?? msalLogger,\n tenantId,\n clientId,\n );\n\n // TODO: move and reuse getIdentityClientAuthorityHost\n const authority = getAuthority(resolvedTenant, getAuthorityHost(msalClientOptions));\n\n const httpClient = new IdentityClient({\n ...msalClientOptions.tokenCredentialOptions,\n authorityHost: authority,\n loggingOptions: msalClientOptions.loggingOptions,\n });\n\n const msalConfig: msal.Configuration = {\n auth: {\n clientId,\n authority,\n knownAuthorities: getKnownAuthorities(\n resolvedTenant,\n authority,\n msalClientOptions.disableInstanceDiscovery,\n ),\n },\n system: {\n networkClient: httpClient,\n loggerOptions: {\n loggerCallback: defaultLoggerCallback(msalClientOptions.logger ?? msalLogger),\n logLevel: getMSALLogLevel(getLogLevel()),\n piiLoggingEnabled: msalClientOptions.loggingOptions?.enableUnsafeSupportLogging,\n },\n },\n };\n return msalConfig;\n}\n\n/**\n * Represents the state necessary for the MSAL (Microsoft Authentication Library) client to operate.\n * This includes the MSAL configuration, cached account information, Azure region, and a flag to disable automatic authentication.\n *\n * @internal\n */\ninterface MsalClientState {\n /** The configuration for the MSAL client. */\n msalConfig: msal.Configuration;\n\n /** The cached account information, or null if no account information is cached. */\n cachedAccount: msal.AccountInfo | null;\n\n /** Configured plugins */\n pluginConfiguration: PluginConfiguration;\n\n /** Claims received from challenges, cached for the next request */\n cachedClaims?: string;\n\n /** The logger instance */\n logger: CredentialLogger;\n}\n\n/**\n * Creates an instance of the MSAL (Microsoft Authentication Library) client.\n *\n * @param clientId - The client ID of the application.\n * @param tenantId - The tenant ID of the Azure Active Directory.\n * @param createMsalClientOptions - Optional. Additional options for creating the MSAL client.\n * @returns An instance of the MSAL client.\n *\n * @public\n */\nexport function createMsalClient(\n clientId: string,\n tenantId: string,\n createMsalClientOptions: MsalClientOptions = {},\n): MsalClient {\n const state: MsalClientState = {\n msalConfig: generateMsalConfiguration(clientId, tenantId, createMsalClientOptions),\n cachedAccount: createMsalClientOptions.authenticationRecord\n ? publicToMsal(createMsalClientOptions.authenticationRecord)\n : null,\n pluginConfiguration: msalPlugins.generatePluginConfiguration(createMsalClientOptions),\n logger: createMsalClientOptions.logger ?? msalLogger,\n };\n\n const publicApps: Map<string, msal.PublicClientApplication> = new Map();\n async function getPublicApp(\n options: GetTokenOptions = {},\n ): Promise<msal.PublicClientApplication> {\n const appKey = options.enableCae ? \"CAE\" : \"default\";\n\n let publicClientApp = publicApps.get(appKey);\n if (publicClientApp) {\n state.logger.getToken.info(\"Existing PublicClientApplication found in cache, returning it.\");\n return publicClientApp;\n }\n\n // Initialize a new app and cache it\n state.logger.getToken.info(\n `Creating new PublicClientApplication with CAE ${options.enableCae ? \"enabled\" : \"disabled\"}.`,\n );\n\n const cachePlugin = options.enableCae\n ? state.pluginConfiguration.cache.cachePluginCae\n : state.pluginConfiguration.cache.cachePlugin;\n\n state.msalConfig.auth.clientCapabilities = options.enableCae ? [\"cp1\"] : undefined;\n\n publicClientApp = new msal.PublicClientApplication({\n ...state.msalConfig,\n broker: { nativeBrokerPlugin: state.pluginConfiguration.broker.nativeBrokerPlugin },\n cache: { cachePlugin: await cachePlugin },\n });\n\n publicApps.set(appKey, publicClientApp);\n\n return publicClientApp;\n }\n\n const confidentialApps: Map<string, msal.ConfidentialClientApplication> = new Map();\n async function getConfidentialApp(\n options: GetTokenOptions = {},\n ): Promise<msal.ConfidentialClientApplication> {\n const appKey = options.enableCae ? \"CAE\" : \"default\";\n\n let confidentialClientApp = confidentialApps.get(appKey);\n if (confidentialClientApp) {\n state.logger.getToken.info(\n \"Existing ConfidentialClientApplication found in cache, returning it.\",\n );\n return confidentialClientApp;\n }\n\n // Initialize a new app and cache it\n state.logger.getToken.info(\n `Creating new ConfidentialClientApplication with CAE ${\n options.enableCae ? \"enabled\" : \"disabled\"\n }.`,\n );\n\n const cachePlugin = options.enableCae\n ? state.pluginConfiguration.cache.cachePluginCae\n : state.pluginConfiguration.cache.cachePlugin;\n\n state.msalConfig.auth.clientCapabilities = options.enableCae ? [\"cp1\"] : undefined;\n\n confidentialClientApp = new msal.ConfidentialClientApplication({\n ...state.msalConfig,\n broker: { nativeBrokerPlugin: state.pluginConfiguration.broker.nativeBrokerPlugin },\n cache: { cachePlugin: await cachePlugin },\n });\n\n confidentialApps.set(appKey, confidentialClientApp);\n\n return confidentialClientApp;\n }\n\n async function getTokenSilent(\n app: msal.ConfidentialClientApplication | msal.PublicClientApplication,\n scopes: string[],\n options: GetTokenOptions = {},\n ): Promise<msal.AuthenticationResult> {\n if (state.cachedAccount === null) {\n state.logger.getToken.info(\n \"No cached account found in local state, attempting to load it from MSAL cache.\",\n );\n const cache = app.getTokenCache();\n const accounts = await cache.getAllAccounts();\n\n if (accounts === undefined || accounts.length === 0) {\n throw new AuthenticationRequiredError({ scopes });\n }\n\n if (accounts.length > 1) {\n state.logger\n .info(`More than one account was found authenticated for this Client ID and Tenant ID.\nHowever, no \"authenticationRecord\" has been provided for this credential,\ntherefore we're unable to pick between these accounts.\nA new login attempt will be requested, to ensure the correct account is picked.\nTo work with multiple accounts for the same Client ID and Tenant ID, please provide an \"authenticationRecord\" when initializing a credential to prevent this from happening.`);\n throw new AuthenticationRequiredError({ scopes });\n }\n\n state.cachedAccount = accounts[0];\n }\n\n // Keep track and reuse the claims we received across challenges\n if (options.claims) {\n state.cachedClaims = options.claims;\n }\n\n const silentRequest: msal.SilentFlowRequest = {\n account: state.cachedAccount,\n scopes,\n claims: state.cachedClaims,\n };\n\n if (state.pluginConfiguration.broker.isEnabled) {\n silentRequest.tokenQueryParameters ||= {};\n if (state.pluginConfiguration.broker.enableMsaPassthrough) {\n silentRequest.tokenQueryParameters[\"msal_request_type\"] = \"consumer_passthrough\";\n }\n }\n\n if (options.proofOfPossessionOptions) {\n silentRequest.shrNonce = options.proofOfPossessionOptions.nonce;\n silentRequest.authenticationScheme = \"pop\";\n silentRequest.resourceRequestMethod = options.proofOfPossessionOptions.resourceRequestMethod;\n silentRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;\n }\n state.logger.getToken.info(\"Attempting to acquire token silently\");\n return app.acquireTokenSilent(silentRequest);\n }\n\n /**\n * Builds an authority URL for the given request. The authority may be different than the one used when creating the MSAL client\n * if the user is creating cross-tenant requests\n */\n function calculateRequestAuthority(options?: GetTokenOptions): string | undefined {\n if (options?.tenantId) {\n return getAuthority(options.tenantId, getAuthorityHost(createMsalClientOptions));\n }\n return state.msalConfig.auth.authority;\n }\n\n /**\n * Performs silent authentication using MSAL to acquire an access token.\n * If silent authentication fails, falls back to interactive authentication.\n *\n * @param msalApp - The MSAL application instance.\n * @param scopes - The scopes for which to acquire the access token.\n * @param options - The options for acquiring the access token.\n * @param onAuthenticationRequired - A callback function to handle interactive authentication when silent authentication fails.\n * @returns A promise that resolves to an AccessToken object containing the access token and its expiration timestamp.\n */\n async function withSilentAuthentication(\n msalApp: msal.ConfidentialClientApplication | msal.PublicClientApplication,\n scopes: Array<string>,\n options: GetTokenWithSilentAuthOptions,\n onAuthenticationRequired: () => Promise<msal.AuthenticationResult | null>,\n ): Promise<AccessToken> {\n let response: msal.AuthenticationResult | null = null;\n try {\n response = await getTokenSilent(msalApp, scopes, options);\n } catch (e: any) {\n if (e.name !== \"AuthenticationRequiredError\") {\n throw e;\n }\n if (options.disableAutomaticAuthentication) {\n throw new AuthenticationRequiredError({\n scopes,\n getTokenOptions: options,\n message:\n \"Automatic authentication has been disabled. You may call the authentication() method.\",\n });\n }\n }\n\n // Silent authentication failed\n if (response === null) {\n try {\n response = await onAuthenticationRequired();\n } catch (err: any) {\n throw handleMsalError(scopes, err, options);\n }\n }\n\n // At this point we should have a token, process it\n ensureValidMsalToken(scopes, response, options);\n state.cachedAccount = response?.account ?? null;\n\n state.logger.getToken.info(formatSuccess(scopes));\n return {\n token: response.accessToken,\n expiresOnTimestamp: response.expiresOn.getTime(),\n refreshAfterTimestamp: response.refreshOn?.getTime(),\n tokenType: response.tokenType,\n } as AccessToken;\n }\n\n async function getTokenByClientSecret(\n scopes: string[],\n clientSecret: string,\n options: GetTokenOptions = {},\n ): Promise<AccessToken> {\n state.logger.getToken.info(`Attempting to acquire token using client secret`);\n\n state.msalConfig.auth.clientSecret = clientSecret;\n\n const msalApp = await getConfidentialApp(options);\n\n try {\n const response = await msalApp.acquireTokenByClientCredential({\n scopes,\n authority: calculateRequestAuthority(options),\n azureRegion: calculateRegionalAuthority(),\n claims: options?.claims,\n });\n ensureValidMsalToken(scopes, response, options);\n state.logger.getToken.info(formatSuccess(scopes));\n return {\n token: response.accessToken,\n expiresOnTimestamp: response.expiresOn.getTime(),\n refreshAfterTimestamp: response.refreshOn?.getTime(),\n tokenType: response.tokenType,\n } as AccessToken;\n } catch (err: any) {\n throw handleMsalError(scopes, err, options);\n }\n }\n\n async function getTokenByClientAssertion(\n scopes: string[],\n clientAssertion: () => Promise<string>,\n options: GetTokenOptions = {},\n ): Promise<AccessToken> {\n state.logger.getToken.info(`Attempting to acquire token using client assertion`);\n\n state.msalConfig.auth.clientAssertion = clientAssertion;\n\n const msalApp = await getConfidentialApp(options);\n\n try {\n const response = await msalApp.acquireTokenByClientCredential({\n scopes,\n authority: calculateRequestAuthority(options),\n azureRegion: calculateRegionalAuthority(),\n claims: options?.claims,\n clientAssertion,\n });\n ensureValidMsalToken(scopes, response, options);\n\n state.logger.getToken.info(formatSuccess(scopes));\n return {\n token: response.accessToken,\n expiresOnTimestamp: response.expiresOn.getTime(),\n refreshAfterTimestamp: response.refreshOn?.getTime(),\n tokenType: response.tokenType,\n } as AccessToken;\n } catch (err: any) {\n throw handleMsalError(scopes, err, options);\n }\n }\n\n async function getTokenByClientCertificate(\n scopes: string[],\n certificate: CertificateParts,\n options: GetTokenOptions = {},\n ): Promise<AccessToken> {\n state.logger.getToken.info(`Attempting to acquire token using client certificate`);\n\n state.msalConfig.auth.clientCertificate = certificate;\n\n const msalApp = await getConfidentialApp(options);\n try {\n const response = await msalApp.acquireTokenByClientCredential({\n scopes,\n authority: calculateRequestAuthority(options),\n azureRegion: calculateRegionalAuthority(),\n claims: options?.claims,\n });\n ensureValidMsalToken(scopes, response, options);\n\n state.logger.getToken.info(formatSuccess(scopes));\n return {\n token: response.accessToken,\n expiresOnTimestamp: response.expiresOn.getTime(),\n refreshAfterTimestamp: response.refreshOn?.getTime(),\n tokenType: response.tokenType,\n } as AccessToken;\n } catch (err: any) {\n throw handleMsalError(scopes, err, options);\n }\n }\n\n async function getTokenByDeviceCode(\n scopes: string[],\n deviceCodeCallback: DeviceCodePromptCallback,\n options: GetTokenWithSilentAuthOptions = {},\n ): Promise<AccessToken> {\n state.logger.getToken.info(`Attempting to acquire token using device code`);\n\n const msalApp = await getPublicApp(options);\n\n return withSilentAuthentication(msalApp, scopes, options, () => {\n const requestOptions: msal.DeviceCodeRequest = {\n scopes,\n cancel: options?.abortSignal?.aborted ?? false,\n deviceCodeCallback,\n authority: calculateRequestAuthority(options),\n claims: options?.claims,\n };\n const deviceCodeRequest = msalApp.acquireTokenByDeviceCode(requestOptions);\n if (options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", () => {\n requestOptions.cancel = true;\n });\n }\n\n return deviceCodeRequest;\n });\n }\n\n async function getTokenByUsernamePassword(\n scopes: string[],\n username: string,\n password: string,\n options: GetTokenOptions = {},\n ): Promise<AccessToken> {\n state.logger.getToken.info(`Attempting to acquire token using username and password`);\n\n const msalApp = await getPublicApp(options);\n\n return withSilentAuthentication(msalApp, scopes, options, () => {\n const requestOptions: msal.UsernamePasswordRequest = {\n scopes,\n username,\n password,\n authority: calculateRequestAuthority(options),\n claims: options?.claims,\n };\n\n return msalApp.acquireTokenByUsernamePassword(requestOptions);\n });\n }\n\n function getActiveAccount(): AuthenticationRecord | undefined {\n if (!state.cachedAccount) {\n return undefined;\n }\n return msalToPublic(clientId, state.cachedAccount);\n }\n\n async function getTokenByAuthorizationCode(\n scopes: string[],\n redirectUri: string,\n authorizationCode: string,\n clientSecret?: string,\n options: GetTokenWithSilentAuthOptions = {},\n ): Promise<AccessToken> {\n state.logger.getToken.info(`Attempting to acquire token using authorization code`);\n\n let msalApp: msal.ConfidentialClientApplication | msal.PublicClientApplication;\n if (clientSecret) {\n // If a client secret is provided, we need to use a confidential client application\n // See https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow#request-an-access-token-with-a-client_secret\n state.msalConfig.auth.clientSecret = clientSecret;\n msalApp = await getConfidentialApp(options);\n } else {\n msalApp = await getPublicApp(options);\n }\n\n return withSilentAuthentication(msalApp, scopes, options, () => {\n return msalApp.acquireTokenByCode({\n scopes,\n redirectUri,\n code: authorizationCode,\n authority: calculateRequestAuthority(options),\n claims: options?.claims,\n });\n });\n }\n\n async function getTokenOnBehalfOf(\n scopes: string[],\n userAssertionToken: string,\n clientCredentials: string | CertificateParts | (() => Promise<string>),\n options: GetTokenOptions = {},\n ): Promise<AccessToken> {\n msalLogger.getToken.info(`Attempting to acquire token on behalf of another user`);\n\n if (typeof clientCredentials === \"string\") {\n // Client secret\n msalLogger.getToken.info(`Using client secret for on behalf of flow`);\n state.msalConfig.auth.clientSecret = clientCredentials;\n } else if (typeof clientCredentials === \"function\") {\n // Client Assertion\n msalLogger.getToken.info(`Using client assertion callback for on behalf of flow`);\n state.msalConfig.auth.clientAssertion = clientCredentials;\n } else {\n // Client certificate\n msalLogger.getToken.info(`Using client certificate for on behalf of flow`);\n state.msalConfig.auth.clientCertificate = clientCredentials;\n }\n\n const msalApp = await getConfidentialApp(options);\n try {\n const response = await msalApp.acquireTokenOnBehalfOf({\n scopes,\n authority: calculateRequestAuthority(options),\n claims: options.claims,\n oboAssertion: userAssertionToken,\n });\n ensureValidMsalToken(scopes, response, options);\n\n msalLogger.getToken.info(formatSuccess(scopes));\n return {\n token: response.accessToken,\n expiresOnTimestamp: response.expiresOn.getTime(),\n refreshAfterTimestamp: response.refreshOn?.getTime(),\n tokenType: response.tokenType,\n } as AccessToken;\n } catch (err: any) {\n throw handleMsalError(scopes, err, options);\n }\n }\n\n async function getTokenByInteractiveRequest(\n scopes: string[],\n options: GetTokenInteractiveOptions = {},\n ): Promise<AccessToken> {\n msalLogger.getToken.info(`Attempting to acquire token interactively`);\n\n const app = await getPublicApp(options);\n\n /**\n * A helper function that supports brokered authentication through the MSAL's public application.\n *\n * When options.useDefaultBrokerAccount is true, the method will attempt to authenticate using the default broker account.\n * If the default broker account is not available, the method will fall back to interactive authentication.\n */\n async function getBrokeredToken(\n useDefaultBrokerAccount: boolean,\n ): Promise<msal.AuthenticationResult> {\n msalLogger.verbose(\"Authentication will resume through the broker\");\n const interactiveRequest = createBaseInteractiveRequest();\n if (state.pluginConfiguration.broker.parentWindowHandle) {\n interactiveRequest.windowHandle = Buffer.from(\n state.pluginConfiguration.broker.parentWindowHandle,\n );\n } else {\n // this is a bug, as the pluginConfiguration handler should validate this case.\n msalLogger.warning(\n \"Parent window handle is not specified for the broker. This may cause unexpected behavior. Please provide the parentWindowHandle.\",\n );\n }\n\n if (state.pluginConfiguration.broker.enableMsaPassthrough) {\n (interactiveRequest.tokenQueryParameters ??= {})[\"msal_request_type\"] =\n \"consumer_passthrough\";\n }\n if (useDefaultBrokerAccount) {\n interactiveRequest.prompt = \"none\";\n msalLogger.verbose(\"Attempting broker authentication using the default broker account\");\n } else {\n msalLogger.verbose(\"Attempting broker authentication without the default broker account\");\n }\n\n if (options.proofOfPossessionOptions) {\n interactiveRequest.shrNonce = options.proofOfPossessionOptions.nonce;\n interactiveRequest.authenticationScheme = \"pop\";\n interactiveRequest.resourceRequestMethod =\n options.proofOfPossessionOptions.resourceRequestMethod;\n interactiveRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;\n }\n try {\n return await app.acquireTokenInteractive(interactiveRequest);\n } catch (e: any) {\n msalLogger.verbose(`Failed to authenticate through the broker: ${e.message}`);\n // If we tried to use the default broker account and failed, fall back to interactive authentication\n if (useDefaultBrokerAccount) {\n return getBrokeredToken(/* useDefaultBrokerAccount: */ false);\n } else {\n throw e;\n }\n }\n }\n\n function createBaseInteractiveRequest(): msal.InteractiveRequest {\n return {\n openBrowser: async (url) => {\n const open = await import(\"open\");\n await open.default(url, { wait: true, newInstance: true });\n },\n scopes,\n authority: calculateRequestAuthority(options),\n claims: options?.claims,\n loginHint: options?.loginHint,\n errorTemplate: options?.browserCustomizationOptions?.errorMessage,\n successTemplate: options?.browserCustomizationOptions?.successMessage,\n };\n }\n\n return withSilentAuthentication(app, scopes, options, async () => {\n const interactiveRequest = createBaseInteractiveRequest();\n\n if (state.pluginConfiguration.broker.isEnabled) {\n return getBrokeredToken(state.pluginConfiguration.broker.useDefaultBrokerAccount ?? false);\n }\n if (options.proofOfPossessionOptions) {\n interactiveRequest.shrNonce = options.proofOfPossessionOptions.nonce;\n interactiveRequest.authenticationScheme = \"pop\";\n interactiveRequest.resourceRequestMethod =\n options.proofOfPossessionOptions.resourceRequestMethod;\n interactiveRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;\n }\n return app.acquireTokenInteractive(interactiveRequest);\n });\n }\n\n return {\n getActiveAccount,\n getTokenByClientSecret,\n getTokenByClientAssertion,\n getTokenByClientCertificate,\n getTokenByDeviceCode,\n getTokenByUsernamePassword,\n getTokenByAuthorizationCode,\n getTokenOnBehalfOf,\n getTokenByInteractiveRequest,\n };\n}\n"]}