@azure/identity 4.5.1-alpha.20241111.1 → 4.5.1-alpha.20241113.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1066) hide show
  1. package/dist/browser/client/identityClient.d.ts +65 -0
  2. package/dist/browser/client/identityClient.d.ts.map +1 -0
  3. package/dist/browser/client/identityClient.js +248 -0
  4. package/dist/browser/client/identityClient.js.map +1 -0
  5. package/dist/browser/constants.d.ts +64 -0
  6. package/dist/browser/constants.d.ts.map +1 -0
  7. package/dist/browser/credentials/authorityValidationOptions.d.ts +16 -0
  8. package/dist/browser/credentials/authorityValidationOptions.d.ts.map +1 -0
  9. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -0
  10. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -0
  11. package/dist/browser/credentials/authorizationCodeCredential.d.ts +11 -0
  12. package/dist/browser/credentials/authorizationCodeCredential.js +16 -0
  13. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  14. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  15. package/dist/browser/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  16. package/dist/browser/credentials/azureApplicationCredential-browser.d.mts.map +1 -0
  17. package/dist/browser/credentials/azureApplicationCredential-browser.mjs.map +1 -0
  18. package/dist/browser/credentials/azureApplicationCredential.d.ts +24 -0
  19. package/dist/browser/credentials/azureApplicationCredential.js +34 -0
  20. package/dist/browser/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  21. package/dist/browser/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  22. package/dist/browser/credentials/azureApplicationCredentialOptions.js.map +1 -0
  23. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -0
  24. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -0
  25. package/dist/browser/credentials/azureCliCredential.d.ts +13 -0
  26. package/dist/browser/credentials/azureCliCredential.js +23 -0
  27. package/dist/browser/credentials/azureCliCredentialOptions.d.ts +20 -0
  28. package/dist/browser/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  29. package/dist/browser/credentials/azureCliCredentialOptions.js.map +1 -0
  30. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -0
  31. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -0
  32. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +13 -0
  33. package/dist/browser/credentials/azureDeveloperCliCredential.js +23 -0
  34. package/dist/browser/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  35. package/dist/browser/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  36. package/dist/browser/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  37. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -0
  38. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -0
  39. package/dist/browser/credentials/azurePipelinesCredential.d.ts +13 -0
  40. package/dist/browser/credentials/azurePipelinesCredential.js +23 -0
  41. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  42. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  43. package/dist/browser/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  44. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -0
  45. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -0
  46. package/dist/browser/credentials/azurePowerShellCredential.d.ts +12 -0
  47. package/dist/browser/credentials/azurePowerShellCredential.js +22 -0
  48. package/dist/browser/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  49. package/dist/browser/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  50. package/dist/browser/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  51. package/dist/browser/credentials/brokerAuthOptions.d.ts +13 -0
  52. package/dist/browser/credentials/brokerAuthOptions.d.ts.map +1 -0
  53. package/dist/browser/credentials/brokerAuthOptions.js.map +1 -0
  54. package/dist/browser/credentials/browserCustomizationOptions.d.ts +19 -0
  55. package/dist/browser/credentials/browserCustomizationOptions.d.ts.map +1 -0
  56. package/dist/browser/credentials/chainedTokenCredential.d.ts +49 -0
  57. package/dist/browser/credentials/chainedTokenCredential.d.ts.map +1 -0
  58. package/dist/browser/credentials/chainedTokenCredential.js +90 -0
  59. package/dist/browser/credentials/chainedTokenCredential.js.map +1 -0
  60. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -0
  61. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -0
  62. package/dist/browser/credentials/clientAssertionCredential.d.ts +12 -0
  63. package/dist/browser/credentials/clientAssertionCredential.js +22 -0
  64. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  65. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  66. package/dist/browser/credentials/clientAssertionCredentialOptions.js.map +1 -0
  67. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -0
  68. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -0
  69. package/dist/browser/credentials/clientCertificateCredential.d.ts +13 -0
  70. package/dist/browser/credentials/clientCertificateCredential.js +23 -0
  71. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  72. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  73. package/dist/browser/credentials/clientCertificateCredentialOptions.js.map +1 -0
  74. package/dist/browser/credentials/clientSecretCredential-browser.d.mts.map +1 -0
  75. package/dist/browser/credentials/clientSecretCredential-browser.mjs.map +1 -0
  76. package/dist/browser/credentials/clientSecretCredential.d.ts +40 -0
  77. package/dist/browser/credentials/clientSecretCredential.js +83 -0
  78. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts +9 -0
  79. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  80. package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -0
  81. package/dist/browser/credentials/credentialPersistenceOptions.d.ts +29 -0
  82. package/dist/browser/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  83. package/dist/browser/credentials/credentialPersistenceOptions.js.map +1 -0
  84. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -0
  85. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -0
  86. package/dist/browser/credentials/defaultAzureCredential.d.ts +19 -0
  87. package/dist/browser/credentials/defaultAzureCredential.js +29 -0
  88. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  89. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  90. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -0
  91. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -0
  92. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -0
  93. package/dist/browser/credentials/deviceCodeCredential.d.ts +13 -0
  94. package/dist/browser/credentials/deviceCodeCredential.js +23 -0
  95. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  96. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  97. package/dist/browser/credentials/deviceCodeCredentialOptions.js.map +1 -0
  98. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -0
  99. package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -0
  100. package/dist/browser/credentials/environmentCredential.d.ts +13 -0
  101. package/dist/browser/credentials/environmentCredential.js +23 -0
  102. package/dist/browser/credentials/environmentCredentialOptions.d.ts +9 -0
  103. package/dist/browser/credentials/environmentCredentialOptions.d.ts.map +1 -0
  104. package/dist/browser/credentials/environmentCredentialOptions.js.map +1 -0
  105. package/dist/browser/credentials/interactiveBrowserCredential-browser.d.mts.map +1 -0
  106. package/dist/browser/credentials/interactiveBrowserCredential-browser.mjs.map +1 -0
  107. package/dist/browser/credentials/interactiveBrowserCredential.d.ts +53 -0
  108. package/dist/browser/credentials/interactiveBrowserCredential.js +86 -0
  109. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  110. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  111. package/dist/browser/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  112. package/dist/browser/credentials/interactiveCredentialOptions.d.ts +25 -0
  113. package/dist/browser/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  114. package/dist/browser/credentials/interactiveCredentialOptions.js.map +1 -0
  115. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  116. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  117. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +122 -0
  118. package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  119. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  120. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  121. package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  122. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -0
  123. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -0
  124. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +6 -0
  125. package/dist/browser/credentials/managedIdentityCredential/index.js +16 -0
  126. package/dist/browser/credentials/managedIdentityCredential/models.d.ts +24 -0
  127. package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  128. package/dist/browser/credentials/managedIdentityCredential/models.js.map +1 -0
  129. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  130. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  131. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
  132. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  133. package/dist/browser/credentials/managedIdentityCredential/utils.d.ts +33 -0
  134. package/dist/browser/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  135. package/dist/browser/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  136. package/dist/browser/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  137. package/dist/browser/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  138. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -0
  139. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -0
  140. package/dist/browser/credentials/onBehalfOfCredential.d.ts +12 -0
  141. package/dist/browser/credentials/onBehalfOfCredential.js +23 -0
  142. package/dist/browser/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  143. package/dist/browser/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  144. package/dist/browser/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  145. package/dist/browser/credentials/usernamePasswordCredential-browser.d.mts.map +1 -0
  146. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -0
  147. package/dist/browser/credentials/usernamePasswordCredential.d.ts +40 -0
  148. package/dist/browser/credentials/usernamePasswordCredential.js +77 -0
  149. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
  150. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  151. package/dist/browser/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  152. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -0
  153. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -0
  154. package/dist/browser/credentials/visualStudioCodeCredential.d.ts +15 -0
  155. package/dist/browser/credentials/visualStudioCodeCredential.js +27 -0
  156. package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
  157. package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  158. package/dist/browser/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  159. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
  160. package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  161. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -0
  162. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -0
  163. package/dist/browser/credentials/workloadIdentityCredential.d.ts +17 -0
  164. package/dist/browser/credentials/workloadIdentityCredential.js +27 -0
  165. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  166. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  167. package/dist/browser/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  168. package/dist/browser/errors.d.ts +139 -0
  169. package/dist/browser/errors.d.ts.map +1 -0
  170. package/dist/browser/index.d.ts +59 -0
  171. package/dist/browser/index.d.ts.map +1 -0
  172. package/dist/browser/index.js +34 -0
  173. package/dist/browser/index.js.map +1 -0
  174. package/dist/browser/msal/browserFlows/flows.d.ts +42 -0
  175. package/dist/browser/msal/browserFlows/flows.d.ts.map +1 -0
  176. package/dist/browser/msal/browserFlows/flows.js.map +1 -0
  177. package/dist/browser/msal/browserFlows/msalAuthCode.d.ts +50 -0
  178. package/dist/browser/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
  179. package/dist/browser/msal/browserFlows/msalAuthCode.js +203 -0
  180. package/dist/browser/msal/browserFlows/msalAuthCode.js.map +1 -0
  181. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
  182. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  183. package/dist/browser/msal/browserFlows/msalBrowserCommon.js +116 -0
  184. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  185. package/dist/browser/msal/credentials.d.ts +52 -0
  186. package/dist/browser/msal/credentials.d.ts.map +1 -0
  187. package/dist/browser/msal/credentials.js.map +1 -0
  188. package/dist/browser/msal/msal-browser.d.mts.map +1 -0
  189. package/dist/browser/msal/msal-browser.mjs.map +1 -0
  190. package/dist/browser/msal/msal.d.ts +3 -0
  191. package/dist/browser/msal/msal.js +5 -0
  192. package/dist/browser/msal/nodeFlows/brokerOptions.d.ts +44 -0
  193. package/dist/browser/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  194. package/dist/browser/msal/nodeFlows/msalClient.d.ts +186 -0
  195. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +1 -0
  196. package/dist/browser/msal/nodeFlows/msalClient.js +477 -0
  197. package/dist/browser/msal/nodeFlows/msalClient.js.map +1 -0
  198. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +91 -0
  199. package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  200. package/dist/browser/msal/nodeFlows/msalPlugins.js +87 -0
  201. package/dist/browser/msal/nodeFlows/msalPlugins.js.map +1 -0
  202. package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  203. package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  204. package/dist/browser/msal/types.d.ts +87 -0
  205. package/dist/browser/msal/types.d.ts.map +1 -0
  206. package/dist/browser/msal/utils.d.ts +95 -0
  207. package/dist/browser/msal/utils.d.ts.map +1 -0
  208. package/dist/browser/msal/utils.js +232 -0
  209. package/dist/browser/msal/utils.js.map +1 -0
  210. package/dist/browser/package.json +3 -0
  211. package/dist/browser/plugins/consumer-browser.d.mts.map +1 -0
  212. package/dist/browser/plugins/consumer-browser.mjs.map +1 -0
  213. package/dist/browser/plugins/consumer.d.ts +2 -0
  214. package/dist/browser/plugins/consumer.js +7 -0
  215. package/dist/browser/plugins/provider.d.ts +36 -0
  216. package/dist/browser/plugins/provider.d.ts.map +1 -0
  217. package/dist/browser/plugins/provider.js.map +1 -0
  218. package/dist/browser/regionalAuthority.d.ts +122 -0
  219. package/dist/browser/regionalAuthority.d.ts.map +1 -0
  220. package/dist/browser/tokenCredentialOptions.d.ts +28 -0
  221. package/dist/browser/tokenCredentialOptions.d.ts.map +1 -0
  222. package/dist/browser/tokenProvider.d.ts +38 -0
  223. package/dist/browser/tokenProvider.d.ts.map +1 -0
  224. package/dist/browser/util/authHostEnv-browser.d.mts +4 -0
  225. package/dist/browser/util/authHostEnv-browser.d.mts.map +1 -0
  226. package/dist/browser/util/authHostEnv-browser.mjs +7 -0
  227. package/dist/browser/util/authHostEnv-browser.mjs.map +1 -0
  228. package/dist/browser/util/identityTokenEndpoint.d.ts +2 -0
  229. package/dist/browser/util/identityTokenEndpoint.d.ts.map +1 -0
  230. package/dist/browser/util/logging.d.ts +70 -0
  231. package/dist/browser/util/logging.d.ts.map +1 -0
  232. package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +1 -0
  233. package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +1 -0
  234. package/dist/browser/util/processMultiTenantRequest.d.ts +9 -0
  235. package/dist/browser/util/processMultiTenantRequest.js +29 -0
  236. package/dist/browser/util/processUtils.d.ts +13 -0
  237. package/dist/browser/util/processUtils.d.ts.map +1 -0
  238. package/dist/browser/util/scopeUtils.d.ts +17 -0
  239. package/dist/browser/util/scopeUtils.d.ts.map +1 -0
  240. package/dist/browser/util/scopeUtils.js +29 -0
  241. package/dist/browser/util/scopeUtils.js.map +1 -0
  242. package/dist/browser/util/subscriptionUtils.d.ts +6 -0
  243. package/dist/browser/util/subscriptionUtils.d.ts.map +1 -0
  244. package/dist/browser/util/subscriptionUtils.js +14 -0
  245. package/dist/browser/util/subscriptionUtils.js.map +1 -0
  246. package/dist/browser/util/tenantIdUtils.d.ts +15 -0
  247. package/dist/browser/util/tenantIdUtils.d.ts.map +1 -0
  248. package/dist/browser/util/tenantIdUtils.js +44 -0
  249. package/dist/browser/util/tenantIdUtils.js.map +1 -0
  250. package/dist/browser/util/tracing.d.ts +6 -0
  251. package/dist/browser/util/tracing.d.ts.map +1 -0
  252. package/dist/browser/util/tracing.js +14 -0
  253. package/dist/browser/util/tracing.js.map +1 -0
  254. package/dist/commonjs/client/identityClient.d.ts +65 -0
  255. package/dist/commonjs/client/identityClient.d.ts.map +1 -0
  256. package/dist/commonjs/client/identityClient.js +253 -0
  257. package/dist/commonjs/client/identityClient.js.map +1 -0
  258. package/dist/commonjs/constants.d.ts +64 -0
  259. package/dist/commonjs/constants.d.ts.map +1 -0
  260. package/dist/commonjs/constants.js +73 -0
  261. package/dist/commonjs/constants.js.map +1 -0
  262. package/dist/commonjs/credentials/authorityValidationOptions.d.ts +16 -0
  263. package/dist/commonjs/credentials/authorityValidationOptions.d.ts.map +1 -0
  264. package/dist/commonjs/credentials/authorityValidationOptions.js +5 -0
  265. package/dist/commonjs/credentials/authorityValidationOptions.js.map +1 -0
  266. package/dist/commonjs/credentials/authorizationCodeCredential.d.ts +73 -0
  267. package/dist/commonjs/credentials/authorizationCodeCredential.d.ts.map +1 -0
  268. package/dist/commonjs/credentials/authorizationCodeCredential.js +64 -0
  269. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +1 -0
  270. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  271. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  272. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +5 -0
  273. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  274. package/dist/commonjs/credentials/azureApplicationCredential.d.ts +24 -0
  275. package/dist/commonjs/credentials/azureApplicationCredential.d.ts.map +1 -0
  276. package/dist/commonjs/credentials/azureApplicationCredential.js +36 -0
  277. package/dist/commonjs/credentials/azureApplicationCredential.js.map +1 -0
  278. package/dist/commonjs/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  279. package/dist/commonjs/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  280. package/dist/commonjs/credentials/azureApplicationCredentialOptions.js +5 -0
  281. package/dist/commonjs/credentials/azureApplicationCredentialOptions.js.map +1 -0
  282. package/dist/commonjs/credentials/azureCliCredential.d.ts +64 -0
  283. package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -0
  284. package/dist/commonjs/credentials/azureCliCredential.js +194 -0
  285. package/dist/commonjs/credentials/azureCliCredential.js.map +1 -0
  286. package/dist/commonjs/credentials/azureCliCredentialOptions.d.ts +20 -0
  287. package/dist/commonjs/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  288. package/dist/commonjs/credentials/azureCliCredentialOptions.js +5 -0
  289. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +1 -0
  290. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts +71 -0
  291. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  292. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +176 -0
  293. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +1 -0
  294. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  295. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  296. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +5 -0
  297. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  298. package/dist/commonjs/credentials/azurePipelinesCredential.d.ts +38 -0
  299. package/dist/commonjs/credentials/azurePipelinesCredential.d.ts.map +1 -0
  300. package/dist/commonjs/credentials/azurePipelinesCredential.js +146 -0
  301. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +1 -0
  302. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  303. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  304. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +5 -0
  305. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  306. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts +75 -0
  307. package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -0
  308. package/dist/commonjs/credentials/azurePowerShellCredential.js +235 -0
  309. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +1 -0
  310. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  311. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  312. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +5 -0
  313. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  314. package/dist/commonjs/credentials/brokerAuthOptions.d.ts +13 -0
  315. package/dist/commonjs/credentials/brokerAuthOptions.d.ts.map +1 -0
  316. package/dist/commonjs/credentials/brokerAuthOptions.js +3 -0
  317. package/dist/commonjs/credentials/brokerAuthOptions.js.map +1 -0
  318. package/dist/commonjs/credentials/browserCustomizationOptions.d.ts +19 -0
  319. package/dist/commonjs/credentials/browserCustomizationOptions.d.ts.map +1 -0
  320. package/dist/commonjs/credentials/browserCustomizationOptions.js +5 -0
  321. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +1 -0
  322. package/dist/commonjs/credentials/chainedTokenCredential.d.ts +49 -0
  323. package/dist/commonjs/credentials/chainedTokenCredential.d.ts.map +1 -0
  324. package/dist/commonjs/credentials/chainedTokenCredential.js +94 -0
  325. package/dist/commonjs/credentials/chainedTokenCredential.js.map +1 -0
  326. package/dist/commonjs/credentials/clientAssertionCredential.d.ts +33 -0
  327. package/dist/commonjs/credentials/clientAssertionCredential.d.ts.map +1 -0
  328. package/dist/commonjs/credentials/clientAssertionCredential.js +59 -0
  329. package/dist/commonjs/credentials/clientAssertionCredential.js.map +1 -0
  330. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  331. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  332. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +5 -0
  333. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +1 -0
  334. package/dist/commonjs/credentials/clientCertificateCredential.d.ts +101 -0
  335. package/dist/commonjs/credentials/clientCertificateCredential.d.ts.map +1 -0
  336. package/dist/commonjs/credentials/clientCertificateCredential.js +124 -0
  337. package/dist/commonjs/credentials/clientCertificateCredential.js.map +1 -0
  338. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  339. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  340. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +5 -0
  341. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +1 -0
  342. package/dist/commonjs/credentials/clientSecretCredential.d.ts +37 -0
  343. package/dist/commonjs/credentials/clientSecretCredential.d.ts.map +1 -0
  344. package/dist/commonjs/credentials/clientSecretCredential.js +64 -0
  345. package/dist/commonjs/credentials/clientSecretCredential.js.map +1 -0
  346. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts +9 -0
  347. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  348. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +5 -0
  349. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +1 -0
  350. package/dist/commonjs/credentials/credentialPersistenceOptions.d.ts +29 -0
  351. package/dist/commonjs/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  352. package/dist/commonjs/credentials/credentialPersistenceOptions.js +5 -0
  353. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +1 -0
  354. package/dist/commonjs/credentials/defaultAzureCredential.d.ts +65 -0
  355. package/dist/commonjs/credentials/defaultAzureCredential.d.ts.map +1 -0
  356. package/dist/commonjs/credentials/defaultAzureCredential.js +171 -0
  357. package/dist/commonjs/credentials/defaultAzureCredential.js.map +1 -0
  358. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  359. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  360. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +5 -0
  361. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +1 -0
  362. package/dist/commonjs/credentials/deviceCodeCredential.d.ts +67 -0
  363. package/dist/commonjs/credentials/deviceCodeCredential.d.ts.map +1 -0
  364. package/dist/commonjs/credentials/deviceCodeCredential.js +96 -0
  365. package/dist/commonjs/credentials/deviceCodeCredential.js.map +1 -0
  366. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  367. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  368. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +5 -0
  369. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +1 -0
  370. package/dist/commonjs/credentials/environmentCredential.d.ts +52 -0
  371. package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -0
  372. package/dist/commonjs/credentials/environmentCredential.js +135 -0
  373. package/dist/commonjs/credentials/environmentCredential.js.map +1 -0
  374. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts +9 -0
  375. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -0
  376. package/dist/commonjs/credentials/environmentCredentialOptions.js +5 -0
  377. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +1 -0
  378. package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts +56 -0
  379. package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  380. package/dist/commonjs/credentials/interactiveBrowserCredential.js +95 -0
  381. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +1 -0
  382. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  383. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  384. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +5 -0
  385. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  386. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts +25 -0
  387. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  388. package/dist/commonjs/credentials/interactiveCredentialOptions.js +5 -0
  389. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +1 -0
  390. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  391. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  392. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +125 -0
  393. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  394. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  395. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  396. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +36 -0
  397. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  398. package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts +95 -0
  399. package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  400. package/dist/commonjs/credentials/managedIdentityCredential/index.js +221 -0
  401. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +1 -0
  402. package/dist/commonjs/credentials/managedIdentityCredential/models.d.ts +24 -0
  403. package/dist/commonjs/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  404. package/dist/commonjs/credentials/managedIdentityCredential/models.js +5 -0
  405. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +1 -0
  406. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  407. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  408. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +35 -0
  409. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  410. package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts +33 -0
  411. package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  412. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +82 -0
  413. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +1 -0
  414. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  415. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  416. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +5 -0
  417. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  418. package/dist/commonjs/credentials/onBehalfOfCredential.d.ts +102 -0
  419. package/dist/commonjs/credentials/onBehalfOfCredential.d.ts.map +1 -0
  420. package/dist/commonjs/credentials/onBehalfOfCredential.js +116 -0
  421. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +1 -0
  422. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  423. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  424. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +5 -0
  425. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  426. package/dist/commonjs/credentials/usernamePasswordCredential.d.ts +41 -0
  427. package/dist/commonjs/credentials/usernamePasswordCredential.d.ts.map +1 -0
  428. package/dist/commonjs/credentials/usernamePasswordCredential.js +71 -0
  429. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +1 -0
  430. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
  431. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  432. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +5 -0
  433. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  434. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts +60 -0
  435. package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  436. package/dist/commonjs/credentials/visualStudioCodeCredential.js +196 -0
  437. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +1 -0
  438. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
  439. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  440. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +5 -0
  441. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  442. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
  443. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  444. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +5 -0
  445. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
  446. package/dist/commonjs/credentials/workloadIdentityCredential.d.ts +47 -0
  447. package/dist/commonjs/credentials/workloadIdentityCredential.d.ts.map +1 -0
  448. package/dist/commonjs/credentials/workloadIdentityCredential.js +118 -0
  449. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +1 -0
  450. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  451. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  452. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +5 -0
  453. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  454. package/dist/commonjs/errors.d.ts +139 -0
  455. package/dist/commonjs/errors.d.ts.map +1 -0
  456. package/dist/commonjs/errors.js +130 -0
  457. package/dist/commonjs/errors.js.map +1 -0
  458. package/dist/commonjs/index.d.ts +59 -0
  459. package/dist/commonjs/index.d.ts.map +1 -0
  460. package/dist/commonjs/index.js +69 -0
  461. package/dist/commonjs/index.js.map +1 -0
  462. package/dist/commonjs/msal/browserFlows/flows.d.ts +42 -0
  463. package/dist/commonjs/msal/browserFlows/flows.d.ts.map +1 -0
  464. package/dist/commonjs/msal/browserFlows/flows.js +5 -0
  465. package/dist/commonjs/msal/browserFlows/flows.js.map +1 -0
  466. package/dist/commonjs/msal/browserFlows/msalAuthCode.d.ts +50 -0
  467. package/dist/commonjs/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
  468. package/dist/commonjs/msal/browserFlows/msalAuthCode.js +208 -0
  469. package/dist/commonjs/msal/browserFlows/msalAuthCode.js.map +1 -0
  470. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
  471. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  472. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +121 -0
  473. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  474. package/dist/commonjs/msal/credentials.d.ts +52 -0
  475. package/dist/commonjs/msal/credentials.d.ts.map +1 -0
  476. package/dist/commonjs/msal/credentials.js +5 -0
  477. package/dist/commonjs/msal/credentials.js.map +1 -0
  478. package/dist/commonjs/msal/msal.d.ts +3 -0
  479. package/dist/commonjs/msal/msal.d.ts.map +1 -0
  480. package/dist/commonjs/msal/msal.js +9 -0
  481. package/dist/commonjs/msal/msal.js.map +1 -0
  482. package/dist/commonjs/msal/nodeFlows/brokerOptions.d.ts +44 -0
  483. package/dist/commonjs/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  484. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +3 -0
  485. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +1 -0
  486. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts +186 -0
  487. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -0
  488. package/dist/commonjs/msal/nodeFlows/msalClient.js +482 -0
  489. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +1 -0
  490. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts +91 -0
  491. package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  492. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +91 -0
  493. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +1 -0
  494. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  495. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  496. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +5 -0
  497. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
  498. package/dist/commonjs/msal/types.d.ts +87 -0
  499. package/dist/commonjs/msal/types.d.ts.map +1 -0
  500. package/dist/commonjs/msal/types.js +5 -0
  501. package/dist/commonjs/msal/types.js.map +1 -0
  502. package/dist/commonjs/msal/utils.d.ts +95 -0
  503. package/dist/commonjs/msal/utils.d.ts.map +1 -0
  504. package/dist/commonjs/msal/utils.js +247 -0
  505. package/dist/commonjs/msal/utils.js.map +1 -0
  506. package/dist/commonjs/package.json +3 -0
  507. package/dist/commonjs/plugins/consumer.d.ts +28 -0
  508. package/dist/commonjs/plugins/consumer.d.ts.map +1 -0
  509. package/dist/commonjs/plugins/consumer.js +46 -0
  510. package/dist/commonjs/plugins/consumer.js.map +1 -0
  511. package/dist/commonjs/plugins/provider.d.ts +36 -0
  512. package/dist/commonjs/plugins/provider.d.ts.map +1 -0
  513. package/dist/commonjs/plugins/provider.js +5 -0
  514. package/dist/commonjs/plugins/provider.js.map +1 -0
  515. package/dist/commonjs/regionalAuthority.d.ts +122 -0
  516. package/dist/commonjs/regionalAuthority.d.ts.map +1 -0
  517. package/dist/commonjs/regionalAuthority.js +144 -0
  518. package/dist/commonjs/regionalAuthority.js.map +1 -0
  519. package/dist/commonjs/tokenCredentialOptions.d.ts +28 -0
  520. package/dist/commonjs/tokenCredentialOptions.d.ts.map +1 -0
  521. package/dist/commonjs/tokenCredentialOptions.js +5 -0
  522. package/dist/commonjs/tokenCredentialOptions.js.map +1 -0
  523. package/dist/commonjs/tokenProvider.d.ts +38 -0
  524. package/dist/commonjs/tokenProvider.d.ts.map +1 -0
  525. package/dist/commonjs/tokenProvider.js +55 -0
  526. package/dist/commonjs/tokenProvider.js.map +1 -0
  527. package/dist/commonjs/tsdoc-metadata.json +11 -0
  528. package/dist/commonjs/util/identityTokenEndpoint.d.ts +2 -0
  529. package/dist/commonjs/util/identityTokenEndpoint.d.ts.map +1 -0
  530. package/dist/commonjs/util/identityTokenEndpoint.js +14 -0
  531. package/dist/commonjs/util/identityTokenEndpoint.js.map +1 -0
  532. package/dist/commonjs/util/logging.d.ts +70 -0
  533. package/dist/commonjs/util/logging.d.ts.map +1 -0
  534. package/dist/commonjs/util/logging.js +103 -0
  535. package/dist/commonjs/util/logging.js.map +1 -0
  536. package/dist/commonjs/util/processMultiTenantRequest.d.ts +10 -0
  537. package/dist/commonjs/util/processMultiTenantRequest.d.ts.map +1 -0
  538. package/dist/commonjs/util/processMultiTenantRequest.js +38 -0
  539. package/dist/commonjs/util/processMultiTenantRequest.js.map +1 -0
  540. package/dist/commonjs/util/processUtils.d.ts +13 -0
  541. package/dist/commonjs/util/processUtils.d.ts.map +1 -0
  542. package/dist/commonjs/util/processUtils.js +36 -0
  543. package/dist/commonjs/util/processUtils.js.map +1 -0
  544. package/dist/commonjs/util/scopeUtils.d.ts +17 -0
  545. package/dist/commonjs/util/scopeUtils.d.ts.map +1 -0
  546. package/dist/commonjs/util/scopeUtils.js +34 -0
  547. package/dist/commonjs/util/scopeUtils.js.map +1 -0
  548. package/dist/commonjs/util/subscriptionUtils.d.ts +6 -0
  549. package/dist/commonjs/util/subscriptionUtils.d.ts.map +1 -0
  550. package/dist/commonjs/util/subscriptionUtils.js +17 -0
  551. package/dist/commonjs/util/subscriptionUtils.js.map +1 -0
  552. package/dist/commonjs/util/tenantIdUtils.d.ts +15 -0
  553. package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -0
  554. package/dist/commonjs/util/tenantIdUtils.js +51 -0
  555. package/dist/commonjs/util/tenantIdUtils.js.map +1 -0
  556. package/dist/commonjs/util/tracing.d.ts +6 -0
  557. package/dist/commonjs/util/tracing.d.ts.map +1 -0
  558. package/dist/commonjs/util/tracing.js +17 -0
  559. package/dist/commonjs/util/tracing.js.map +1 -0
  560. package/dist/esm/client/identityClient.d.ts +65 -0
  561. package/dist/esm/client/identityClient.d.ts.map +1 -0
  562. package/dist/esm/client/identityClient.js +248 -0
  563. package/dist/esm/client/identityClient.js.map +1 -0
  564. package/dist/esm/constants.d.ts +64 -0
  565. package/dist/esm/constants.d.ts.map +1 -0
  566. package/dist/esm/constants.js +70 -0
  567. package/dist/esm/constants.js.map +1 -0
  568. package/dist/esm/credentials/authorityValidationOptions.d.ts +16 -0
  569. package/dist/esm/credentials/authorityValidationOptions.d.ts.map +1 -0
  570. package/dist/esm/credentials/authorityValidationOptions.js +4 -0
  571. package/dist/esm/credentials/authorityValidationOptions.js.map +1 -0
  572. package/dist/esm/credentials/authorizationCodeCredential.d.ts +73 -0
  573. package/dist/esm/credentials/authorizationCodeCredential.d.ts.map +1 -0
  574. package/dist/esm/credentials/authorizationCodeCredential.js +60 -0
  575. package/dist/esm/credentials/authorizationCodeCredential.js.map +1 -0
  576. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  577. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  578. package/dist/esm/credentials/authorizationCodeCredentialOptions.js +4 -0
  579. package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  580. package/dist/esm/credentials/azureApplicationCredential.d.ts +24 -0
  581. package/dist/esm/credentials/azureApplicationCredential.d.ts.map +1 -0
  582. package/dist/esm/credentials/azureApplicationCredential.js +32 -0
  583. package/dist/esm/credentials/azureApplicationCredential.js.map +1 -0
  584. package/dist/esm/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  585. package/dist/esm/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  586. package/dist/esm/credentials/azureApplicationCredentialOptions.js +4 -0
  587. package/dist/esm/credentials/azureApplicationCredentialOptions.js.map +1 -0
  588. package/dist/esm/credentials/azureCliCredential.d.ts +64 -0
  589. package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -0
  590. package/dist/esm/credentials/azureCliCredential.js +189 -0
  591. package/dist/esm/credentials/azureCliCredential.js.map +1 -0
  592. package/dist/esm/credentials/azureCliCredentialOptions.d.ts +20 -0
  593. package/dist/esm/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  594. package/dist/esm/credentials/azureCliCredentialOptions.js +4 -0
  595. package/dist/esm/credentials/azureCliCredentialOptions.js.map +1 -0
  596. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts +71 -0
  597. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  598. package/dist/esm/credentials/azureDeveloperCliCredential.js +171 -0
  599. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -0
  600. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  601. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  602. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.js +4 -0
  603. package/dist/esm/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  604. package/dist/esm/credentials/azurePipelinesCredential.d.ts +38 -0
  605. package/dist/esm/credentials/azurePipelinesCredential.d.ts.map +1 -0
  606. package/dist/esm/credentials/azurePipelinesCredential.js +141 -0
  607. package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -0
  608. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  609. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  610. package/dist/esm/credentials/azurePipelinesCredentialOptions.js +4 -0
  611. package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  612. package/dist/esm/credentials/azurePowerShellCredential.d.ts +75 -0
  613. package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -0
  614. package/dist/esm/credentials/azurePowerShellCredential.js +229 -0
  615. package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -0
  616. package/dist/esm/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  617. package/dist/esm/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  618. package/dist/esm/credentials/azurePowerShellCredentialOptions.js +4 -0
  619. package/dist/esm/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  620. package/dist/esm/credentials/brokerAuthOptions.d.ts +13 -0
  621. package/dist/esm/credentials/brokerAuthOptions.d.ts.map +1 -0
  622. package/dist/esm/credentials/brokerAuthOptions.js +2 -0
  623. package/dist/esm/credentials/brokerAuthOptions.js.map +1 -0
  624. package/dist/esm/credentials/browserCustomizationOptions.d.ts +19 -0
  625. package/dist/esm/credentials/browserCustomizationOptions.d.ts.map +1 -0
  626. package/dist/esm/credentials/browserCustomizationOptions.js +4 -0
  627. package/dist/esm/credentials/browserCustomizationOptions.js.map +1 -0
  628. package/dist/esm/credentials/chainedTokenCredential.d.ts +49 -0
  629. package/dist/esm/credentials/chainedTokenCredential.d.ts.map +1 -0
  630. package/dist/esm/credentials/chainedTokenCredential.js +90 -0
  631. package/dist/esm/credentials/chainedTokenCredential.js.map +1 -0
  632. package/dist/esm/credentials/clientAssertionCredential.d.ts +33 -0
  633. package/dist/esm/credentials/clientAssertionCredential.d.ts.map +1 -0
  634. package/dist/esm/credentials/clientAssertionCredential.js +55 -0
  635. package/dist/esm/credentials/clientAssertionCredential.js.map +1 -0
  636. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  637. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  638. package/dist/esm/credentials/clientAssertionCredentialOptions.js +4 -0
  639. package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -0
  640. package/dist/esm/credentials/clientCertificateCredential.d.ts +101 -0
  641. package/dist/esm/credentials/clientCertificateCredential.d.ts.map +1 -0
  642. package/dist/esm/credentials/clientCertificateCredential.js +119 -0
  643. package/dist/esm/credentials/clientCertificateCredential.js.map +1 -0
  644. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  645. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  646. package/dist/esm/credentials/clientCertificateCredentialOptions.js +4 -0
  647. package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -0
  648. package/dist/esm/credentials/clientSecretCredential.d.ts +37 -0
  649. package/dist/esm/credentials/clientSecretCredential.d.ts.map +1 -0
  650. package/dist/esm/credentials/clientSecretCredential.js +60 -0
  651. package/dist/esm/credentials/clientSecretCredential.js.map +1 -0
  652. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts +9 -0
  653. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  654. package/dist/esm/credentials/clientSecretCredentialOptions.js +4 -0
  655. package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -0
  656. package/dist/esm/credentials/credentialPersistenceOptions.d.ts +29 -0
  657. package/dist/esm/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  658. package/dist/esm/credentials/credentialPersistenceOptions.js +4 -0
  659. package/dist/esm/credentials/credentialPersistenceOptions.js.map +1 -0
  660. package/dist/esm/credentials/defaultAzureCredential.d.ts +65 -0
  661. package/dist/esm/credentials/defaultAzureCredential.d.ts.map +1 -0
  662. package/dist/esm/credentials/defaultAzureCredential.js +164 -0
  663. package/dist/esm/credentials/defaultAzureCredential.js.map +1 -0
  664. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  665. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  666. package/dist/esm/credentials/defaultAzureCredentialOptions.js +4 -0
  667. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -0
  668. package/dist/esm/credentials/deviceCodeCredential.d.ts +67 -0
  669. package/dist/esm/credentials/deviceCodeCredential.d.ts.map +1 -0
  670. package/dist/esm/credentials/deviceCodeCredential.js +91 -0
  671. package/dist/esm/credentials/deviceCodeCredential.js.map +1 -0
  672. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  673. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  674. package/dist/esm/credentials/deviceCodeCredentialOptions.js +4 -0
  675. package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -0
  676. package/dist/esm/credentials/environmentCredential.d.ts +52 -0
  677. package/dist/esm/credentials/environmentCredential.d.ts.map +1 -0
  678. package/dist/esm/credentials/environmentCredential.js +130 -0
  679. package/dist/esm/credentials/environmentCredential.js.map +1 -0
  680. package/dist/esm/credentials/environmentCredentialOptions.d.ts +9 -0
  681. package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -0
  682. package/dist/esm/credentials/environmentCredentialOptions.js +4 -0
  683. package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -0
  684. package/dist/esm/credentials/interactiveBrowserCredential.d.ts +56 -0
  685. package/dist/esm/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  686. package/dist/esm/credentials/interactiveBrowserCredential.js +91 -0
  687. package/dist/esm/credentials/interactiveBrowserCredential.js.map +1 -0
  688. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  689. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  690. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js +4 -0
  691. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  692. package/dist/esm/credentials/interactiveCredentialOptions.d.ts +25 -0
  693. package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  694. package/dist/esm/credentials/interactiveCredentialOptions.js +4 -0
  695. package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -0
  696. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  697. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  698. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js +122 -0
  699. package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  700. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  701. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  702. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js +33 -0
  703. package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  704. package/dist/esm/credentials/managedIdentityCredential/index.d.ts +95 -0
  705. package/dist/esm/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  706. package/dist/esm/credentials/managedIdentityCredential/index.js +217 -0
  707. package/dist/esm/credentials/managedIdentityCredential/index.js.map +1 -0
  708. package/dist/esm/credentials/managedIdentityCredential/models.d.ts +24 -0
  709. package/dist/esm/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  710. package/dist/esm/credentials/managedIdentityCredential/models.js +4 -0
  711. package/dist/esm/credentials/managedIdentityCredential/models.js.map +1 -0
  712. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  713. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  714. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
  715. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  716. package/dist/esm/credentials/managedIdentityCredential/utils.d.ts +33 -0
  717. package/dist/esm/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  718. package/dist/esm/credentials/managedIdentityCredential/utils.js +77 -0
  719. package/dist/esm/credentials/managedIdentityCredential/utils.js.map +1 -0
  720. package/dist/esm/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  721. package/dist/esm/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  722. package/dist/esm/credentials/multiTenantTokenCredentialOptions.js +4 -0
  723. package/dist/esm/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  724. package/dist/esm/credentials/onBehalfOfCredential.d.ts +102 -0
  725. package/dist/esm/credentials/onBehalfOfCredential.d.ts.map +1 -0
  726. package/dist/esm/credentials/onBehalfOfCredential.js +112 -0
  727. package/dist/esm/credentials/onBehalfOfCredential.js.map +1 -0
  728. package/dist/esm/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  729. package/dist/esm/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  730. package/dist/esm/credentials/onBehalfOfCredentialOptions.js +4 -0
  731. package/dist/esm/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  732. package/dist/esm/credentials/usernamePasswordCredential.d.ts +41 -0
  733. package/dist/esm/credentials/usernamePasswordCredential.d.ts.map +1 -0
  734. package/dist/esm/credentials/usernamePasswordCredential.js +67 -0
  735. package/dist/esm/credentials/usernamePasswordCredential.js.map +1 -0
  736. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
  737. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  738. package/dist/esm/credentials/usernamePasswordCredentialOptions.js +4 -0
  739. package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  740. package/dist/esm/credentials/visualStudioCodeCredential.d.ts +60 -0
  741. package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  742. package/dist/esm/credentials/visualStudioCodeCredential.js +190 -0
  743. package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -0
  744. package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
  745. package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  746. package/dist/esm/credentials/visualStudioCodeCredentialOptions.js +4 -0
  747. package/dist/esm/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  748. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
  749. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  750. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +4 -0
  751. package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
  752. package/dist/esm/credentials/workloadIdentityCredential.d.ts +47 -0
  753. package/dist/esm/credentials/workloadIdentityCredential.d.ts.map +1 -0
  754. package/dist/esm/credentials/workloadIdentityCredential.js +114 -0
  755. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -0
  756. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  757. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  758. package/dist/esm/credentials/workloadIdentityCredentialOptions.js +4 -0
  759. package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  760. package/dist/esm/errors.d.ts +139 -0
  761. package/dist/esm/errors.d.ts.map +1 -0
  762. package/dist/esm/errors.js +123 -0
  763. package/dist/esm/errors.js.map +1 -0
  764. package/dist/esm/index.d.ts +59 -0
  765. package/dist/esm/index.d.ts.map +1 -0
  766. package/dist/esm/index.js +34 -0
  767. package/dist/esm/index.js.map +1 -0
  768. package/dist/esm/msal/browserFlows/flows.d.ts +42 -0
  769. package/dist/esm/msal/browserFlows/flows.d.ts.map +1 -0
  770. package/dist/esm/msal/browserFlows/flows.js +4 -0
  771. package/dist/esm/msal/browserFlows/flows.js.map +1 -0
  772. package/dist/esm/msal/browserFlows/msalAuthCode.d.ts +50 -0
  773. package/dist/esm/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
  774. package/dist/esm/msal/browserFlows/msalAuthCode.js +203 -0
  775. package/dist/esm/msal/browserFlows/msalAuthCode.js.map +1 -0
  776. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
  777. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  778. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +116 -0
  779. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  780. package/dist/esm/msal/credentials.d.ts +52 -0
  781. package/dist/esm/msal/credentials.d.ts.map +1 -0
  782. package/dist/esm/msal/credentials.js +4 -0
  783. package/dist/esm/msal/credentials.js.map +1 -0
  784. package/dist/esm/msal/msal.d.ts +3 -0
  785. package/dist/esm/msal/msal.d.ts.map +1 -0
  786. package/dist/esm/msal/nodeFlows/brokerOptions.d.ts +44 -0
  787. package/dist/esm/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  788. package/dist/esm/msal/nodeFlows/brokerOptions.js +2 -0
  789. package/dist/esm/msal/nodeFlows/brokerOptions.js.map +1 -0
  790. package/dist/esm/msal/nodeFlows/msalClient.d.ts +186 -0
  791. package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -0
  792. package/dist/esm/msal/nodeFlows/msalClient.js +477 -0
  793. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -0
  794. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts +91 -0
  795. package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  796. package/dist/esm/msal/nodeFlows/msalPlugins.js +87 -0
  797. package/dist/esm/msal/nodeFlows/msalPlugins.js.map +1 -0
  798. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  799. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  800. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.js +4 -0
  801. package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
  802. package/dist/esm/msal/types.d.ts +87 -0
  803. package/dist/esm/msal/types.d.ts.map +1 -0
  804. package/dist/esm/msal/types.js +4 -0
  805. package/dist/esm/msal/types.js.map +1 -0
  806. package/dist/esm/msal/utils.d.ts +95 -0
  807. package/dist/esm/msal/utils.d.ts.map +1 -0
  808. package/dist/esm/msal/utils.js +232 -0
  809. package/dist/esm/msal/utils.js.map +1 -0
  810. package/dist/esm/package.json +3 -0
  811. package/dist/esm/plugins/consumer.d.ts +28 -0
  812. package/dist/esm/plugins/consumer.d.ts.map +1 -0
  813. package/dist/esm/plugins/consumer.js +43 -0
  814. package/dist/esm/plugins/consumer.js.map +1 -0
  815. package/dist/esm/plugins/provider.d.ts +36 -0
  816. package/dist/esm/plugins/provider.d.ts.map +1 -0
  817. package/dist/esm/plugins/provider.js +4 -0
  818. package/dist/esm/plugins/provider.js.map +1 -0
  819. package/dist/esm/regionalAuthority.d.ts +122 -0
  820. package/dist/esm/regionalAuthority.d.ts.map +1 -0
  821. package/dist/esm/regionalAuthority.js +140 -0
  822. package/dist/esm/regionalAuthority.js.map +1 -0
  823. package/dist/esm/tokenCredentialOptions.d.ts +28 -0
  824. package/dist/esm/tokenCredentialOptions.d.ts.map +1 -0
  825. package/dist/esm/tokenCredentialOptions.js +4 -0
  826. package/dist/esm/tokenCredentialOptions.js.map +1 -0
  827. package/dist/esm/tokenProvider.d.ts +38 -0
  828. package/dist/esm/tokenProvider.d.ts.map +1 -0
  829. package/dist/esm/tokenProvider.js +52 -0
  830. package/dist/esm/tokenProvider.js.map +1 -0
  831. package/dist/esm/util/authHostEnv-browser.d.mts +4 -0
  832. package/dist/esm/util/authHostEnv-browser.d.mts.map +1 -0
  833. package/dist/esm/util/authHostEnv-browser.mjs +7 -0
  834. package/dist/esm/util/authHostEnv-browser.mjs.map +1 -0
  835. package/dist/esm/util/identityTokenEndpoint.d.ts +2 -0
  836. package/dist/esm/util/identityTokenEndpoint.d.ts.map +1 -0
  837. package/dist/esm/util/identityTokenEndpoint.js +11 -0
  838. package/dist/esm/util/identityTokenEndpoint.js.map +1 -0
  839. package/dist/esm/util/logging.d.ts +70 -0
  840. package/dist/esm/util/logging.d.ts.map +1 -0
  841. package/dist/esm/util/logging.js +94 -0
  842. package/dist/esm/util/logging.js.map +1 -0
  843. package/dist/esm/util/processMultiTenantRequest.d.ts +10 -0
  844. package/dist/esm/util/processMultiTenantRequest.d.ts.map +1 -0
  845. package/dist/esm/util/processMultiTenantRequest.js +35 -0
  846. package/dist/esm/util/processMultiTenantRequest.js.map +1 -0
  847. package/dist/esm/util/processUtils.d.ts +13 -0
  848. package/dist/esm/util/processUtils.d.ts.map +1 -0
  849. package/dist/esm/util/processUtils.js +32 -0
  850. package/dist/esm/util/processUtils.js.map +1 -0
  851. package/dist/esm/util/scopeUtils.d.ts +17 -0
  852. package/dist/esm/util/scopeUtils.d.ts.map +1 -0
  853. package/dist/esm/util/scopeUtils.js +29 -0
  854. package/dist/esm/util/scopeUtils.js.map +1 -0
  855. package/dist/esm/util/subscriptionUtils.d.ts +6 -0
  856. package/dist/esm/util/subscriptionUtils.d.ts.map +1 -0
  857. package/dist/esm/util/subscriptionUtils.js +14 -0
  858. package/dist/esm/util/subscriptionUtils.js.map +1 -0
  859. package/dist/esm/util/tenantIdUtils.d.ts +15 -0
  860. package/dist/esm/util/tenantIdUtils.d.ts.map +1 -0
  861. package/dist/esm/util/tenantIdUtils.js +44 -0
  862. package/dist/esm/util/tenantIdUtils.js.map +1 -0
  863. package/dist/esm/util/tracing.d.ts +6 -0
  864. package/dist/esm/util/tracing.d.ts.map +1 -0
  865. package/dist/esm/util/tracing.js +14 -0
  866. package/dist/esm/util/tracing.js.map +1 -0
  867. package/package.json +52 -63
  868. package/dist/index.js +0 -4200
  869. package/dist/index.js.map +0 -1
  870. package/dist-esm/src/client/identityClient.js +0 -248
  871. package/dist-esm/src/client/identityClient.js.map +0 -1
  872. package/dist-esm/src/credentials/authorizationCodeCredential.browser.js +0 -16
  873. package/dist-esm/src/credentials/authorizationCodeCredential.browser.js.map +0 -1
  874. package/dist-esm/src/credentials/authorizationCodeCredential.js +0 -60
  875. package/dist-esm/src/credentials/authorizationCodeCredential.js.map +0 -1
  876. package/dist-esm/src/credentials/authorizationCodeCredentialOptions.js.map +0 -1
  877. package/dist-esm/src/credentials/azureApplicationCredential.browser.js +0 -34
  878. package/dist-esm/src/credentials/azureApplicationCredential.browser.js.map +0 -1
  879. package/dist-esm/src/credentials/azureApplicationCredential.js +0 -32
  880. package/dist-esm/src/credentials/azureApplicationCredential.js.map +0 -1
  881. package/dist-esm/src/credentials/azureApplicationCredentialOptions.js.map +0 -1
  882. package/dist-esm/src/credentials/azureCliCredential.browser.js +0 -23
  883. package/dist-esm/src/credentials/azureCliCredential.browser.js.map +0 -1
  884. package/dist-esm/src/credentials/azureCliCredential.js +0 -189
  885. package/dist-esm/src/credentials/azureCliCredential.js.map +0 -1
  886. package/dist-esm/src/credentials/azureCliCredentialOptions.js.map +0 -1
  887. package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js +0 -23
  888. package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js.map +0 -1
  889. package/dist-esm/src/credentials/azureDeveloperCliCredential.js +0 -171
  890. package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +0 -1
  891. package/dist-esm/src/credentials/azureDeveloperCliCredentialOptions.js.map +0 -1
  892. package/dist-esm/src/credentials/azurePipelinesCredential.browser.js +0 -23
  893. package/dist-esm/src/credentials/azurePipelinesCredential.browser.js.map +0 -1
  894. package/dist-esm/src/credentials/azurePipelinesCredential.js +0 -141
  895. package/dist-esm/src/credentials/azurePipelinesCredential.js.map +0 -1
  896. package/dist-esm/src/credentials/azurePipelinesCredentialOptions.js.map +0 -1
  897. package/dist-esm/src/credentials/azurePowerShellCredential.browser.js +0 -22
  898. package/dist-esm/src/credentials/azurePowerShellCredential.browser.js.map +0 -1
  899. package/dist-esm/src/credentials/azurePowerShellCredential.js +0 -229
  900. package/dist-esm/src/credentials/azurePowerShellCredential.js.map +0 -1
  901. package/dist-esm/src/credentials/azurePowerShellCredentialOptions.js.map +0 -1
  902. package/dist-esm/src/credentials/brokerAuthOptions.js.map +0 -1
  903. package/dist-esm/src/credentials/chainedTokenCredential.js +0 -90
  904. package/dist-esm/src/credentials/chainedTokenCredential.js.map +0 -1
  905. package/dist-esm/src/credentials/clientAssertionCredential.browser.js +0 -22
  906. package/dist-esm/src/credentials/clientAssertionCredential.browser.js.map +0 -1
  907. package/dist-esm/src/credentials/clientAssertionCredential.js +0 -55
  908. package/dist-esm/src/credentials/clientAssertionCredential.js.map +0 -1
  909. package/dist-esm/src/credentials/clientAssertionCredentialOptions.js.map +0 -1
  910. package/dist-esm/src/credentials/clientCertificateCredential.browser.js +0 -23
  911. package/dist-esm/src/credentials/clientCertificateCredential.browser.js.map +0 -1
  912. package/dist-esm/src/credentials/clientCertificateCredential.js +0 -119
  913. package/dist-esm/src/credentials/clientCertificateCredential.js.map +0 -1
  914. package/dist-esm/src/credentials/clientCertificateCredentialOptions.js.map +0 -1
  915. package/dist-esm/src/credentials/clientSecretCredential.browser.js +0 -83
  916. package/dist-esm/src/credentials/clientSecretCredential.browser.js.map +0 -1
  917. package/dist-esm/src/credentials/clientSecretCredential.js +0 -60
  918. package/dist-esm/src/credentials/clientSecretCredential.js.map +0 -1
  919. package/dist-esm/src/credentials/clientSecretCredentialOptions.js.map +0 -1
  920. package/dist-esm/src/credentials/credentialPersistenceOptions.js.map +0 -1
  921. package/dist-esm/src/credentials/defaultAzureCredential.browser.js +0 -29
  922. package/dist-esm/src/credentials/defaultAzureCredential.browser.js.map +0 -1
  923. package/dist-esm/src/credentials/defaultAzureCredential.js +0 -164
  924. package/dist-esm/src/credentials/defaultAzureCredential.js.map +0 -1
  925. package/dist-esm/src/credentials/defaultAzureCredentialOptions.js.map +0 -1
  926. package/dist-esm/src/credentials/deviceCodeCredential.browser.js +0 -23
  927. package/dist-esm/src/credentials/deviceCodeCredential.browser.js.map +0 -1
  928. package/dist-esm/src/credentials/deviceCodeCredential.js +0 -91
  929. package/dist-esm/src/credentials/deviceCodeCredential.js.map +0 -1
  930. package/dist-esm/src/credentials/deviceCodeCredentialOptions.js.map +0 -1
  931. package/dist-esm/src/credentials/environmentCredential.browser.js +0 -23
  932. package/dist-esm/src/credentials/environmentCredential.browser.js.map +0 -1
  933. package/dist-esm/src/credentials/environmentCredential.js +0 -130
  934. package/dist-esm/src/credentials/environmentCredential.js.map +0 -1
  935. package/dist-esm/src/credentials/environmentCredentialOptions.js.map +0 -1
  936. package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js +0 -86
  937. package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js.map +0 -1
  938. package/dist-esm/src/credentials/interactiveBrowserCredential.js +0 -91
  939. package/dist-esm/src/credentials/interactiveBrowserCredential.js.map +0 -1
  940. package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +0 -1
  941. package/dist-esm/src/credentials/interactiveCredentialOptions.js.map +0 -1
  942. package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js +0 -122
  943. package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
  944. package/dist-esm/src/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
  945. package/dist-esm/src/credentials/managedIdentityCredential/index.browser.js +0 -16
  946. package/dist-esm/src/credentials/managedIdentityCredential/index.browser.js.map +0 -1
  947. package/dist-esm/src/credentials/managedIdentityCredential/index.js +0 -217
  948. package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +0 -1
  949. package/dist-esm/src/credentials/managedIdentityCredential/models.js.map +0 -1
  950. package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -32
  951. package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
  952. package/dist-esm/src/credentials/multiTenantTokenCredentialOptions.js.map +0 -1
  953. package/dist-esm/src/credentials/onBehalfOfCredential.browser.js +0 -23
  954. package/dist-esm/src/credentials/onBehalfOfCredential.browser.js.map +0 -1
  955. package/dist-esm/src/credentials/onBehalfOfCredential.js +0 -112
  956. package/dist-esm/src/credentials/onBehalfOfCredential.js.map +0 -1
  957. package/dist-esm/src/credentials/onBehalfOfCredentialOptions.js.map +0 -1
  958. package/dist-esm/src/credentials/usernamePasswordCredential.browser.js +0 -77
  959. package/dist-esm/src/credentials/usernamePasswordCredential.browser.js.map +0 -1
  960. package/dist-esm/src/credentials/usernamePasswordCredential.js +0 -67
  961. package/dist-esm/src/credentials/usernamePasswordCredential.js.map +0 -1
  962. package/dist-esm/src/credentials/usernamePasswordCredentialOptions.js.map +0 -1
  963. package/dist-esm/src/credentials/visualStudioCodeCredential.browser.js +0 -27
  964. package/dist-esm/src/credentials/visualStudioCodeCredential.browser.js.map +0 -1
  965. package/dist-esm/src/credentials/visualStudioCodeCredential.js +0 -190
  966. package/dist-esm/src/credentials/visualStudioCodeCredential.js.map +0 -1
  967. package/dist-esm/src/credentials/visualStudioCodeCredentialOptions.js.map +0 -1
  968. package/dist-esm/src/credentials/workloadIdentityCredential.browser.js +0 -27
  969. package/dist-esm/src/credentials/workloadIdentityCredential.browser.js.map +0 -1
  970. package/dist-esm/src/credentials/workloadIdentityCredential.js +0 -114
  971. package/dist-esm/src/credentials/workloadIdentityCredential.js.map +0 -1
  972. package/dist-esm/src/credentials/workloadIdentityCredentialOptions.js.map +0 -1
  973. package/dist-esm/src/index.js +0 -34
  974. package/dist-esm/src/index.js.map +0 -1
  975. package/dist-esm/src/msal/browserFlows/flows.js.map +0 -1
  976. package/dist-esm/src/msal/browserFlows/msalAuthCode.js +0 -203
  977. package/dist-esm/src/msal/browserFlows/msalAuthCode.js.map +0 -1
  978. package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js +0 -116
  979. package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js.map +0 -1
  980. package/dist-esm/src/msal/credentials.js.map +0 -1
  981. package/dist-esm/src/msal/msal.browser.js +0 -5
  982. package/dist-esm/src/msal/msal.browser.js.map +0 -1
  983. package/dist-esm/src/msal/nodeFlows/msalClient.js +0 -484
  984. package/dist-esm/src/msal/nodeFlows/msalClient.js.map +0 -1
  985. package/dist-esm/src/msal/nodeFlows/msalPlugins.js +0 -87
  986. package/dist-esm/src/msal/nodeFlows/msalPlugins.js.map +0 -1
  987. package/dist-esm/src/msal/utils.js +0 -232
  988. package/dist-esm/src/msal/utils.js.map +0 -1
  989. package/dist-esm/src/plugins/consumer.browser.js +0 -7
  990. package/dist-esm/src/plugins/consumer.browser.js.map +0 -1
  991. package/dist-esm/src/plugins/consumer.js +0 -43
  992. package/dist-esm/src/plugins/consumer.js.map +0 -1
  993. package/dist-esm/src/plugins/provider.js.map +0 -1
  994. package/dist-esm/src/util/authHostEnv.browser.js +0 -7
  995. package/dist-esm/src/util/authHostEnv.browser.js.map +0 -1
  996. package/dist-esm/src/util/processMultiTenantRequest.browser.js +0 -29
  997. package/dist-esm/src/util/processMultiTenantRequest.browser.js.map +0 -1
  998. package/dist-esm/src/util/processMultiTenantRequest.js +0 -35
  999. package/dist-esm/src/util/processMultiTenantRequest.js.map +0 -1
  1000. package/dist-esm/src/util/scopeUtils.js +0 -29
  1001. package/dist-esm/src/util/scopeUtils.js.map +0 -1
  1002. package/dist-esm/src/util/subscriptionUtils.js +0 -14
  1003. package/dist-esm/src/util/subscriptionUtils.js.map +0 -1
  1004. package/dist-esm/src/util/tenantIdUtils.js +0 -44
  1005. package/dist-esm/src/util/tenantIdUtils.js.map +0 -1
  1006. package/dist-esm/src/util/tracing.js +0 -14
  1007. package/dist-esm/src/util/tracing.js.map +0 -1
  1008. /package/{dist-esm/src → dist/browser}/constants.js +0 -0
  1009. /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
  1010. /package/{dist-esm/src → dist/browser}/credentials/authorityValidationOptions.js +0 -0
  1011. /package/{dist-esm/src → dist/browser}/credentials/authorityValidationOptions.js.map +0 -0
  1012. /package/{dist-esm/src → dist/browser}/credentials/authorizationCodeCredentialOptions.js +0 -0
  1013. /package/{dist-esm/src → dist/browser}/credentials/azureApplicationCredentialOptions.js +0 -0
  1014. /package/{dist-esm/src → dist/browser}/credentials/azureCliCredentialOptions.js +0 -0
  1015. /package/{dist-esm/src → dist/browser}/credentials/azureDeveloperCliCredentialOptions.js +0 -0
  1016. /package/{dist-esm/src → dist/browser}/credentials/azurePipelinesCredentialOptions.js +0 -0
  1017. /package/{dist-esm/src → dist/browser}/credentials/azurePowerShellCredentialOptions.js +0 -0
  1018. /package/{dist-esm/src → dist/browser}/credentials/brokerAuthOptions.js +0 -0
  1019. /package/{dist-esm/src → dist/browser}/credentials/browserCustomizationOptions.js +0 -0
  1020. /package/{dist-esm/src → dist/browser}/credentials/browserCustomizationOptions.js.map +0 -0
  1021. /package/{dist-esm/src → dist/browser}/credentials/clientAssertionCredentialOptions.js +0 -0
  1022. /package/{dist-esm/src → dist/browser}/credentials/clientCertificateCredentialOptions.js +0 -0
  1023. /package/{dist-esm/src → dist/browser}/credentials/clientSecretCredentialOptions.js +0 -0
  1024. /package/{dist-esm/src → dist/browser}/credentials/credentialPersistenceOptions.js +0 -0
  1025. /package/{dist-esm/src → dist/browser}/credentials/defaultAzureCredentialOptions.js +0 -0
  1026. /package/{dist-esm/src → dist/browser}/credentials/deviceCodeCredentialOptions.js +0 -0
  1027. /package/{dist-esm/src → dist/browser}/credentials/environmentCredentialOptions.js +0 -0
  1028. /package/{dist-esm/src → dist/browser}/credentials/interactiveBrowserCredentialOptions.js +0 -0
  1029. /package/{dist-esm/src → dist/browser}/credentials/interactiveCredentialOptions.js +0 -0
  1030. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -0
  1031. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/models.js +0 -0
  1032. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/utils.js +0 -0
  1033. /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/utils.js.map +0 -0
  1034. /package/{dist-esm/src → dist/browser}/credentials/multiTenantTokenCredentialOptions.js +0 -0
  1035. /package/{dist-esm/src → dist/browser}/credentials/onBehalfOfCredentialOptions.js +0 -0
  1036. /package/{dist-esm/src → dist/browser}/credentials/usernamePasswordCredentialOptions.js +0 -0
  1037. /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialOptions.js +0 -0
  1038. /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialPlugin.js +0 -0
  1039. /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialPlugin.js.map +0 -0
  1040. /package/{dist-esm/src → dist/browser}/credentials/workloadIdentityCredentialOptions.js +0 -0
  1041. /package/{dist-esm/src → dist/browser}/errors.js +0 -0
  1042. /package/{dist-esm/src → dist/browser}/errors.js.map +0 -0
  1043. /package/{dist-esm/src → dist/browser}/msal/browserFlows/flows.js +0 -0
  1044. /package/{dist-esm/src → dist/browser}/msal/credentials.js +0 -0
  1045. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/brokerOptions.js +0 -0
  1046. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/brokerOptions.js.map +0 -0
  1047. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/tokenCachePersistenceOptions.js +0 -0
  1048. /package/{dist-esm/src → dist/browser}/msal/nodeFlows/tokenCachePersistenceOptions.js.map +0 -0
  1049. /package/{dist-esm/src → dist/browser}/msal/types.js +0 -0
  1050. /package/{dist-esm/src → dist/browser}/msal/types.js.map +0 -0
  1051. /package/{dist-esm/src → dist/browser}/plugins/provider.js +0 -0
  1052. /package/{dist-esm/src → dist/browser}/regionalAuthority.js +0 -0
  1053. /package/{dist-esm/src → dist/browser}/regionalAuthority.js.map +0 -0
  1054. /package/{dist-esm/src → dist/browser}/tokenCredentialOptions.js +0 -0
  1055. /package/{dist-esm/src → dist/browser}/tokenCredentialOptions.js.map +0 -0
  1056. /package/{dist-esm/src → dist/browser}/tokenProvider.js +0 -0
  1057. /package/{dist-esm/src → dist/browser}/tokenProvider.js.map +0 -0
  1058. /package/{dist-esm/src → dist/browser}/util/identityTokenEndpoint.js +0 -0
  1059. /package/{dist-esm/src → dist/browser}/util/identityTokenEndpoint.js.map +0 -0
  1060. /package/{dist-esm/src → dist/browser}/util/logging.js +0 -0
  1061. /package/{dist-esm/src → dist/browser}/util/logging.js.map +0 -0
  1062. /package/{dist-esm/src → dist/browser}/util/processUtils.js +0 -0
  1063. /package/{dist-esm/src → dist/browser}/util/processUtils.js.map +0 -0
  1064. /package/{dist-esm/src → dist/esm}/msal/msal.js +0 -0
  1065. /package/{dist-esm/src → dist/esm}/msal/msal.js.map +0 -0
  1066. /package/{types → dist}/identity.d.ts +0 -0
@@ -1,27 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { credentialLogger, formatError } from "../util/logging";
4
- const BrowserNotSupportedError = new Error("WorkloadIdentityCredential is not supported in the browser.");
5
- const logger = credentialLogger("WorkloadIdentityCredential");
6
- /**
7
- * WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Kubernetes.
8
- * Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">Microsoft Entra Workload ID</a>
9
- * for more information.
10
- */
11
- export class WorkloadIdentityCredential {
12
- /**
13
- * Only available in Node.js
14
- */
15
- constructor() {
16
- logger.info(formatError("", BrowserNotSupportedError));
17
- throw BrowserNotSupportedError;
18
- }
19
- /**
20
- * Only available in Node.js
21
- */
22
- getToken() {
23
- logger.getToken.info(formatError("", BrowserNotSupportedError));
24
- throw BrowserNotSupportedError;
25
- }
26
- }
27
- //# sourceMappingURL=workloadIdentityCredential.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workloadIdentityCredential.browser.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,wBAAwB,GAAG,IAAI,KAAK,CACxC,6DAA6D,CAC9D,CAAC;AACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACvD,MAAM,wBAAwB,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;QAChE,MAAM,wBAAwB,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError } from \"../util/logging\";\n\nconst BrowserNotSupportedError = new Error(\n \"WorkloadIdentityCredential is not supported in the browser.\",\n);\nconst logger = credentialLogger(\"WorkloadIdentityCredential\");\n\n/**\n * WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Kubernetes.\n * Refer to <a href=\"https://learn.microsoft.com/azure/aks/workload-identity-overview\">Microsoft Entra Workload ID</a>\n * for more information.\n */\nexport class WorkloadIdentityCredential implements TokenCredential {\n /**\n * Only available in Node.js\n */\n constructor() {\n logger.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n\n /**\n * Only available in Node.js\n */\n public getToken(): Promise<AccessToken | null> {\n logger.getToken.info(formatError(\"\", BrowserNotSupportedError));\n throw BrowserNotSupportedError;\n }\n}\n"]}
@@ -1,114 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { credentialLogger, processEnvVars } from "../util/logging";
4
- import { ClientAssertionCredential } from "./clientAssertionCredential";
5
- import { CredentialUnavailableError } from "../errors";
6
- import { checkTenantId } from "../util/tenantIdUtils";
7
- import { readFile } from "fs/promises";
8
- const credentialName = "WorkloadIdentityCredential";
9
- /**
10
- * Contains the list of all supported environment variable names so that an
11
- * appropriate error message can be generated when no credentials can be
12
- * configured.
13
- *
14
- * @internal
15
- */
16
- export const SupportedWorkloadEnvironmentVariables = [
17
- "AZURE_TENANT_ID",
18
- "AZURE_CLIENT_ID",
19
- "AZURE_FEDERATED_TOKEN_FILE",
20
- ];
21
- const logger = credentialLogger(credentialName);
22
- /**
23
- * Workload Identity authentication is a feature in Azure that allows applications running on virtual machines (VMs)
24
- * to access other Azure resources without the need for a service principal or managed identity. With Workload Identity
25
- * authentication, applications authenticate themselves using their own identity, rather than using a shared service
26
- * principal or managed identity. Under the hood, Workload Identity authentication uses the concept of Service Account
27
- * Credentials (SACs), which are automatically created by Azure and stored securely in the VM. By using Workload
28
- * Identity authentication, you can avoid the need to manage and rotate service principals or managed identities for
29
- * each application on each VM. Additionally, because SACs are created automatically and managed by Azure, you don't
30
- * need to worry about storing and securing sensitive credentials themselves.
31
- * The WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Azure Kubernetes and acquires
32
- * a token using the SACs available in the Azure Kubernetes environment.
33
- * Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">Microsoft Entra
34
- * Workload ID</a> for more information.
35
- */
36
- export class WorkloadIdentityCredential {
37
- /**
38
- * WorkloadIdentityCredential supports Microsoft Entra Workload ID on Kubernetes.
39
- *
40
- * @param options - The identity client options to use for authentication.
41
- */
42
- constructor(options) {
43
- this.azureFederatedTokenFileContent = undefined;
44
- this.cacheDate = undefined;
45
- // Logging environment variables for error details
46
- const assignedEnv = processEnvVars(SupportedWorkloadEnvironmentVariables).assigned.join(", ");
47
- logger.info(`Found the following environment variables: ${assignedEnv}`);
48
- const workloadIdentityCredentialOptions = options !== null && options !== void 0 ? options : {};
49
- const tenantId = workloadIdentityCredentialOptions.tenantId || process.env.AZURE_TENANT_ID;
50
- const clientId = workloadIdentityCredentialOptions.clientId || process.env.AZURE_CLIENT_ID;
51
- this.federatedTokenFilePath =
52
- workloadIdentityCredentialOptions.tokenFilePath || process.env.AZURE_FEDERATED_TOKEN_FILE;
53
- if (tenantId) {
54
- checkTenantId(logger, tenantId);
55
- }
56
- if (!clientId) {
57
- throw new CredentialUnavailableError(`${credentialName}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_CLIENT_ID".
58
- See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);
59
- }
60
- if (!tenantId) {
61
- throw new CredentialUnavailableError(`${credentialName}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_TENANT_ID".
62
- See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);
63
- }
64
- if (!this.federatedTokenFilePath) {
65
- throw new CredentialUnavailableError(`${credentialName}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_FEDERATED_TOKEN_FILE".
66
- See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);
67
- }
68
- logger.info(`Invoking ClientAssertionCredential with tenant ID: ${tenantId}, clientId: ${workloadIdentityCredentialOptions.clientId} and federated token path: [REDACTED]`);
69
- this.client = new ClientAssertionCredential(tenantId, clientId, this.readFileContents.bind(this), options);
70
- }
71
- /**
72
- * Authenticates with Microsoft Entra ID and returns an access token if successful.
73
- * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
74
- *
75
- * @param scopes - The list of scopes for which the token will have access.
76
- * @param options - The options used to configure any requests this
77
- * TokenCredential implementation might make.
78
- */
79
- async getToken(scopes, options) {
80
- if (!this.client) {
81
- const errorMessage = `${credentialName}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters.
82
- In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables -
83
- "AZURE_TENANT_ID",
84
- "AZURE_CLIENT_ID",
85
- "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;
86
- logger.info(errorMessage);
87
- throw new CredentialUnavailableError(errorMessage);
88
- }
89
- logger.info("Invoking getToken() of Client Assertion Credential");
90
- return this.client.getToken(scopes, options);
91
- }
92
- async readFileContents() {
93
- // Cached assertions expire after 5 minutes
94
- if (this.cacheDate !== undefined && Date.now() - this.cacheDate >= 1000 * 60 * 5) {
95
- this.azureFederatedTokenFileContent = undefined;
96
- }
97
- if (!this.federatedTokenFilePath) {
98
- throw new CredentialUnavailableError(`${credentialName}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`);
99
- }
100
- if (!this.azureFederatedTokenFileContent) {
101
- const file = await readFile(this.federatedTokenFilePath, "utf8");
102
- const value = file.trim();
103
- if (!value) {
104
- throw new CredentialUnavailableError(`${credentialName}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`);
105
- }
106
- else {
107
- this.azureFederatedTokenFileContent = value;
108
- this.cacheDate = Date.now();
109
- }
110
- }
111
- return this.azureFederatedTokenFileContent;
112
- }
113
- }
114
- //# sourceMappingURL=workloadIdentityCredential.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workloadIdentityCredential.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, processEnvVars } from \"../util/logging\";\n\nimport { ClientAssertionCredential } from \"./clientAssertionCredential\";\nimport { CredentialUnavailableError } from \"../errors\";\nimport type { WorkloadIdentityCredentialOptions } from \"./workloadIdentityCredentialOptions\";\nimport { checkTenantId } from \"../util/tenantIdUtils\";\nimport { readFile } from \"fs/promises\";\n\nconst credentialName = \"WorkloadIdentityCredential\";\n/**\n * Contains the list of all supported environment variable names so that an\n * appropriate error message can be generated when no credentials can be\n * configured.\n *\n * @internal\n */\nexport const SupportedWorkloadEnvironmentVariables = [\n \"AZURE_TENANT_ID\",\n \"AZURE_CLIENT_ID\",\n \"AZURE_FEDERATED_TOKEN_FILE\",\n];\nconst logger = credentialLogger(credentialName);\n/**\n * Workload Identity authentication is a feature in Azure that allows applications running on virtual machines (VMs)\n * to access other Azure resources without the need for a service principal or managed identity. With Workload Identity\n * authentication, applications authenticate themselves using their own identity, rather than using a shared service\n * principal or managed identity. Under the hood, Workload Identity authentication uses the concept of Service Account\n * Credentials (SACs), which are automatically created by Azure and stored securely in the VM. By using Workload\n * Identity authentication, you can avoid the need to manage and rotate service principals or managed identities for\n * each application on each VM. Additionally, because SACs are created automatically and managed by Azure, you don't\n * need to worry about storing and securing sensitive credentials themselves.\n * The WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Azure Kubernetes and acquires\n * a token using the SACs available in the Azure Kubernetes environment.\n * Refer to <a href=\"https://learn.microsoft.com/azure/aks/workload-identity-overview\">Microsoft Entra\n * Workload ID</a> for more information.\n */\nexport class WorkloadIdentityCredential implements TokenCredential {\n private client: ClientAssertionCredential | undefined;\n private azureFederatedTokenFileContent: string | undefined = undefined;\n private cacheDate: number | undefined = undefined;\n private federatedTokenFilePath: string | undefined;\n\n /**\n * WorkloadIdentityCredential supports Microsoft Entra Workload ID on Kubernetes.\n *\n * @param options - The identity client options to use for authentication.\n */\n constructor(options?: WorkloadIdentityCredentialOptions) {\n // Logging environment variables for error details\n const assignedEnv = processEnvVars(SupportedWorkloadEnvironmentVariables).assigned.join(\", \");\n logger.info(`Found the following environment variables: ${assignedEnv}`);\n\n const workloadIdentityCredentialOptions = options ?? {};\n const tenantId = workloadIdentityCredentialOptions.tenantId || process.env.AZURE_TENANT_ID;\n const clientId = workloadIdentityCredentialOptions.clientId || process.env.AZURE_CLIENT_ID;\n this.federatedTokenFilePath =\n workloadIdentityCredentialOptions.tokenFilePath || process.env.AZURE_FEDERATED_TOKEN_FILE;\n if (tenantId) {\n checkTenantId(logger, tenantId);\n }\n if (!clientId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - \"AZURE_CLIENT_ID\".\n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`,\n );\n }\n\n if (!tenantId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - \"AZURE_TENANT_ID\".\n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`,\n );\n }\n\n if (!this.federatedTokenFilePath) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - \"AZURE_FEDERATED_TOKEN_FILE\".\n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`,\n );\n }\n\n logger.info(\n `Invoking ClientAssertionCredential with tenant ID: ${tenantId}, clientId: ${workloadIdentityCredentialOptions.clientId} and federated token path: [REDACTED]`,\n );\n this.client = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.readFileContents.bind(this),\n options,\n );\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n if (!this.client) {\n const errorMessage = `${credentialName}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. \n In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables - \n \"AZURE_TENANT_ID\",\n \"AZURE_CLIENT_ID\",\n \"AZURE_FEDERATED_TOKEN_FILE\". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;\n logger.info(errorMessage);\n throw new CredentialUnavailableError(errorMessage);\n }\n logger.info(\"Invoking getToken() of Client Assertion Credential\");\n return this.client.getToken(scopes, options);\n }\n\n private async readFileContents(): Promise<string> {\n // Cached assertions expire after 5 minutes\n if (this.cacheDate !== undefined && Date.now() - this.cacheDate >= 1000 * 60 * 5) {\n this.azureFederatedTokenFileContent = undefined;\n }\n if (!this.federatedTokenFilePath) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`,\n );\n }\n if (!this.azureFederatedTokenFileContent) {\n const file = await readFile(this.federatedTokenFilePath, \"utf8\");\n const value = file.trim();\n if (!value) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`,\n );\n } else {\n this.azureFederatedTokenFileContent = value;\n this.cacheDate = Date.now();\n }\n }\n return this.azureFederatedTokenFileContent;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"workloadIdentityCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions\";\n\n/**\n * Options for the {@link WorkloadIdentityCredential}\n */\nexport interface WorkloadIdentityCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {\n /**\n * ID of the application's Microsoft Entra tenant. Also called its directory ID.\n */\n tenantId?: string;\n /**\n * The client ID of a Microsoft Entra app registration.\n */\n clientId?: string;\n /**\n * The path to a file containing a Kubernetes service account token that authenticates the identity.\n */\n tokenFilePath?: string;\n}\n"]}
@@ -1,34 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export * from "./plugins/consumer";
4
- import { DefaultAzureCredential } from "./credentials/defaultAzureCredential";
5
- export { AuthenticationError, AggregateAuthenticationError, AuthenticationErrorName, AggregateAuthenticationErrorName, CredentialUnavailableError, CredentialUnavailableErrorName, AuthenticationRequiredError, } from "./errors";
6
- export { serializeAuthenticationRecord, deserializeAuthenticationRecord } from "./msal/utils";
7
- export { ChainedTokenCredential } from "./credentials/chainedTokenCredential";
8
- export { ClientSecretCredential } from "./credentials/clientSecretCredential";
9
- export { DefaultAzureCredential } from "./credentials/defaultAzureCredential";
10
- export { EnvironmentCredential } from "./credentials/environmentCredential";
11
- export { ClientCertificateCredential, } from "./credentials/clientCertificateCredential";
12
- export { ClientAssertionCredential } from "./credentials/clientAssertionCredential";
13
- export { AzureCliCredential } from "./credentials/azureCliCredential";
14
- export { AzureDeveloperCliCredential } from "./credentials/azureDeveloperCliCredential";
15
- export { InteractiveBrowserCredential } from "./credentials/interactiveBrowserCredential";
16
- export { ManagedIdentityCredential, } from "./credentials/managedIdentityCredential";
17
- export { DeviceCodeCredential } from "./credentials/deviceCodeCredential";
18
- export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential";
19
- export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential";
20
- export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential";
21
- export { UsernamePasswordCredential } from "./credentials/usernamePasswordCredential";
22
- export { VisualStudioCodeCredential } from "./credentials/visualStudioCodeCredential";
23
- export { OnBehalfOfCredential } from "./credentials/onBehalfOfCredential";
24
- export { WorkloadIdentityCredential } from "./credentials/workloadIdentityCredential";
25
- export { logger } from "./util/logging";
26
- export { AzureAuthorityHosts } from "./constants";
27
- /**
28
- * Returns a new instance of the {@link DefaultAzureCredential}.
29
- */
30
- export function getDefaultAzureCredential() {
31
- return new DefaultAzureCredential();
32
- }
33
- export { getBearerTokenProvider } from "./tokenProvider";
34
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC;AAKnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,GAE5B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AAe9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAO9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,OAAO,EACL,2BAA2B,GAI5B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAGpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAM1F,OAAO,EACL,yBAAyB,GAI1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAM1E,OAAO,EAAE,wBAAwB,IAAI,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAQpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAMtF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,IAAI,sBAAsB,EAAE,CAAC;AACtC,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAiC,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./plugins/consumer\";\n\nexport { IdentityPlugin } from \"./plugins/provider\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"./credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n AuthenticationRequiredErrorOptions,\n} from \"./errors\";\n\nexport { AuthenticationRecord } from \"./msal/types\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils\";\nexport { TokenCredentialOptions } from \"./tokenCredentialOptions\";\nexport { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions\";\nexport { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport { BrokerAuthOptions } from \"./credentials/brokerAuthOptions\";\nexport {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions\";\nexport { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential\";\n\nexport { ClientSecretCredential } from \"./credentials/clientSecretCredential\";\nexport { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions\";\n\nexport { DefaultAzureCredential } from \"./credentials/defaultAzureCredential\";\nexport {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n} from \"./credentials/defaultAzureCredentialOptions\";\n\nexport { EnvironmentCredential } from \"./credentials/environmentCredential\";\nexport { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions\";\n\nexport {\n ClientCertificateCredential,\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredential\";\nexport { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions\";\nexport { ClientAssertionCredential } from \"./credentials/clientAssertionCredential\";\nexport { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions\";\nexport { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions\";\nexport { AzureCliCredential } from \"./credentials/azureCliCredential\";\nexport { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions\";\nexport { AzureDeveloperCliCredential } from \"./credentials/azureDeveloperCliCredential\";\nexport { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions\";\nexport { InteractiveBrowserCredential } from \"./credentials/interactiveBrowserCredential\";\nexport {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions\";\nexport {\n ManagedIdentityCredential,\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential\";\nexport { DeviceCodeCredential } from \"./credentials/deviceCodeCredential\";\nexport {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions\";\nexport { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"./credentials/azurePipelinesCredential\";\nexport { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions\";\nexport { AuthorizationCodeCredential } from \"./credentials/authorizationCodeCredential\";\nexport { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions\";\nexport { AzurePowerShellCredential } from \"./credentials/azurePowerShellCredential\";\nexport { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions\";\nexport {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions\";\nexport { UsernamePasswordCredential } from \"./credentials/usernamePasswordCredential\";\nexport { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions\";\nexport { VisualStudioCodeCredential } from \"./credentials/visualStudioCodeCredential\";\nexport { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions\";\nexport { OnBehalfOfCredential } from \"./credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"./credentials/workloadIdentityCredential\";\nexport { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions\";\nexport { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions\";\nexport { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions\";\n\nexport { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging\";\n\nexport { AzureAuthorityHosts } from \"./constants\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, GetBearerTokenProviderOptions } from \"./tokenProvider\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"flows.js","sourceRoot":"","sources":["../../../../src/msal/browserFlows/flows.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken } from \"@azure/core-auth\";\nimport type { AuthenticationRecord } from \"../types\";\nimport type { CredentialFlowGetTokenOptions } from \"../credentials\";\nimport type { CredentialLogger } from \"../../util/logging\";\n\n/**\n * Union of the constructor parameters that all MSAL flow types take.\n * @internal\n */\nexport interface MsalFlowOptions {\n logger: CredentialLogger;\n clientId?: string;\n tenantId?: string;\n authorityHost?: string;\n authenticationRecord?: AuthenticationRecord;\n disableAutomaticAuthentication?: boolean;\n disableInstanceDiscovery?: boolean;\n getAssertion?: () => Promise<string>;\n enableMsaPassthrough?: boolean;\n}\n\n/**\n * The common methods we use to work with the MSAL flows.\n * @internal\n */\nexport interface MsalFlow {\n /**\n * Allows for any setup before any request is processed.\n */\n init(options?: CredentialFlowGetTokenOptions): Promise<void>;\n /**\n * Tries to load the active account, either from memory or from MSAL.\n */\n getActiveAccount(): Promise<AuthenticationRecord | undefined>;\n /**\n * Tries to retrieve the token silently using MSAL.\n */\n getTokenSilent(scopes?: string[], options?: CredentialFlowGetTokenOptions): Promise<AccessToken>;\n /**\n * Calls to the implementation's doGetToken method.\n */\n getToken(scopes?: string[], options?: CredentialFlowGetTokenOptions): Promise<AccessToken>;\n}\n"]}
@@ -1,203 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import * as msalBrowser from "@azure/msal-browser";
4
- import { MsalBrowser } from "./msalBrowserCommon";
5
- import { defaultLoggerCallback, getMSALLogLevel, handleMsalError, msalToPublic, publicToMsal, } from "../utils";
6
- import { AuthenticationRequiredError } from "../../errors";
7
- import { getLogLevel } from "@azure/logger";
8
- // We keep a copy of the redirect hash.
9
- const redirectHash = self.location.hash;
10
- /**
11
- * Uses MSAL Browser 2.X for browser authentication,
12
- * which uses the [Auth Code Flow](https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow).
13
- * @internal
14
- */
15
- export class MSALAuthCode extends MsalBrowser {
16
- /**
17
- * Sets up an MSAL object based on the given parameters.
18
- * MSAL with Auth Code allows sending a previously obtained `authenticationRecord` through the optional parameters,
19
- * which is set to be the active account.
20
- * @param options - Parameters necessary and otherwise used to create the MSAL object.
21
- */
22
- constructor(options) {
23
- var _a;
24
- super(options);
25
- this.loginHint = options.loginHint;
26
- this.msalConfig.cache = {
27
- cacheLocation: "sessionStorage",
28
- storeAuthStateInCookie: true, // Set to true to improve the experience on IE11 and Edge.
29
- };
30
- this.msalConfig.system = {
31
- loggerOptions: {
32
- loggerCallback: defaultLoggerCallback(this.logger, "Browser"),
33
- logLevel: getMSALLogLevel(getLogLevel()),
34
- piiLoggingEnabled: (_a = options.loggingOptions) === null || _a === void 0 ? void 0 : _a.enableUnsafeSupportLogging,
35
- },
36
- };
37
- if (options.authenticationRecord) {
38
- this.account = Object.assign(Object.assign({}, options.authenticationRecord), { tenantId: this.tenantId });
39
- }
40
- }
41
- async getApp() {
42
- if (!this.app) {
43
- // Prepare the MSAL application
44
- this.app = await msalBrowser.PublicClientApplication.createPublicClientApplication(this.msalConfig);
45
- // setting the account right after the app is created.
46
- if (this.account) {
47
- this.app.setActiveAccount(publicToMsal(this.account));
48
- }
49
- }
50
- return this.app;
51
- }
52
- /**
53
- * Loads the account based on the result of the authentication.
54
- * If no result was received, tries to load the account from the cache.
55
- * @param result - Result object received from MSAL.
56
- */
57
- async handleBrowserResult(result) {
58
- try {
59
- const app = await this.getApp();
60
- if (result && result.account) {
61
- this.logger.info(`MSAL Browser V2 authentication successful.`);
62
- app.setActiveAccount(result.account);
63
- return msalToPublic(this.clientId, result.account);
64
- }
65
- // If by this point we happen to have an active account, we should stop trying to parse this.
66
- const activeAccount = await this.app.getActiveAccount();
67
- if (activeAccount) {
68
- return msalToPublic(this.clientId, activeAccount);
69
- }
70
- // If we don't have an active account, we try to activate it from all the already loaded accounts.
71
- const accounts = app.getAllAccounts();
72
- if (accounts.length > 1) {
73
- // If there's more than one account in memory, we force the user to authenticate again.
74
- // At this point we can't identify which account should this credential work with,
75
- // since at this point the user won't have provided enough information.
76
- // We log a message in case that helps.
77
- this.logger.info(`More than one account was found authenticated for this Client ID and Tenant ID.
78
- However, no "authenticationRecord" has been provided for this credential,
79
- therefore we're unable to pick between these accounts.
80
- A new login attempt will be requested, to ensure the correct account is picked.
81
- To work with multiple accounts for the same Client ID and Tenant ID, please provide an "authenticationRecord" when initializing "InteractiveBrowserCredential".`);
82
- // To safely trigger a new login, we're also ensuring the local cache is cleared up for this MSAL object.
83
- // However, we want to avoid kicking the user out of their authentication on the Azure side.
84
- // We do this by calling to logout while specifying a `onRedirectNavigate` that returns false.
85
- await app.logout({
86
- onRedirectNavigate: () => false,
87
- });
88
- return;
89
- }
90
- // If there's only one account for this MSAL object, we can safely activate it.
91
- if (accounts.length === 1) {
92
- const account = accounts[0];
93
- app.setActiveAccount(account);
94
- return msalToPublic(this.clientId, account);
95
- }
96
- this.logger.info(`No accounts were found through MSAL.`);
97
- }
98
- catch (e) {
99
- this.logger.info(`Failed to acquire token through MSAL. ${e.message}`);
100
- }
101
- return;
102
- }
103
- /**
104
- * Uses MSAL to handle the redirect.
105
- */
106
- async handleRedirect() {
107
- const app = await this.getApp();
108
- return this.handleBrowserResult((await app.handleRedirectPromise(redirectHash)) || undefined);
109
- }
110
- /**
111
- * Uses MSAL to trigger a redirect or a popup login.
112
- */
113
- async login(scopes = []) {
114
- const arrayScopes = Array.isArray(scopes) ? scopes : [scopes];
115
- const loginRequest = {
116
- scopes: arrayScopes,
117
- loginHint: this.loginHint,
118
- };
119
- const app = await this.getApp();
120
- switch (this.loginStyle) {
121
- case "redirect": {
122
- await app.loginRedirect(loginRequest);
123
- return;
124
- }
125
- case "popup":
126
- return this.handleBrowserResult(await app.loginPopup(loginRequest));
127
- }
128
- }
129
- /**
130
- * Uses MSAL to retrieve the active account.
131
- */
132
- async getActiveAccount() {
133
- const app = await this.getApp();
134
- const account = app.getActiveAccount();
135
- if (!account) {
136
- return;
137
- }
138
- return msalToPublic(this.clientId, account);
139
- }
140
- /**
141
- * Attempts to retrieve a token from cache.
142
- */
143
- async getTokenSilent(scopes, options) {
144
- const account = await this.getActiveAccount();
145
- if (!account) {
146
- throw new AuthenticationRequiredError({
147
- scopes,
148
- getTokenOptions: options,
149
- message: "Silent authentication failed. We couldn't retrieve an active account from the cache.",
150
- });
151
- }
152
- const parameters = {
153
- authority: (options === null || options === void 0 ? void 0 : options.authority) || this.msalConfig.auth.authority,
154
- correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
155
- claims: options === null || options === void 0 ? void 0 : options.claims,
156
- account: publicToMsal(account),
157
- forceRefresh: false,
158
- scopes,
159
- };
160
- try {
161
- this.logger.info("Attempting to acquire token silently");
162
- const app = await this.getApp();
163
- const response = await app.acquireTokenSilent(parameters);
164
- return this.handleResult(scopes, response);
165
- }
166
- catch (err) {
167
- throw handleMsalError(scopes, err, options);
168
- }
169
- }
170
- /**
171
- * Attempts to retrieve the token in the browser.
172
- */
173
- async doGetToken(scopes, options) {
174
- const account = await this.getActiveAccount();
175
- if (!account) {
176
- throw new AuthenticationRequiredError({
177
- scopes,
178
- getTokenOptions: options,
179
- message: "Silent authentication failed. We couldn't retrieve an active account from the cache.",
180
- });
181
- }
182
- const parameters = {
183
- authority: (options === null || options === void 0 ? void 0 : options.authority) || this.msalConfig.auth.authority,
184
- correlationId: options === null || options === void 0 ? void 0 : options.correlationId,
185
- claims: options === null || options === void 0 ? void 0 : options.claims,
186
- account: publicToMsal(account),
187
- loginHint: this.loginHint,
188
- scopes,
189
- };
190
- const app = await this.getApp();
191
- switch (this.loginStyle) {
192
- case "redirect":
193
- // This will go out of the page.
194
- // Once the InteractiveBrowserCredential is initialized again,
195
- // we'll load the MSAL account in the constructor.
196
- await app.acquireTokenRedirect(parameters);
197
- return { token: "", expiresOnTimestamp: 0, tokenType: "Bearer" };
198
- case "popup":
199
- return this.handleResult(scopes, await app.acquireTokenPopup(parameters));
200
- }
201
- }
202
- }
203
- //# sourceMappingURL=msalAuthCode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"msalAuthCode.js","sourceRoot":"","sources":["../../../../src/msal/browserFlows/msalAuthCode.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as msalBrowser from \"@azure/msal-browser\";\n\nimport type { MsalBrowserFlowOptions } from \"./msalBrowserCommon\";\nimport { MsalBrowser } from \"./msalBrowserCommon\";\nimport {\n defaultLoggerCallback,\n getMSALLogLevel,\n handleMsalError,\n msalToPublic,\n publicToMsal,\n} from \"../utils\";\n\nimport type { AccessToken } from \"@azure/core-auth\";\nimport type { AuthenticationRecord } from \"../types\";\nimport { AuthenticationRequiredError } from \"../../errors\";\nimport type { CredentialFlowGetTokenOptions } from \"../credentials\";\nimport { getLogLevel } from \"@azure/logger\";\n\n// We keep a copy of the redirect hash.\nconst redirectHash = self.location.hash;\n\n/**\n * Uses MSAL Browser 2.X for browser authentication,\n * which uses the [Auth Code Flow](https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow).\n * @internal\n */\nexport class MSALAuthCode extends MsalBrowser {\n protected app?: msalBrowser.IPublicClientApplication;\n private loginHint?: string;\n\n /**\n * Sets up an MSAL object based on the given parameters.\n * MSAL with Auth Code allows sending a previously obtained `authenticationRecord` through the optional parameters,\n * which is set to be the active account.\n * @param options - Parameters necessary and otherwise used to create the MSAL object.\n */\n constructor(options: MsalBrowserFlowOptions) {\n super(options);\n this.loginHint = options.loginHint;\n\n this.msalConfig.cache = {\n cacheLocation: \"sessionStorage\",\n storeAuthStateInCookie: true, // Set to true to improve the experience on IE11 and Edge.\n };\n this.msalConfig.system = {\n loggerOptions: {\n loggerCallback: defaultLoggerCallback(this.logger, \"Browser\"),\n logLevel: getMSALLogLevel(getLogLevel()),\n piiLoggingEnabled: options.loggingOptions?.enableUnsafeSupportLogging,\n },\n };\n if (options.authenticationRecord) {\n this.account = {\n ...options.authenticationRecord,\n tenantId: this.tenantId,\n };\n }\n }\n\n private async getApp(): Promise<msalBrowser.IPublicClientApplication> {\n if (!this.app) {\n // Prepare the MSAL application\n this.app = await msalBrowser.PublicClientApplication.createPublicClientApplication(\n this.msalConfig as msalBrowser.Configuration,\n );\n\n // setting the account right after the app is created.\n if (this.account) {\n this.app.setActiveAccount(publicToMsal(this.account));\n }\n }\n\n return this.app;\n }\n\n /**\n * Loads the account based on the result of the authentication.\n * If no result was received, tries to load the account from the cache.\n * @param result - Result object received from MSAL.\n */\n private async handleBrowserResult(\n result?: msalBrowser.AuthenticationResult,\n ): Promise<AuthenticationRecord | undefined> {\n try {\n const app = await this.getApp();\n if (result && result.account) {\n this.logger.info(`MSAL Browser V2 authentication successful.`);\n app.setActiveAccount(result.account);\n return msalToPublic(this.clientId, result.account);\n }\n\n // If by this point we happen to have an active account, we should stop trying to parse this.\n const activeAccount = await this.app!.getActiveAccount();\n if (activeAccount) {\n return msalToPublic(this.clientId, activeAccount);\n }\n\n // If we don't have an active account, we try to activate it from all the already loaded accounts.\n const accounts = app.getAllAccounts();\n if (accounts.length > 1) {\n // If there's more than one account in memory, we force the user to authenticate again.\n // At this point we can't identify which account should this credential work with,\n // since at this point the user won't have provided enough information.\n // We log a message in case that helps.\n this.logger.info(\n `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 \"InteractiveBrowserCredential\".`,\n );\n // To safely trigger a new login, we're also ensuring the local cache is cleared up for this MSAL object.\n // However, we want to avoid kicking the user out of their authentication on the Azure side.\n // We do this by calling to logout while specifying a `onRedirectNavigate` that returns false.\n await app.logout({\n onRedirectNavigate: () => false,\n });\n return;\n }\n\n // If there's only one account for this MSAL object, we can safely activate it.\n if (accounts.length === 1) {\n const account = accounts[0];\n app.setActiveAccount(account);\n return msalToPublic(this.clientId, account);\n }\n\n this.logger.info(`No accounts were found through MSAL.`);\n } catch (e: any) {\n this.logger.info(`Failed to acquire token through MSAL. ${e.message}`);\n }\n return;\n }\n\n /**\n * Uses MSAL to handle the redirect.\n */\n public async handleRedirect(): Promise<AuthenticationRecord | undefined> {\n const app = await this.getApp();\n return this.handleBrowserResult((await app.handleRedirectPromise(redirectHash)) || undefined);\n }\n\n /**\n * Uses MSAL to trigger a redirect or a popup login.\n */\n public async login(scopes: string | string[] = []): Promise<AuthenticationRecord | undefined> {\n const arrayScopes = Array.isArray(scopes) ? scopes : [scopes];\n const loginRequest: msalBrowser.RedirectRequest = {\n scopes: arrayScopes,\n loginHint: this.loginHint,\n };\n const app = await this.getApp();\n switch (this.loginStyle) {\n case \"redirect\": {\n await app.loginRedirect(loginRequest);\n return;\n }\n case \"popup\":\n return this.handleBrowserResult(await app.loginPopup(loginRequest));\n }\n }\n\n /**\n * Uses MSAL to retrieve the active account.\n */\n public async getActiveAccount(): Promise<AuthenticationRecord | undefined> {\n const app = await this.getApp();\n const account = app.getActiveAccount();\n if (!account) {\n return;\n }\n return msalToPublic(this.clientId, account);\n }\n\n /**\n * Attempts to retrieve a token from cache.\n */\n public async getTokenSilent(\n scopes: string[],\n options?: CredentialFlowGetTokenOptions,\n ): Promise<AccessToken> {\n const account = await this.getActiveAccount();\n if (!account) {\n throw new AuthenticationRequiredError({\n scopes,\n getTokenOptions: options,\n message:\n \"Silent authentication failed. We couldn't retrieve an active account from the cache.\",\n });\n }\n\n const parameters: msalBrowser.SilentRequest = {\n authority: options?.authority || this.msalConfig.auth.authority!,\n correlationId: options?.correlationId,\n claims: options?.claims,\n account: publicToMsal(account),\n forceRefresh: false,\n scopes,\n };\n\n try {\n this.logger.info(\"Attempting to acquire token silently\");\n const app = await this.getApp();\n const response = await app.acquireTokenSilent(parameters);\n return this.handleResult(scopes, response);\n } catch (err: any) {\n throw handleMsalError(scopes, err, options);\n }\n }\n\n /**\n * Attempts to retrieve the token in the browser.\n */\n protected async doGetToken(\n scopes: string[],\n options?: CredentialFlowGetTokenOptions,\n ): Promise<AccessToken> {\n const account = await this.getActiveAccount();\n if (!account) {\n throw new AuthenticationRequiredError({\n scopes,\n getTokenOptions: options,\n message:\n \"Silent authentication failed. We couldn't retrieve an active account from the cache.\",\n });\n }\n\n const parameters: msalBrowser.RedirectRequest = {\n authority: options?.authority || this.msalConfig.auth.authority!,\n correlationId: options?.correlationId,\n claims: options?.claims,\n account: publicToMsal(account),\n loginHint: this.loginHint,\n scopes,\n };\n const app = await this.getApp();\n switch (this.loginStyle) {\n case \"redirect\":\n // This will go out of the page.\n // Once the InteractiveBrowserCredential is initialized again,\n // we'll load the MSAL account in the constructor.\n\n await app.acquireTokenRedirect(parameters);\n return { token: \"\", expiresOnTimestamp: 0, tokenType: \"Bearer\" };\n case \"popup\":\n return this.handleResult(scopes, await app.acquireTokenPopup(parameters));\n }\n }\n}\n"]}
@@ -1,116 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { AuthenticationRequiredError, CredentialUnavailableError } from "../../errors";
4
- import { formatSuccess } from "../../util/logging";
5
- import { ensureValidMsalToken, getAuthority, getKnownAuthorities, msalToPublic } from "../utils";
6
- import { processMultiTenantRequest, resolveAdditionallyAllowedTenantIds, resolveTenantId, } from "../../util/tenantIdUtils";
7
- import { DefaultTenantId } from "../../constants";
8
- /**
9
- * Generates a MSAL configuration that generally works for browsers
10
- * @internal
11
- */
12
- export function defaultBrowserMsalConfig(options) {
13
- const tenantId = options.tenantId || DefaultTenantId;
14
- const authority = getAuthority(tenantId, options.authorityHost);
15
- return {
16
- auth: {
17
- clientId: options.clientId,
18
- authority,
19
- knownAuthorities: getKnownAuthorities(tenantId, authority, options.disableInstanceDiscovery),
20
- // If the users picked redirect as their login style,
21
- // but they didn't provide a redirectUri,
22
- // we can try to use the current page we're in as a default value.
23
- redirectUri: options.redirectUri || self.location.origin,
24
- },
25
- };
26
- }
27
- /**
28
- * MSAL partial base client for the browsers.
29
- *
30
- * It completes the input configuration with some default values.
31
- * It also provides with utility protected methods that can be used from any of the clients,
32
- * which includes handlers for successful responses and errors.
33
- *
34
- * @internal
35
- */
36
- export class MsalBrowser {
37
- constructor(options) {
38
- var _a;
39
- this.logger = options.logger;
40
- this.loginStyle = options.loginStyle;
41
- if (!options.clientId) {
42
- throw new CredentialUnavailableError("A client ID is required in browsers");
43
- }
44
- this.clientId = options.clientId;
45
- this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds((_a = options === null || options === void 0 ? void 0 : options.tokenCredentialOptions) === null || _a === void 0 ? void 0 : _a.additionallyAllowedTenants);
46
- this.tenantId = resolveTenantId(this.logger, options.tenantId, options.clientId);
47
- this.authorityHost = options.authorityHost;
48
- this.msalConfig = defaultBrowserMsalConfig(options);
49
- this.disableAutomaticAuthentication = options.disableAutomaticAuthentication;
50
- if (options.authenticationRecord) {
51
- this.account = Object.assign(Object.assign({}, options.authenticationRecord), { tenantId: this.tenantId });
52
- }
53
- }
54
- /**
55
- * In the browsers we don't need to init()
56
- */
57
- async init() {
58
- // Nothing to do here.
59
- }
60
- /**
61
- * Clears MSAL's cache.
62
- */
63
- async logout() {
64
- var _a;
65
- (_a = this.app) === null || _a === void 0 ? void 0 : _a.logout();
66
- }
67
- /**
68
- * Attempts to retrieve an authenticated token from MSAL.
69
- */
70
- async getToken(scopes, options = {}) {
71
- const tenantId = processMultiTenantRequest(this.tenantId, options, this.additionallyAllowedTenantIds) ||
72
- this.tenantId;
73
- if (!options.authority) {
74
- options.authority = getAuthority(tenantId, this.authorityHost);
75
- }
76
- // We ensure that redirection is handled at this point.
77
- await this.handleRedirect();
78
- if (!(await this.getActiveAccount()) && !this.disableAutomaticAuthentication) {
79
- await this.login(scopes);
80
- }
81
- return this.getTokenSilent(scopes).catch((err) => {
82
- if (err.name !== "AuthenticationRequiredError") {
83
- throw err;
84
- }
85
- if (options === null || options === void 0 ? void 0 : options.disableAutomaticAuthentication) {
86
- throw new AuthenticationRequiredError({
87
- scopes,
88
- getTokenOptions: options,
89
- message: "Automatic authentication has been disabled. You may call the authentication() method.",
90
- });
91
- }
92
- this.logger.info(`Silent authentication failed, falling back to interactive method ${this.loginStyle}`);
93
- return this.doGetToken(scopes);
94
- });
95
- }
96
- /**
97
- * Handles the MSAL authentication result.
98
- * If the result has an account, we update the local account reference.
99
- * If the token received is invalid, an error will be thrown depending on what's missing.
100
- */
101
- handleResult(scopes, result, getTokenOptions) {
102
- var _a;
103
- if (result === null || result === void 0 ? void 0 : result.account) {
104
- this.account = msalToPublic(this.clientId, result.account);
105
- }
106
- ensureValidMsalToken(scopes, result, getTokenOptions);
107
- this.logger.getToken.info(formatSuccess(scopes));
108
- return {
109
- token: result.accessToken,
110
- expiresOnTimestamp: result.expiresOn.getTime(),
111
- refreshAfterTimestamp: (_a = result.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
112
- tokenType: "Bearer",
113
- };
114
- }
115
- }
116
- //# sourceMappingURL=msalBrowserCommon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"msalBrowserCommon.js","sourceRoot":"","sources":["../../../../src/msal/browserFlows/msalBrowserCommon.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAEvF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjG,OAAO,EACL,yBAAyB,EACzB,mCAAmC,EACnC,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAqClD;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAA+B;IAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,eAAe,CAAC;IACrD,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChE,OAAO;QACL,IAAI,EAAE;YACJ,QAAQ,EAAE,OAAO,CAAC,QAAS;YAC3B,SAAS;YACT,gBAAgB,EAAE,mBAAmB,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,wBAAwB,CAAC;YAC5F,qDAAqD;YACrD,yCAAyC;YACzC,kEAAkE;YAClE,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM;SACzD;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,OAAgB,WAAW;IAY/B,YAAY,OAA+B;;QACzC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,0BAA0B,CAAC,qCAAqC,CAAC,CAAC;QAC9E,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,4BAA4B,GAAG,mCAAmC,CACrE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,sBAAsB,0CAAE,0BAA0B,CAC5D,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjF,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,8BAA8B,GAAG,OAAO,CAAC,8BAA8B,CAAC;QAE7E,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;YACjC,IAAI,CAAC,OAAO,mCACP,OAAO,CAAC,oBAAoB,KAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACxB,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI;QACR,sBAAsB;IACxB,CAAC;IAOD;;OAEG;IACH,KAAK,CAAC,MAAM;;QACV,MAAA,IAAI,CAAC,GAAG,0CAAE,MAAM,EAAE,CAAC;IACrB,CAAC;IAsBD;;OAEG;IACI,KAAK,CAAC,QAAQ,CACnB,MAAgB,EAChB,UAAyC,EAAE;QAE3C,MAAM,QAAQ,GACZ,yBAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,4BAA4B,CAAC;YACpF,IAAI,CAAC,QAAQ,CAAC;QAEhB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACjE,CAAC;QAED,uDAAuD;QACvD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,8BAA8B,EAAE,CAAC;YAC7E,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YAC/C,IAAI,GAAG,CAAC,IAAI,KAAK,6BAA6B,EAAE,CAAC;gBAC/C,MAAM,GAAG,CAAC;YACZ,CAAC;YACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,8BAA8B,EAAE,CAAC;gBAC5C,MAAM,IAAI,2BAA2B,CAAC;oBACpC,MAAM;oBACN,eAAe,EAAE,OAAO;oBACxB,OAAO,EACL,uFAAuF;iBAC1F,CAAC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,oEAAoE,IAAI,CAAC,UAAU,EAAE,CACtF,CAAC;YACF,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACO,YAAY,CACpB,MAAyB,EACzB,MAAmB,EACnB,eAAiC;;QAEjC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;QACD,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;QACjD,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,WAAW;YACzB,kBAAkB,EAAE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE;YAC9C,qBAAqB,EAAE,MAAA,MAAM,CAAC,SAAS,0CAAE,OAAO,EAAE;YAClD,SAAS,EAAE,QAAQ;SACL,CAAC;IACnB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type * as msalBrowser from \"@azure/msal-browser\";\n\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport type { AuthenticationRecord, MsalResult } from \"../types\";\nimport { AuthenticationRequiredError, CredentialUnavailableError } from \"../../errors\";\nimport type { CredentialLogger } from \"../../util/logging\";\nimport { formatSuccess } from \"../../util/logging\";\nimport type { MsalFlow, MsalFlowOptions } from \"./flows\";\nimport { ensureValidMsalToken, getAuthority, getKnownAuthorities, msalToPublic } from \"../utils\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n resolveTenantId,\n} from \"../../util/tenantIdUtils\";\n\nimport type { BrowserLoginStyle } from \"../../credentials/interactiveBrowserCredentialOptions\";\nimport type { CredentialFlowGetTokenOptions } from \"../credentials\";\nimport { DefaultTenantId } from \"../../constants\";\nimport type { LogPolicyOptions } from \"@azure/core-rest-pipeline\";\nimport type { MultiTenantTokenCredentialOptions } from \"../../credentials/multiTenantTokenCredentialOptions\";\n\n/**\n * Union of the constructor parameters that all MSAL flow types take.\n * Some properties might not be used by some flow types.\n */\nexport interface MsalBrowserFlowOptions extends MsalFlowOptions {\n tokenCredentialOptions: MultiTenantTokenCredentialOptions;\n redirectUri?: string;\n loginStyle: BrowserLoginStyle;\n loginHint?: string;\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?: LogPolicyOptions & {\n /**\n * Allows logging account information once the authentication flow succeeds.\n */\n allowLoggingAccountIdentifiers?: boolean;\n /**\n * Allows logging personally identifiable information for customer support.\n */\n enableUnsafeSupportLogging?: boolean;\n };\n}\n\n/**\n * The common methods we use to work with the MSAL browser flows.\n * @internal\n */\nexport interface MsalBrowserFlow extends MsalFlow {\n login(scopes?: string[]): Promise<AuthenticationRecord | undefined>;\n handleRedirect(): Promise<AuthenticationRecord | undefined>;\n}\n\n/**\n * Generates a MSAL configuration that generally works for browsers\n * @internal\n */\nexport function defaultBrowserMsalConfig(\n options: MsalBrowserFlowOptions,\n): msalBrowser.Configuration {\n const tenantId = options.tenantId || DefaultTenantId;\n const authority = getAuthority(tenantId, options.authorityHost);\n return {\n auth: {\n clientId: options.clientId!,\n authority,\n knownAuthorities: getKnownAuthorities(tenantId, authority, options.disableInstanceDiscovery),\n // If the users picked redirect as their login style,\n // but they didn't provide a redirectUri,\n // we can try to use the current page we're in as a default value.\n redirectUri: options.redirectUri || self.location.origin,\n },\n };\n}\n\n/**\n * MSAL partial base client for the browsers.\n *\n * It completes the input configuration with some default values.\n * It also provides with utility protected methods that can be used from any of the clients,\n * which includes handlers for successful responses and errors.\n *\n * @internal\n */\nexport abstract class MsalBrowser implements MsalBrowserFlow {\n protected loginStyle: BrowserLoginStyle;\n protected clientId: string;\n protected tenantId: string;\n protected additionallyAllowedTenantIds: string[];\n protected authorityHost?: string;\n protected account: AuthenticationRecord | undefined;\n protected msalConfig: msalBrowser.Configuration;\n protected disableAutomaticAuthentication?: boolean;\n protected app?: msalBrowser.IPublicClientApplication;\n protected logger: CredentialLogger;\n\n constructor(options: MsalBrowserFlowOptions) {\n this.logger = options.logger;\n this.loginStyle = options.loginStyle;\n if (!options.clientId) {\n throw new CredentialUnavailableError(\"A client ID is required in browsers\");\n }\n this.clientId = options.clientId;\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.tokenCredentialOptions?.additionallyAllowedTenants,\n );\n this.tenantId = resolveTenantId(this.logger, options.tenantId, options.clientId);\n this.authorityHost = options.authorityHost;\n this.msalConfig = defaultBrowserMsalConfig(options);\n this.disableAutomaticAuthentication = options.disableAutomaticAuthentication;\n\n if (options.authenticationRecord) {\n this.account = {\n ...options.authenticationRecord,\n tenantId: this.tenantId,\n };\n }\n }\n\n /**\n * In the browsers we don't need to init()\n */\n async init(): Promise<void> {\n // Nothing to do here.\n }\n\n /**\n * Attempts to handle a redirection request the least amount of times possible.\n */\n public abstract handleRedirect(): Promise<AuthenticationRecord | undefined>;\n\n /**\n * Clears MSAL's cache.\n */\n async logout(): Promise<void> {\n this.app?.logout();\n }\n\n /**\n * Uses MSAL to retrieve the active account.\n */\n public abstract getActiveAccount(): Promise<AuthenticationRecord | undefined>;\n\n /**\n * Uses MSAL to trigger a redirect or a popup login.\n */\n public abstract login(scopes?: string | string[]): Promise<AuthenticationRecord | undefined>;\n\n /**\n * Attempts to retrieve a token from cache.\n */\n public abstract getTokenSilent(scopes: string[]): Promise<AccessToken>;\n\n /**\n * Attempts to retrieve the token in the browser.\n */\n protected abstract doGetToken(scopes: string[]): Promise<AccessToken>;\n\n /**\n * Attempts to retrieve an authenticated token from MSAL.\n */\n public async getToken(\n scopes: string[],\n options: CredentialFlowGetTokenOptions = {},\n ): Promise<AccessToken> {\n const tenantId =\n processMultiTenantRequest(this.tenantId, options, this.additionallyAllowedTenantIds) ||\n this.tenantId;\n\n if (!options.authority) {\n options.authority = getAuthority(tenantId, this.authorityHost);\n }\n\n // We ensure that redirection is handled at this point.\n await this.handleRedirect();\n\n if (!(await this.getActiveAccount()) && !this.disableAutomaticAuthentication) {\n await this.login(scopes);\n }\n return this.getTokenSilent(scopes).catch((err) => {\n if (err.name !== \"AuthenticationRequiredError\") {\n throw err;\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 this.logger.info(\n `Silent authentication failed, falling back to interactive method ${this.loginStyle}`,\n );\n return this.doGetToken(scopes);\n });\n }\n\n /**\n * Handles the MSAL authentication result.\n * If the result has an account, we update the local account reference.\n * If the token received is invalid, an error will be thrown depending on what's missing.\n */\n protected handleResult(\n scopes: string | string[],\n result?: MsalResult,\n getTokenOptions?: GetTokenOptions,\n ): AccessToken {\n if (result?.account) {\n this.account = msalToPublic(this.clientId, result.account);\n }\n ensureValidMsalToken(scopes, result, getTokenOptions);\n this.logger.getToken.info(formatSuccess(scopes));\n return {\n token: result.accessToken,\n expiresOnTimestamp: result.expiresOn.getTime(),\n refreshAfterTimestamp: result.refreshOn?.getTime(),\n tokenType: \"Bearer\",\n } as AccessToken;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/msal/credentials.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport type { AuthenticationRecord } from \"./types\";\n\n/**\n * The MSAL clients `getToken` requests can receive a `correlationId` and `disableAutomaticAuthentication`.\n * (which is used to prevent `getToken` from triggering the manual authentication if `getTokenSilent` fails).\n * @internal\n */\nexport interface CredentialFlowGetTokenOptions extends GetTokenOptions {\n /**\n * Unique identifier useful to track outgoing requests.\n */\n correlationId?: string;\n /**\n * Makes getToken throw if a manual authentication is necessary.\n */\n disableAutomaticAuthentication?: boolean;\n /**\n * Authority, to overwrite the default one, if necessary.\n */\n authority?: string;\n /**\n * Claims received from challenges.\n */\n claims?: string;\n /**\n * Indicates to allow Continuous Access Evaluation or not\n */\n enableCae?: boolean;\n /**\n * Client Assertion\n */\n getAssertion?: () => Promise<string>;\n}\n\n/**\n * Simplified representation of the internal authentication flow.\n * @internal\n */\nexport interface CredentialFlow {\n /**\n * Clears the MSAL cache.\n */\n logout(): Promise<void>;\n /**\n * Tries to load the active account, either from memory or from MSAL.\n */\n getActiveAccount(): Promise<AuthenticationRecord | undefined>;\n /**\n * Calls to the implementation's doGetToken method.\n */\n getToken(scopes?: string[], options?: CredentialFlowGetTokenOptions): Promise<AccessToken | null>;\n}\n"]}