@azure/identity 4.8.1-alpha.20250410.1 → 4.9.1-alpha.20250416.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/dist/browser/constants.d.ts +1 -1
  2. package/dist/browser/constants.js +1 -1
  3. package/dist/browser/constants.js.map +1 -1
  4. package/dist/commonjs/constants.d.ts +1 -1
  5. package/dist/commonjs/constants.js +1 -1
  6. package/dist/commonjs/constants.js.map +1 -1
  7. package/dist/esm/constants.d.ts +1 -1
  8. package/dist/esm/constants.js +1 -1
  9. package/dist/esm/constants.js.map +1 -1
  10. package/dist/workerd/client/identityClient.d.ts +65 -0
  11. package/dist/workerd/client/identityClient.d.ts.map +1 -0
  12. package/dist/workerd/client/identityClient.js +248 -0
  13. package/dist/workerd/client/identityClient.js.map +1 -0
  14. package/dist/workerd/constants.d.ts +69 -0
  15. package/dist/workerd/constants.d.ts.map +1 -0
  16. package/dist/workerd/constants.js +75 -0
  17. package/dist/workerd/constants.js.map +1 -0
  18. package/dist/workerd/credentials/authorityValidationOptions.d.ts +16 -0
  19. package/dist/workerd/credentials/authorityValidationOptions.d.ts.map +1 -0
  20. package/dist/workerd/credentials/authorityValidationOptions.js +4 -0
  21. package/dist/workerd/credentials/authorityValidationOptions.js.map +1 -0
  22. package/dist/workerd/credentials/authorizationCodeCredential.d.ts +73 -0
  23. package/dist/workerd/credentials/authorizationCodeCredential.d.ts.map +1 -0
  24. package/dist/workerd/credentials/authorizationCodeCredential.js +60 -0
  25. package/dist/workerd/credentials/authorizationCodeCredential.js.map +1 -0
  26. package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
  27. package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
  28. package/dist/workerd/credentials/authorizationCodeCredentialOptions.js +4 -0
  29. package/dist/workerd/credentials/authorizationCodeCredentialOptions.js.map +1 -0
  30. package/dist/workerd/credentials/azureApplicationCredential.d.ts +24 -0
  31. package/dist/workerd/credentials/azureApplicationCredential.d.ts.map +1 -0
  32. package/dist/workerd/credentials/azureApplicationCredential.js +32 -0
  33. package/dist/workerd/credentials/azureApplicationCredential.js.map +1 -0
  34. package/dist/workerd/credentials/azureApplicationCredentialOptions.d.ts +13 -0
  35. package/dist/workerd/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
  36. package/dist/workerd/credentials/azureApplicationCredentialOptions.js +4 -0
  37. package/dist/workerd/credentials/azureApplicationCredentialOptions.js.map +1 -0
  38. package/dist/workerd/credentials/azureCliCredential.d.ts +64 -0
  39. package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -0
  40. package/dist/workerd/credentials/azureCliCredential.js +191 -0
  41. package/dist/workerd/credentials/azureCliCredential.js.map +1 -0
  42. package/dist/workerd/credentials/azureCliCredentialOptions.d.ts +20 -0
  43. package/dist/workerd/credentials/azureCliCredentialOptions.d.ts.map +1 -0
  44. package/dist/workerd/credentials/azureCliCredentialOptions.js +4 -0
  45. package/dist/workerd/credentials/azureCliCredentialOptions.js.map +1 -0
  46. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts +71 -0
  47. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  48. package/dist/workerd/credentials/azureDeveloperCliCredential.js +173 -0
  49. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -0
  50. package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
  51. package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
  52. package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.js +4 -0
  53. package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
  54. package/dist/workerd/credentials/azurePipelinesCredential.d.ts +38 -0
  55. package/dist/workerd/credentials/azurePipelinesCredential.d.ts.map +1 -0
  56. package/dist/workerd/credentials/azurePipelinesCredential.js +141 -0
  57. package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -0
  58. package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
  59. package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
  60. package/dist/workerd/credentials/azurePipelinesCredentialOptions.js +4 -0
  61. package/dist/workerd/credentials/azurePipelinesCredentialOptions.js.map +1 -0
  62. package/dist/workerd/credentials/azurePowerShellCredential.d.ts +75 -0
  63. package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -0
  64. package/dist/workerd/credentials/azurePowerShellCredential.js +229 -0
  65. package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -0
  66. package/dist/workerd/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
  67. package/dist/workerd/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
  68. package/dist/workerd/credentials/azurePowerShellCredentialOptions.js +4 -0
  69. package/dist/workerd/credentials/azurePowerShellCredentialOptions.js.map +1 -0
  70. package/dist/workerd/credentials/brokerAuthOptions.d.ts +13 -0
  71. package/dist/workerd/credentials/brokerAuthOptions.d.ts.map +1 -0
  72. package/dist/workerd/credentials/brokerAuthOptions.js +2 -0
  73. package/dist/workerd/credentials/brokerAuthOptions.js.map +1 -0
  74. package/dist/workerd/credentials/browserCustomizationOptions.d.ts +19 -0
  75. package/dist/workerd/credentials/browserCustomizationOptions.d.ts.map +1 -0
  76. package/dist/workerd/credentials/browserCustomizationOptions.js +4 -0
  77. package/dist/workerd/credentials/browserCustomizationOptions.js.map +1 -0
  78. package/dist/workerd/credentials/chainedTokenCredential.d.ts +51 -0
  79. package/dist/workerd/credentials/chainedTokenCredential.d.ts.map +1 -0
  80. package/dist/workerd/credentials/chainedTokenCredential.js +92 -0
  81. package/dist/workerd/credentials/chainedTokenCredential.js.map +1 -0
  82. package/dist/workerd/credentials/clientAssertionCredential.d.ts +33 -0
  83. package/dist/workerd/credentials/clientAssertionCredential.d.ts.map +1 -0
  84. package/dist/workerd/credentials/clientAssertionCredential.js +55 -0
  85. package/dist/workerd/credentials/clientAssertionCredential.js.map +1 -0
  86. package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts +9 -0
  87. package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
  88. package/dist/workerd/credentials/clientAssertionCredentialOptions.js +4 -0
  89. package/dist/workerd/credentials/clientAssertionCredentialOptions.js.map +1 -0
  90. package/dist/workerd/credentials/clientCertificateCredential.d.ts +72 -0
  91. package/dist/workerd/credentials/clientCertificateCredential.d.ts.map +1 -0
  92. package/dist/workerd/credentials/clientCertificateCredential.js +122 -0
  93. package/dist/workerd/credentials/clientCertificateCredential.js.map +1 -0
  94. package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts +31 -0
  95. package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts.map +1 -0
  96. package/dist/workerd/credentials/clientCertificateCredentialModels.js +4 -0
  97. package/dist/workerd/credentials/clientCertificateCredentialModels.js.map +1 -0
  98. package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts +14 -0
  99. package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
  100. package/dist/workerd/credentials/clientCertificateCredentialOptions.js +4 -0
  101. package/dist/workerd/credentials/clientCertificateCredentialOptions.js.map +1 -0
  102. package/dist/workerd/credentials/clientSecretCredential.d.ts +37 -0
  103. package/dist/workerd/credentials/clientSecretCredential.d.ts.map +1 -0
  104. package/dist/workerd/credentials/clientSecretCredential.js +60 -0
  105. package/dist/workerd/credentials/clientSecretCredential.js.map +1 -0
  106. package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts +9 -0
  107. package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
  108. package/dist/workerd/credentials/clientSecretCredentialOptions.js +4 -0
  109. package/dist/workerd/credentials/clientSecretCredentialOptions.js.map +1 -0
  110. package/dist/workerd/credentials/credentialPersistenceOptions.d.ts +30 -0
  111. package/dist/workerd/credentials/credentialPersistenceOptions.d.ts.map +1 -0
  112. package/dist/workerd/credentials/credentialPersistenceOptions.js +4 -0
  113. package/dist/workerd/credentials/credentialPersistenceOptions.js.map +1 -0
  114. package/dist/workerd/credentials/defaultAzureCredential.d.ts +65 -0
  115. package/dist/workerd/credentials/defaultAzureCredential.d.ts.map +1 -0
  116. package/dist/workerd/credentials/defaultAzureCredential.js +164 -0
  117. package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -0
  118. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts +49 -0
  119. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
  120. package/dist/workerd/credentials/defaultAzureCredentialOptions.js +4 -0
  121. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -0
  122. package/dist/workerd/credentials/deviceCodeCredential.d.ts +67 -0
  123. package/dist/workerd/credentials/deviceCodeCredential.d.ts.map +1 -0
  124. package/dist/workerd/credentials/deviceCodeCredential.js +91 -0
  125. package/dist/workerd/credentials/deviceCodeCredential.js.map +1 -0
  126. package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts +53 -0
  127. package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
  128. package/dist/workerd/credentials/deviceCodeCredentialOptions.js +4 -0
  129. package/dist/workerd/credentials/deviceCodeCredentialOptions.js.map +1 -0
  130. package/dist/workerd/credentials/environmentCredential.d.ts +52 -0
  131. package/dist/workerd/credentials/environmentCredential.d.ts.map +1 -0
  132. package/dist/workerd/credentials/environmentCredential.js +130 -0
  133. package/dist/workerd/credentials/environmentCredential.js.map +1 -0
  134. package/dist/workerd/credentials/environmentCredentialOptions.d.ts +9 -0
  135. package/dist/workerd/credentials/environmentCredentialOptions.d.ts.map +1 -0
  136. package/dist/workerd/credentials/environmentCredentialOptions.js +4 -0
  137. package/dist/workerd/credentials/environmentCredentialOptions.js.map +1 -0
  138. package/dist/workerd/credentials/interactiveBrowserCredential.d.ts +56 -0
  139. package/dist/workerd/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  140. package/dist/workerd/credentials/interactiveBrowserCredential.js +91 -0
  141. package/dist/workerd/credentials/interactiveBrowserCredential.js.map +1 -0
  142. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
  143. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
  144. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js +4 -0
  145. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
  146. package/dist/workerd/credentials/interactiveCredentialOptions.d.ts +25 -0
  147. package/dist/workerd/credentials/interactiveCredentialOptions.d.ts.map +1 -0
  148. package/dist/workerd/credentials/interactiveCredentialOptions.js +4 -0
  149. package/dist/workerd/credentials/interactiveCredentialOptions.js.map +1 -0
  150. package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
  151. package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
  152. package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.js +99 -0
  153. package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
  154. package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
  155. package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
  156. package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.js +33 -0
  157. package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
  158. package/dist/workerd/credentials/managedIdentityCredential/index.d.ts +61 -0
  159. package/dist/workerd/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  160. package/dist/workerd/credentials/managedIdentityCredential/index.js +239 -0
  161. package/dist/workerd/credentials/managedIdentityCredential/index.js.map +1 -0
  162. package/dist/workerd/credentials/managedIdentityCredential/models.d.ts +24 -0
  163. package/dist/workerd/credentials/managedIdentityCredential/models.d.ts.map +1 -0
  164. package/dist/workerd/credentials/managedIdentityCredential/models.js +4 -0
  165. package/dist/workerd/credentials/managedIdentityCredential/models.js.map +1 -0
  166. package/dist/workerd/credentials/managedIdentityCredential/options.d.ts +37 -0
  167. package/dist/workerd/credentials/managedIdentityCredential/options.d.ts.map +1 -0
  168. package/dist/workerd/credentials/managedIdentityCredential/options.js +4 -0
  169. package/dist/workerd/credentials/managedIdentityCredential/options.js.map +1 -0
  170. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
  171. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
  172. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
  173. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
  174. package/dist/workerd/credentials/managedIdentityCredential/utils.d.ts +37 -0
  175. package/dist/workerd/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
  176. package/dist/workerd/credentials/managedIdentityCredential/utils.js +81 -0
  177. package/dist/workerd/credentials/managedIdentityCredential/utils.js.map +1 -0
  178. package/dist/workerd/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
  179. package/dist/workerd/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
  180. package/dist/workerd/credentials/multiTenantTokenCredentialOptions.js +4 -0
  181. package/dist/workerd/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
  182. package/dist/workerd/credentials/onBehalfOfCredential.d.ts +105 -0
  183. package/dist/workerd/credentials/onBehalfOfCredential.d.ts.map +1 -0
  184. package/dist/workerd/credentials/onBehalfOfCredential.js +112 -0
  185. package/dist/workerd/credentials/onBehalfOfCredential.js.map +1 -0
  186. package/dist/workerd/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
  187. package/dist/workerd/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
  188. package/dist/workerd/credentials/onBehalfOfCredentialOptions.js +4 -0
  189. package/dist/workerd/credentials/onBehalfOfCredentialOptions.js.map +1 -0
  190. package/dist/workerd/credentials/usernamePasswordCredential.d.ts +42 -0
  191. package/dist/workerd/credentials/usernamePasswordCredential.d.ts.map +1 -0
  192. package/dist/workerd/credentials/usernamePasswordCredential.js +68 -0
  193. package/dist/workerd/credentials/usernamePasswordCredential.js.map +1 -0
  194. package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts +10 -0
  195. package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
  196. package/dist/workerd/credentials/usernamePasswordCredentialOptions.js +4 -0
  197. package/dist/workerd/credentials/usernamePasswordCredentialOptions.js.map +1 -0
  198. package/dist/workerd/credentials/visualStudioCodeCredential.d.ts +66 -0
  199. package/dist/workerd/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  200. package/dist/workerd/credentials/visualStudioCodeCredential.js +196 -0
  201. package/dist/workerd/credentials/visualStudioCodeCredential.js.map +1 -0
  202. package/dist/workerd/credentials/visualStudioCodeCredentialOptions.d.ts +16 -0
  203. package/dist/workerd/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
  204. package/dist/workerd/credentials/visualStudioCodeCredentialOptions.js +4 -0
  205. package/dist/workerd/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
  206. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +16 -0
  207. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
  208. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +4 -0
  209. package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
  210. package/dist/workerd/credentials/workloadIdentityCredential.d.ts +47 -0
  211. package/dist/workerd/credentials/workloadIdentityCredential.d.ts.map +1 -0
  212. package/dist/workerd/credentials/workloadIdentityCredential.js +114 -0
  213. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -0
  214. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
  215. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
  216. package/dist/workerd/credentials/workloadIdentityCredentialOptions.js +4 -0
  217. package/dist/workerd/credentials/workloadIdentityCredentialOptions.js.map +1 -0
  218. package/dist/workerd/errors.d.ts +139 -0
  219. package/dist/workerd/errors.d.ts.map +1 -0
  220. package/dist/workerd/errors.js +123 -0
  221. package/dist/workerd/errors.js.map +1 -0
  222. package/dist/workerd/index.d.ts +61 -0
  223. package/dist/workerd/index.d.ts.map +1 -0
  224. package/dist/workerd/index.js +34 -0
  225. package/dist/workerd/index.js.map +1 -0
  226. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +19 -0
  227. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
  228. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +291 -0
  229. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +1 -0
  230. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +87 -0
  231. package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +1 -0
  232. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +4 -0
  233. package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +1 -0
  234. package/dist/workerd/msal/credentials.d.ts +52 -0
  235. package/dist/workerd/msal/credentials.d.ts.map +1 -0
  236. package/dist/workerd/msal/credentials.js +4 -0
  237. package/dist/workerd/msal/credentials.js.map +1 -0
  238. package/dist/workerd/msal/msal.d.ts +3 -0
  239. package/dist/workerd/msal/msal.d.ts.map +1 -0
  240. package/dist/workerd/msal/msal.js +5 -0
  241. package/dist/workerd/msal/msal.js.map +1 -0
  242. package/dist/workerd/msal/nodeFlows/brokerOptions.d.ts +44 -0
  243. package/dist/workerd/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
  244. package/dist/workerd/msal/nodeFlows/brokerOptions.js +2 -0
  245. package/dist/workerd/msal/nodeFlows/brokerOptions.js.map +1 -0
  246. package/dist/workerd/msal/nodeFlows/msalClient.d.ts +186 -0
  247. package/dist/workerd/msal/nodeFlows/msalClient.d.ts.map +1 -0
  248. package/dist/workerd/msal/nodeFlows/msalClient.js +469 -0
  249. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -0
  250. package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts +91 -0
  251. package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
  252. package/dist/workerd/msal/nodeFlows/msalPlugins.js +87 -0
  253. package/dist/workerd/msal/nodeFlows/msalPlugins.js.map +1 -0
  254. package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
  255. package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
  256. package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.js +4 -0
  257. package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
  258. package/dist/workerd/msal/types.d.ts +87 -0
  259. package/dist/workerd/msal/types.d.ts.map +1 -0
  260. package/dist/workerd/msal/types.js +4 -0
  261. package/dist/workerd/msal/types.js.map +1 -0
  262. package/dist/workerd/msal/utils.d.ts +95 -0
  263. package/dist/workerd/msal/utils.d.ts.map +1 -0
  264. package/dist/workerd/msal/utils.js +238 -0
  265. package/dist/workerd/msal/utils.js.map +1 -0
  266. package/dist/workerd/package.json +3 -0
  267. package/dist/workerd/plugins/consumer.d.ts +28 -0
  268. package/dist/workerd/plugins/consumer.d.ts.map +1 -0
  269. package/dist/workerd/plugins/consumer.js +43 -0
  270. package/dist/workerd/plugins/consumer.js.map +1 -0
  271. package/dist/workerd/plugins/provider.d.ts +36 -0
  272. package/dist/workerd/plugins/provider.d.ts.map +1 -0
  273. package/dist/workerd/plugins/provider.js +4 -0
  274. package/dist/workerd/plugins/provider.js.map +1 -0
  275. package/dist/workerd/regionalAuthority.d.ts +122 -0
  276. package/dist/workerd/regionalAuthority.d.ts.map +1 -0
  277. package/dist/workerd/regionalAuthority.js +140 -0
  278. package/dist/workerd/regionalAuthority.js.map +1 -0
  279. package/dist/workerd/tokenCredentialOptions.d.ts +28 -0
  280. package/dist/workerd/tokenCredentialOptions.d.ts.map +1 -0
  281. package/dist/workerd/tokenCredentialOptions.js +4 -0
  282. package/dist/workerd/tokenCredentialOptions.js.map +1 -0
  283. package/dist/workerd/tokenProvider.d.ts +39 -0
  284. package/dist/workerd/tokenProvider.d.ts.map +1 -0
  285. package/dist/workerd/tokenProvider.js +53 -0
  286. package/dist/workerd/tokenProvider.js.map +1 -0
  287. package/dist/workerd/util/authHostEnv-browser.d.mts +4 -0
  288. package/dist/workerd/util/authHostEnv-browser.d.mts.map +1 -0
  289. package/dist/workerd/util/authHostEnv-browser.mjs +7 -0
  290. package/dist/workerd/util/authHostEnv-browser.mjs.map +1 -0
  291. package/dist/workerd/util/identityTokenEndpoint.d.ts +2 -0
  292. package/dist/workerd/util/identityTokenEndpoint.d.ts.map +1 -0
  293. package/dist/workerd/util/identityTokenEndpoint.js +11 -0
  294. package/dist/workerd/util/identityTokenEndpoint.js.map +1 -0
  295. package/dist/workerd/util/logging.d.ts +70 -0
  296. package/dist/workerd/util/logging.d.ts.map +1 -0
  297. package/dist/workerd/util/logging.js +94 -0
  298. package/dist/workerd/util/logging.js.map +1 -0
  299. package/dist/workerd/util/processMultiTenantRequest.d.ts +10 -0
  300. package/dist/workerd/util/processMultiTenantRequest.d.ts.map +1 -0
  301. package/dist/workerd/util/processMultiTenantRequest.js +35 -0
  302. package/dist/workerd/util/processMultiTenantRequest.js.map +1 -0
  303. package/dist/workerd/util/processUtils.d.ts +13 -0
  304. package/dist/workerd/util/processUtils.d.ts.map +1 -0
  305. package/dist/workerd/util/processUtils.js +32 -0
  306. package/dist/workerd/util/processUtils.js.map +1 -0
  307. package/dist/workerd/util/scopeUtils.d.ts +17 -0
  308. package/dist/workerd/util/scopeUtils.d.ts.map +1 -0
  309. package/dist/workerd/util/scopeUtils.js +29 -0
  310. package/dist/workerd/util/scopeUtils.js.map +1 -0
  311. package/dist/workerd/util/subscriptionUtils.d.ts +6 -0
  312. package/dist/workerd/util/subscriptionUtils.d.ts.map +1 -0
  313. package/dist/workerd/util/subscriptionUtils.js +14 -0
  314. package/dist/workerd/util/subscriptionUtils.js.map +1 -0
  315. package/dist/workerd/util/tenantIdUtils.d.ts +15 -0
  316. package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -0
  317. package/dist/workerd/util/tenantIdUtils.js +44 -0
  318. package/dist/workerd/util/tenantIdUtils.js.map +1 -0
  319. package/dist/workerd/util/tracing.d.ts +6 -0
  320. package/dist/workerd/util/tracing.d.ts.map +1 -0
  321. package/dist/workerd/util/tracing.js +14 -0
  322. package/dist/workerd/util/tracing.js.map +1 -0
  323. package/package.json +9 -3
@@ -0,0 +1,52 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { EnvironmentCredentialOptions } from "./environmentCredentialOptions.js";
3
+ /**
4
+ * Contains the list of all supported environment variable names so that an
5
+ * appropriate error message can be generated when no credentials can be
6
+ * configured.
7
+ *
8
+ * @internal
9
+ */
10
+ export declare const AllSupportedEnvironmentVariables: string[];
11
+ export declare function getSendCertificateChain(): boolean;
12
+ /**
13
+ * Enables authentication to Microsoft Entra ID using a client secret or certificate, or as a user
14
+ * with a username and password.
15
+ */
16
+ export declare class EnvironmentCredential implements TokenCredential {
17
+ private _credential?;
18
+ /**
19
+ * Creates an instance of the EnvironmentCredential class and decides what credential to use depending on the available environment variables.
20
+ *
21
+ * Required environment variables:
22
+ * - `AZURE_TENANT_ID`: The Microsoft Entra tenant (directory) ID.
23
+ * - `AZURE_CLIENT_ID`: The client (application) ID of an App Registration in the tenant.
24
+ *
25
+ * If setting the AZURE_TENANT_ID, then you can also set the additionally allowed tenants
26
+ * - `AZURE_ADDITIONALLY_ALLOWED_TENANTS`: For multi-tenant applications, specifies additional tenants for which the credential may acquire tokens with a single semicolon delimited string. Use * to allow all tenants.
27
+ *
28
+ * Environment variables used for client credential authentication:
29
+ * - `AZURE_CLIENT_SECRET`: A client secret that was generated for the App Registration.
30
+ * - `AZURE_CLIENT_CERTIFICATE_PATH`: The path to a PEM certificate to use during the authentication, instead of the client secret.
31
+ * - `AZURE_CLIENT_CERTIFICATE_PASSWORD`: (optional) password for the certificate file.
32
+ * - `AZURE_CLIENT_SEND_CERTIFICATE_CHAIN`: (optional) indicates that the certificate chain should be set in x5c header to support subject name / issuer based authentication.
33
+ *
34
+ * Alternatively, users can provide environment variables for username and password authentication:
35
+ * - `AZURE_USERNAME`: Username to authenticate with.
36
+ * - `AZURE_PASSWORD`: Password to authenticate with.
37
+ *
38
+ * If the environment variables required to perform the authentication are missing, a {@link CredentialUnavailableError} will be thrown.
39
+ * If the authentication fails, or if there's an unknown error, an {@link AuthenticationError} will be thrown.
40
+ *
41
+ * @param options - Options for configuring the client which makes the authentication request.
42
+ */
43
+ constructor(options?: EnvironmentCredentialOptions);
44
+ /**
45
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
46
+ *
47
+ * @param scopes - The list of scopes for which the token will have access.
48
+ * @param options - Optional parameters. See {@link GetTokenOptions}.
49
+ */
50
+ getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
51
+ }
52
+ //# sourceMappingURL=environmentCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/environmentCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAKtF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,UAU5C,CAAC;AAUF,wBAAgB,uBAAuB,IAAI,OAAO,CASjD;AAED;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC3D,OAAO,CAAC,WAAW,CAAC,CAGuB;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;gBACS,OAAO,CAAC,EAAE,4BAA4B;IAyDlD;;;;;OAKG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;CAqB/F"}
@@ -0,0 +1,130 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { AuthenticationError, CredentialUnavailableError } from "../errors.js";
4
+ import { credentialLogger, formatError, formatSuccess, processEnvVars } from "../util/logging.js";
5
+ import { ClientCertificateCredential } from "./clientCertificateCredential.js";
6
+ import { ClientSecretCredential } from "./clientSecretCredential.js";
7
+ import { UsernamePasswordCredential } from "./usernamePasswordCredential.js";
8
+ import { checkTenantId } from "../util/tenantIdUtils.js";
9
+ import { tracingClient } from "../util/tracing.js";
10
+ /**
11
+ * Contains the list of all supported environment variable names so that an
12
+ * appropriate error message can be generated when no credentials can be
13
+ * configured.
14
+ *
15
+ * @internal
16
+ */
17
+ export const AllSupportedEnvironmentVariables = [
18
+ "AZURE_TENANT_ID",
19
+ "AZURE_CLIENT_ID",
20
+ "AZURE_CLIENT_SECRET",
21
+ "AZURE_CLIENT_CERTIFICATE_PATH",
22
+ "AZURE_CLIENT_CERTIFICATE_PASSWORD",
23
+ "AZURE_USERNAME",
24
+ "AZURE_PASSWORD",
25
+ "AZURE_ADDITIONALLY_ALLOWED_TENANTS",
26
+ "AZURE_CLIENT_SEND_CERTIFICATE_CHAIN",
27
+ ];
28
+ function getAdditionallyAllowedTenants() {
29
+ var _a;
30
+ const additionallyAllowedValues = (_a = process.env.AZURE_ADDITIONALLY_ALLOWED_TENANTS) !== null && _a !== void 0 ? _a : "";
31
+ return additionallyAllowedValues.split(";");
32
+ }
33
+ const credentialName = "EnvironmentCredential";
34
+ const logger = credentialLogger(credentialName);
35
+ export function getSendCertificateChain() {
36
+ var _a;
37
+ const sendCertificateChain = ((_a = process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN) !== null && _a !== void 0 ? _a : "").toLowerCase();
38
+ const result = sendCertificateChain === "true" || sendCertificateChain === "1";
39
+ logger.verbose(`AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: ${process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN}; sendCertificateChain: ${result}`);
40
+ return result;
41
+ }
42
+ /**
43
+ * Enables authentication to Microsoft Entra ID using a client secret or certificate, or as a user
44
+ * with a username and password.
45
+ */
46
+ export class EnvironmentCredential {
47
+ /**
48
+ * Creates an instance of the EnvironmentCredential class and decides what credential to use depending on the available environment variables.
49
+ *
50
+ * Required environment variables:
51
+ * - `AZURE_TENANT_ID`: The Microsoft Entra tenant (directory) ID.
52
+ * - `AZURE_CLIENT_ID`: The client (application) ID of an App Registration in the tenant.
53
+ *
54
+ * If setting the AZURE_TENANT_ID, then you can also set the additionally allowed tenants
55
+ * - `AZURE_ADDITIONALLY_ALLOWED_TENANTS`: For multi-tenant applications, specifies additional tenants for which the credential may acquire tokens with a single semicolon delimited string. Use * to allow all tenants.
56
+ *
57
+ * Environment variables used for client credential authentication:
58
+ * - `AZURE_CLIENT_SECRET`: A client secret that was generated for the App Registration.
59
+ * - `AZURE_CLIENT_CERTIFICATE_PATH`: The path to a PEM certificate to use during the authentication, instead of the client secret.
60
+ * - `AZURE_CLIENT_CERTIFICATE_PASSWORD`: (optional) password for the certificate file.
61
+ * - `AZURE_CLIENT_SEND_CERTIFICATE_CHAIN`: (optional) indicates that the certificate chain should be set in x5c header to support subject name / issuer based authentication.
62
+ *
63
+ * Alternatively, users can provide environment variables for username and password authentication:
64
+ * - `AZURE_USERNAME`: Username to authenticate with.
65
+ * - `AZURE_PASSWORD`: Password to authenticate with.
66
+ *
67
+ * If the environment variables required to perform the authentication are missing, a {@link CredentialUnavailableError} will be thrown.
68
+ * If the authentication fails, or if there's an unknown error, an {@link AuthenticationError} will be thrown.
69
+ *
70
+ * @param options - Options for configuring the client which makes the authentication request.
71
+ */
72
+ constructor(options) {
73
+ // Keep track of any missing environment variables for error details
74
+ this._credential = undefined;
75
+ const assigned = processEnvVars(AllSupportedEnvironmentVariables).assigned.join(", ");
76
+ logger.info(`Found the following environment variables: ${assigned}`);
77
+ const tenantId = process.env.AZURE_TENANT_ID, clientId = process.env.AZURE_CLIENT_ID, clientSecret = process.env.AZURE_CLIENT_SECRET;
78
+ const additionallyAllowedTenantIds = getAdditionallyAllowedTenants();
79
+ const sendCertificateChain = getSendCertificateChain();
80
+ const newOptions = Object.assign(Object.assign({}, options), { additionallyAllowedTenantIds, sendCertificateChain });
81
+ if (tenantId) {
82
+ checkTenantId(logger, tenantId);
83
+ }
84
+ if (tenantId && clientId && clientSecret) {
85
+ logger.info(`Invoking ClientSecretCredential with tenant ID: ${tenantId}, clientId: ${clientId} and clientSecret: [REDACTED]`);
86
+ this._credential = new ClientSecretCredential(tenantId, clientId, clientSecret, newOptions);
87
+ return;
88
+ }
89
+ const certificatePath = process.env.AZURE_CLIENT_CERTIFICATE_PATH;
90
+ const certificatePassword = process.env.AZURE_CLIENT_CERTIFICATE_PASSWORD;
91
+ if (tenantId && clientId && certificatePath) {
92
+ logger.info(`Invoking ClientCertificateCredential with tenant ID: ${tenantId}, clientId: ${clientId} and certificatePath: ${certificatePath}`);
93
+ this._credential = new ClientCertificateCredential(tenantId, clientId, { certificatePath, certificatePassword }, newOptions);
94
+ return;
95
+ }
96
+ const username = process.env.AZURE_USERNAME;
97
+ const password = process.env.AZURE_PASSWORD;
98
+ if (tenantId && clientId && username && password) {
99
+ logger.info(`Invoking UsernamePasswordCredential with tenant ID: ${tenantId}, clientId: ${clientId} and username: ${username}`);
100
+ this._credential = new UsernamePasswordCredential(tenantId, clientId, username, password, newOptions);
101
+ }
102
+ }
103
+ /**
104
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
105
+ *
106
+ * @param scopes - The list of scopes for which the token will have access.
107
+ * @param options - Optional parameters. See {@link GetTokenOptions}.
108
+ */
109
+ async getToken(scopes, options = {}) {
110
+ return tracingClient.withSpan(`${credentialName}.getToken`, options, async (newOptions) => {
111
+ if (this._credential) {
112
+ try {
113
+ const result = await this._credential.getToken(scopes, newOptions);
114
+ logger.getToken.info(formatSuccess(scopes));
115
+ return result;
116
+ }
117
+ catch (err) {
118
+ const authenticationError = new AuthenticationError(400, {
119
+ error: `${credentialName} authentication failed. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`,
120
+ error_description: err.message.toString().split("More details:").join(""),
121
+ });
122
+ logger.getToken.info(formatError(scopes, authenticationError));
123
+ throw authenticationError;
124
+ }
125
+ }
126
+ throw new CredentialUnavailableError(`${credentialName} is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`);
127
+ });
128
+ }
129
+ }
130
+ //# sourceMappingURL=environmentCredential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentCredential.js","sourceRoot":"","sources":["../../../src/credentials/environmentCredential.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 { AuthenticationError, CredentialUnavailableError } from \"../errors.js\";\nimport { credentialLogger, formatError, formatSuccess, processEnvVars } from \"../util/logging.js\";\n\nimport { ClientCertificateCredential } from \"./clientCertificateCredential.js\";\nimport { ClientSecretCredential } from \"./clientSecretCredential.js\";\nimport type { EnvironmentCredentialOptions } from \"./environmentCredentialOptions.js\";\nimport { UsernamePasswordCredential } from \"./usernamePasswordCredential.js\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport { tracingClient } from \"../util/tracing.js\";\n\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 AllSupportedEnvironmentVariables = [\n \"AZURE_TENANT_ID\",\n \"AZURE_CLIENT_ID\",\n \"AZURE_CLIENT_SECRET\",\n \"AZURE_CLIENT_CERTIFICATE_PATH\",\n \"AZURE_CLIENT_CERTIFICATE_PASSWORD\",\n \"AZURE_USERNAME\",\n \"AZURE_PASSWORD\",\n \"AZURE_ADDITIONALLY_ALLOWED_TENANTS\",\n \"AZURE_CLIENT_SEND_CERTIFICATE_CHAIN\",\n];\n\nfunction getAdditionallyAllowedTenants(): string[] {\n const additionallyAllowedValues = process.env.AZURE_ADDITIONALLY_ALLOWED_TENANTS ?? \"\";\n return additionallyAllowedValues.split(\";\");\n}\n\nconst credentialName = \"EnvironmentCredential\";\nconst logger = credentialLogger(credentialName);\n\nexport function getSendCertificateChain(): boolean {\n const sendCertificateChain = (\n process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN ?? \"\"\n ).toLowerCase();\n const result = sendCertificateChain === \"true\" || sendCertificateChain === \"1\";\n logger.verbose(\n `AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: ${process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN}; sendCertificateChain: ${result}`,\n );\n return result;\n}\n\n/**\n * Enables authentication to Microsoft Entra ID using a client secret or certificate, or as a user\n * with a username and password.\n */\nexport class EnvironmentCredential implements TokenCredential {\n private _credential?:\n | ClientSecretCredential\n | ClientCertificateCredential\n | UsernamePasswordCredential = undefined;\n /**\n * Creates an instance of the EnvironmentCredential class and decides what credential to use depending on the available environment variables.\n *\n * Required environment variables:\n * - `AZURE_TENANT_ID`: The Microsoft Entra tenant (directory) ID.\n * - `AZURE_CLIENT_ID`: The client (application) ID of an App Registration in the tenant.\n *\n * If setting the AZURE_TENANT_ID, then you can also set the additionally allowed tenants\n * - `AZURE_ADDITIONALLY_ALLOWED_TENANTS`: For multi-tenant applications, specifies additional tenants for which the credential may acquire tokens with a single semicolon delimited string. Use * to allow all tenants.\n *\n * Environment variables used for client credential authentication:\n * - `AZURE_CLIENT_SECRET`: A client secret that was generated for the App Registration.\n * - `AZURE_CLIENT_CERTIFICATE_PATH`: The path to a PEM certificate to use during the authentication, instead of the client secret.\n * - `AZURE_CLIENT_CERTIFICATE_PASSWORD`: (optional) password for the certificate file.\n * - `AZURE_CLIENT_SEND_CERTIFICATE_CHAIN`: (optional) indicates that the certificate chain should be set in x5c header to support subject name / issuer based authentication.\n *\n * Alternatively, users can provide environment variables for username and password authentication:\n * - `AZURE_USERNAME`: Username to authenticate with.\n * - `AZURE_PASSWORD`: Password to authenticate with.\n *\n * If the environment variables required to perform the authentication are missing, a {@link CredentialUnavailableError} will be thrown.\n * If the authentication fails, or if there's an unknown error, an {@link AuthenticationError} will be thrown.\n *\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(options?: EnvironmentCredentialOptions) {\n // Keep track of any missing environment variables for error details\n\n const assigned = processEnvVars(AllSupportedEnvironmentVariables).assigned.join(\", \");\n logger.info(`Found the following environment variables: ${assigned}`);\n\n const tenantId = process.env.AZURE_TENANT_ID,\n clientId = process.env.AZURE_CLIENT_ID,\n clientSecret = process.env.AZURE_CLIENT_SECRET;\n\n const additionallyAllowedTenantIds = getAdditionallyAllowedTenants();\n const sendCertificateChain = getSendCertificateChain();\n const newOptions = { ...options, additionallyAllowedTenantIds, sendCertificateChain };\n\n if (tenantId) {\n checkTenantId(logger, tenantId);\n }\n\n if (tenantId && clientId && clientSecret) {\n logger.info(\n `Invoking ClientSecretCredential with tenant ID: ${tenantId}, clientId: ${clientId} and clientSecret: [REDACTED]`,\n );\n this._credential = new ClientSecretCredential(tenantId, clientId, clientSecret, newOptions);\n return;\n }\n\n const certificatePath = process.env.AZURE_CLIENT_CERTIFICATE_PATH;\n const certificatePassword = process.env.AZURE_CLIENT_CERTIFICATE_PASSWORD;\n if (tenantId && clientId && certificatePath) {\n logger.info(\n `Invoking ClientCertificateCredential with tenant ID: ${tenantId}, clientId: ${clientId} and certificatePath: ${certificatePath}`,\n );\n this._credential = new ClientCertificateCredential(\n tenantId,\n clientId,\n { certificatePath, certificatePassword },\n newOptions,\n );\n return;\n }\n\n const username = process.env.AZURE_USERNAME;\n const password = process.env.AZURE_PASSWORD;\n if (tenantId && clientId && username && password) {\n logger.info(\n `Invoking UsernamePasswordCredential with tenant ID: ${tenantId}, clientId: ${clientId} and username: ${username}`,\n );\n this._credential = new UsernamePasswordCredential(\n tenantId,\n clientId,\n username,\n password,\n newOptions,\n );\n }\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - Optional parameters. See {@link GetTokenOptions}.\n */\n async getToken(scopes: string | string[], options: GetTokenOptions = {}): Promise<AccessToken> {\n return tracingClient.withSpan(`${credentialName}.getToken`, options, async (newOptions) => {\n if (this._credential) {\n try {\n const result = await this._credential.getToken(scopes, newOptions);\n logger.getToken.info(formatSuccess(scopes));\n return result;\n } catch (err: any) {\n const authenticationError = new AuthenticationError(400, {\n error: `${credentialName} authentication failed. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`,\n error_description: err.message.toString().split(\"More details:\").join(\"\"),\n });\n logger.getToken.info(formatError(scopes, authenticationError));\n throw authenticationError;\n }\n }\n throw new CredentialUnavailableError(\n `${credentialName} is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`,\n );\n });\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { AuthorityValidationOptions } from "./authorityValidationOptions.js";
2
+ import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
3
+ /**
4
+ * Enables authentication to Microsoft Entra ID depending on the available environment variables.
5
+ * Defines options for the EnvironmentCredential class.
6
+ */
7
+ export interface EnvironmentCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
8
+ }
9
+ //# sourceMappingURL=environmentCredentialOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/environmentCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,4BACf,SAAQ,iCAAiC,EACvC,0BAA0B;CAAG"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=environmentCredentialOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/environmentCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Enables authentication to Microsoft Entra ID depending on the available environment variables.\n * Defines options for the EnvironmentCredential class.\n */\nexport interface EnvironmentCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {}\n"]}
@@ -0,0 +1,56 @@
1
+ import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
2
+ import type { InteractiveBrowserCredentialInBrowserOptions, InteractiveBrowserCredentialNodeOptions } from "./interactiveBrowserCredentialOptions.js";
3
+ import type { AuthenticationRecord } from "../msal/types.js";
4
+ /**
5
+ * Enables authentication to Microsoft Entra ID inside of the web browser
6
+ * using the interactive login flow.
7
+ */
8
+ export declare class InteractiveBrowserCredential implements TokenCredential {
9
+ private tenantId?;
10
+ private additionallyAllowedTenantIds;
11
+ private msalClient;
12
+ private disableAutomaticAuthentication?;
13
+ private browserCustomizationOptions;
14
+ private loginHint?;
15
+ /**
16
+ * Creates an instance of InteractiveBrowserCredential with the details needed.
17
+ *
18
+ * This credential uses the [Authorization Code Flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow).
19
+ * On Node.js, it will open a browser window while it listens for a redirect response from the authentication service.
20
+ * On browsers, it authenticates via popups. The `loginStyle` optional parameter can be set to `redirect` to authenticate by redirecting the user to an Azure secure login page, which then will redirect the user back to the web application where the authentication started.
21
+ *
22
+ * For Node.js, if a `clientId` is provided, the Microsoft Entra application will need to be configured to have a "Mobile and desktop applications" redirect endpoint.
23
+ * Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://learn.microsoft.com/entra/identity-platform/scenario-desktop-app-registration#redirect-uris).
24
+ *
25
+ * @param options - Options for configuring the client which makes the authentication requests.
26
+ */
27
+ constructor(options: InteractiveBrowserCredentialNodeOptions | InteractiveBrowserCredentialInBrowserOptions);
28
+ /**
29
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
30
+ * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
31
+ *
32
+ * If the user provided the option `disableAutomaticAuthentication`,
33
+ * once the token can't be retrieved silently,
34
+ * this method won't attempt to request user interaction to retrieve the token.
35
+ *
36
+ * @param scopes - The list of scopes for which the token will have access.
37
+ * @param options - The options used to configure any requests this
38
+ * TokenCredential implementation might make.
39
+ */
40
+ getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
41
+ /**
42
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
43
+ * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
44
+ *
45
+ * If the token can't be retrieved silently, this method will always generate a challenge for the user.
46
+ *
47
+ * On Node.js, this credential has [Proof Key for Code Exchange (PKCE)](https://datatracker.ietf.org/doc/html/rfc7636) enabled by default.
48
+ * PKCE is a security feature that mitigates authentication code interception attacks.
49
+ *
50
+ * @param scopes - The list of scopes for which the token will have access.
51
+ * @param options - The options used to configure any requests this
52
+ * TokenCredential implementation might make.
53
+ */
54
+ authenticate(scopes: string | string[], options?: GetTokenOptions): Promise<AuthenticationRecord | undefined>;
55
+ }
56
+ //# sourceMappingURL=interactiveBrowserCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveBrowserCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EACV,4CAA4C,EAC5C,uCAAuC,EACxC,MAAM,0CAA0C,CAAC;AAOlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAU7D;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,eAAe;IAClE,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,4BAA4B,CAAW;IAC/C,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,8BAA8B,CAAC,CAAU;IACjD,OAAO,CAAC,2BAA2B,CAAyE;IAC5G,OAAO,CAAC,SAAS,CAAC,CAAS;IAE3B;;;;;;;;;;;OAWG;gBAED,OAAO,EAAE,uCAAuC,GAAG,4CAA4C;IAqCjG;;;;;;;;;;;OAWG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB9F;;;;;;;;;;;;OAYG;IACG,YAAY,CAChB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAgB7C"}
@@ -0,0 +1,91 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { processMultiTenantRequest, resolveAdditionallyAllowedTenantIds, resolveTenantId, } from "../util/tenantIdUtils.js";
4
+ import { credentialLogger } from "../util/logging.js";
5
+ import { ensureScopes } from "../util/scopeUtils.js";
6
+ import { tracingClient } from "../util/tracing.js";
7
+ import { createMsalClient } from "../msal/nodeFlows/msalClient.js";
8
+ import { DeveloperSignOnClientId } from "../constants.js";
9
+ const logger = credentialLogger("InteractiveBrowserCredential");
10
+ /**
11
+ * Enables authentication to Microsoft Entra ID inside of the web browser
12
+ * using the interactive login flow.
13
+ */
14
+ export class InteractiveBrowserCredential {
15
+ /**
16
+ * Creates an instance of InteractiveBrowserCredential with the details needed.
17
+ *
18
+ * This credential uses the [Authorization Code Flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow).
19
+ * On Node.js, it will open a browser window while it listens for a redirect response from the authentication service.
20
+ * On browsers, it authenticates via popups. The `loginStyle` optional parameter can be set to `redirect` to authenticate by redirecting the user to an Azure secure login page, which then will redirect the user back to the web application where the authentication started.
21
+ *
22
+ * For Node.js, if a `clientId` is provided, the Microsoft Entra application will need to be configured to have a "Mobile and desktop applications" redirect endpoint.
23
+ * Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://learn.microsoft.com/entra/identity-platform/scenario-desktop-app-registration#redirect-uris).
24
+ *
25
+ * @param options - Options for configuring the client which makes the authentication requests.
26
+ */
27
+ constructor(options) {
28
+ var _a, _b, _c, _d, _e;
29
+ this.tenantId = resolveTenantId(logger, options.tenantId, options.clientId);
30
+ this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(options === null || options === void 0 ? void 0 : options.additionallyAllowedTenants);
31
+ const msalClientOptions = Object.assign(Object.assign({}, options), { tokenCredentialOptions: options, logger });
32
+ const ibcNodeOptions = options;
33
+ this.browserCustomizationOptions = ibcNodeOptions.browserCustomizationOptions;
34
+ this.loginHint = ibcNodeOptions.loginHint;
35
+ if ((_a = ibcNodeOptions === null || ibcNodeOptions === void 0 ? void 0 : ibcNodeOptions.brokerOptions) === null || _a === void 0 ? void 0 : _a.enabled) {
36
+ if (!((_b = ibcNodeOptions === null || ibcNodeOptions === void 0 ? void 0 : ibcNodeOptions.brokerOptions) === null || _b === void 0 ? void 0 : _b.parentWindowHandle)) {
37
+ throw new Error("In order to do WAM authentication, `parentWindowHandle` under `brokerOptions` is a required parameter");
38
+ }
39
+ else {
40
+ msalClientOptions.brokerOptions = {
41
+ enabled: true,
42
+ parentWindowHandle: ibcNodeOptions.brokerOptions.parentWindowHandle,
43
+ legacyEnableMsaPassthrough: (_c = ibcNodeOptions.brokerOptions) === null || _c === void 0 ? void 0 : _c.legacyEnableMsaPassthrough,
44
+ useDefaultBrokerAccount: (_d = ibcNodeOptions.brokerOptions) === null || _d === void 0 ? void 0 : _d.useDefaultBrokerAccount,
45
+ };
46
+ }
47
+ }
48
+ this.msalClient = createMsalClient((_e = options.clientId) !== null && _e !== void 0 ? _e : DeveloperSignOnClientId, this.tenantId, msalClientOptions);
49
+ this.disableAutomaticAuthentication = options === null || options === void 0 ? void 0 : options.disableAutomaticAuthentication;
50
+ }
51
+ /**
52
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
53
+ * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
54
+ *
55
+ * If the user provided the option `disableAutomaticAuthentication`,
56
+ * once the token can't be retrieved silently,
57
+ * this method won't attempt to request user interaction to retrieve the token.
58
+ *
59
+ * @param scopes - The list of scopes for which the token will have access.
60
+ * @param options - The options used to configure any requests this
61
+ * TokenCredential implementation might make.
62
+ */
63
+ async getToken(scopes, options = {}) {
64
+ return tracingClient.withSpan(`${this.constructor.name}.getToken`, options, async (newOptions) => {
65
+ newOptions.tenantId = processMultiTenantRequest(this.tenantId, newOptions, this.additionallyAllowedTenantIds, logger);
66
+ const arrayScopes = ensureScopes(scopes);
67
+ return this.msalClient.getTokenByInteractiveRequest(arrayScopes, Object.assign(Object.assign({}, newOptions), { disableAutomaticAuthentication: this.disableAutomaticAuthentication, browserCustomizationOptions: this.browserCustomizationOptions, loginHint: this.loginHint }));
68
+ });
69
+ }
70
+ /**
71
+ * Authenticates with Microsoft Entra ID and returns an access token if successful.
72
+ * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
73
+ *
74
+ * If the token can't be retrieved silently, this method will always generate a challenge for the user.
75
+ *
76
+ * On Node.js, this credential has [Proof Key for Code Exchange (PKCE)](https://datatracker.ietf.org/doc/html/rfc7636) enabled by default.
77
+ * PKCE is a security feature that mitigates authentication code interception attacks.
78
+ *
79
+ * @param scopes - The list of scopes for which the token will have access.
80
+ * @param options - The options used to configure any requests this
81
+ * TokenCredential implementation might make.
82
+ */
83
+ async authenticate(scopes, options = {}) {
84
+ return tracingClient.withSpan(`${this.constructor.name}.authenticate`, options, async (newOptions) => {
85
+ const arrayScopes = ensureScopes(scopes);
86
+ await this.msalClient.getTokenByInteractiveRequest(arrayScopes, Object.assign(Object.assign({}, newOptions), { disableAutomaticAuthentication: false, browserCustomizationOptions: this.browserCustomizationOptions, loginHint: this.loginHint }));
87
+ return this.msalClient.getActiveAccount();
88
+ });
89
+ }
90
+ }
91
+ //# sourceMappingURL=interactiveBrowserCredential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveBrowserCredential.js","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredential.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport type {\n InteractiveBrowserCredentialInBrowserOptions,\n InteractiveBrowserCredentialNodeOptions,\n} from \"./interactiveBrowserCredentialOptions.js\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n resolveTenantId,\n} from \"../util/tenantIdUtils.js\";\n\nimport type { AuthenticationRecord } from \"../msal/types.js\";\nimport { credentialLogger } from \"../util/logging.js\";\nimport { ensureScopes } from \"../util/scopeUtils.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport type { MsalClient, MsalClientOptions } from \"../msal/nodeFlows/msalClient.js\";\nimport { createMsalClient } from \"../msal/nodeFlows/msalClient.js\";\nimport { DeveloperSignOnClientId } from \"../constants.js\";\n\nconst logger = credentialLogger(\"InteractiveBrowserCredential\");\n\n/**\n * Enables authentication to Microsoft Entra ID inside of the web browser\n * using the interactive login flow.\n */\nexport class InteractiveBrowserCredential implements TokenCredential {\n private tenantId?: string;\n private additionallyAllowedTenantIds: string[];\n private msalClient: MsalClient;\n private disableAutomaticAuthentication?: boolean;\n private browserCustomizationOptions: InteractiveBrowserCredentialNodeOptions[\"browserCustomizationOptions\"];\n private loginHint?: string;\n\n /**\n * Creates an instance of InteractiveBrowserCredential with the details needed.\n *\n * This credential uses the [Authorization Code Flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow).\n * On Node.js, it will open a browser window while it listens for a redirect response from the authentication service.\n * On browsers, it authenticates via popups. The `loginStyle` optional parameter can be set to `redirect` to authenticate by redirecting the user to an Azure secure login page, which then will redirect the user back to the web application where the authentication started.\n *\n * For Node.js, if a `clientId` is provided, the Microsoft Entra application will need to be configured to have a \"Mobile and desktop applications\" redirect endpoint.\n * Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://learn.microsoft.com/entra/identity-platform/scenario-desktop-app-registration#redirect-uris).\n *\n * @param options - Options for configuring the client which makes the authentication requests.\n */\n constructor(\n options: InteractiveBrowserCredentialNodeOptions | InteractiveBrowserCredentialInBrowserOptions,\n ) {\n this.tenantId = resolveTenantId(logger, options.tenantId, options.clientId);\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n\n const msalClientOptions: MsalClientOptions = {\n ...options,\n tokenCredentialOptions: options,\n logger,\n };\n const ibcNodeOptions = options as InteractiveBrowserCredentialNodeOptions;\n this.browserCustomizationOptions = ibcNodeOptions.browserCustomizationOptions;\n this.loginHint = ibcNodeOptions.loginHint;\n if (ibcNodeOptions?.brokerOptions?.enabled) {\n if (!ibcNodeOptions?.brokerOptions?.parentWindowHandle) {\n throw new Error(\n \"In order to do WAM authentication, `parentWindowHandle` under `brokerOptions` is a required parameter\",\n );\n } else {\n msalClientOptions.brokerOptions = {\n enabled: true,\n parentWindowHandle: ibcNodeOptions.brokerOptions.parentWindowHandle,\n legacyEnableMsaPassthrough: ibcNodeOptions.brokerOptions?.legacyEnableMsaPassthrough,\n useDefaultBrokerAccount: ibcNodeOptions.brokerOptions?.useDefaultBrokerAccount,\n };\n }\n }\n this.msalClient = createMsalClient(\n options.clientId ?? DeveloperSignOnClientId,\n this.tenantId,\n msalClientOptions,\n );\n this.disableAutomaticAuthentication = options?.disableAutomaticAuthentication;\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 * If the user provided the option `disableAutomaticAuthentication`,\n * once the token can't be retrieved silently,\n * this method won't attempt to request user interaction to retrieve the token.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n async getToken(scopes: string | string[], options: GetTokenOptions = {}): Promise<AccessToken> {\n return tracingClient.withSpan(\n `${this.constructor.name}.getToken`,\n options,\n async (newOptions) => {\n newOptions.tenantId = processMultiTenantRequest(\n this.tenantId,\n newOptions,\n this.additionallyAllowedTenantIds,\n logger,\n );\n\n const arrayScopes = ensureScopes(scopes);\n return this.msalClient.getTokenByInteractiveRequest(arrayScopes, {\n ...newOptions,\n disableAutomaticAuthentication: this.disableAutomaticAuthentication,\n browserCustomizationOptions: this.browserCustomizationOptions,\n loginHint: this.loginHint,\n });\n },\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 * If the token can't be retrieved silently, this method will always generate a challenge for the user.\n *\n * On Node.js, this credential has [Proof Key for Code Exchange (PKCE)](https://datatracker.ietf.org/doc/html/rfc7636) enabled by default.\n * PKCE is a security feature that mitigates authentication code interception attacks.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n async authenticate(\n scopes: string | string[],\n options: GetTokenOptions = {},\n ): Promise<AuthenticationRecord | undefined> {\n return tracingClient.withSpan(\n `${this.constructor.name}.authenticate`,\n options,\n async (newOptions) => {\n const arrayScopes = ensureScopes(scopes);\n await this.msalClient.getTokenByInteractiveRequest(arrayScopes, {\n ...newOptions,\n disableAutomaticAuthentication: false, // this method should always allow user interaction\n browserCustomizationOptions: this.browserCustomizationOptions,\n loginHint: this.loginHint,\n });\n return this.msalClient.getActiveAccount();\n },\n );\n }\n}\n"]}
@@ -0,0 +1,77 @@
1
+ import type { BrowserCustomizationOptions } from "./browserCustomizationOptions.js";
2
+ import type { BrokerAuthOptions } from "./brokerAuthOptions.js";
3
+ import type { CredentialPersistenceOptions } from "./credentialPersistenceOptions.js";
4
+ import type { InteractiveCredentialOptions } from "./interactiveCredentialOptions.js";
5
+ /**
6
+ * (Browser-only feature)
7
+ * The "login style" to use in the authentication flow:
8
+ * - "redirect" redirects the user to the authentication page and then
9
+ * redirects them back to the page once authentication is completed.
10
+ * - "popup" opens a new browser window through with the redirect flow
11
+ * is initiated. The user's existing browser window does not leave
12
+ * the current page
13
+ */
14
+ export type BrowserLoginStyle = "redirect" | "popup";
15
+ /**
16
+ * Defines the common options for the InteractiveBrowserCredential class.
17
+ */
18
+ export interface InteractiveBrowserCredentialNodeOptions extends InteractiveCredentialOptions, CredentialPersistenceOptions, BrowserCustomizationOptions, BrokerAuthOptions {
19
+ /**
20
+ * Gets the redirect URI of the application. This should be same as the value
21
+ * in the application registration portal. Defaults to `window.location.href`.
22
+ * This field is no longer required for Node.js.
23
+ */
24
+ redirectUri?: string | (() => string);
25
+ /**
26
+ * The Microsoft Entra tenant (directory) ID.
27
+ */
28
+ tenantId?: string;
29
+ /**
30
+ * The Client ID of the Microsoft Entra application that users will sign into.
31
+ * It is recommended that developers register their applications and assign appropriate roles.
32
+ * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.
33
+ * If not specified, users will authenticate to an Azure development application,
34
+ * which is not recommended for production scenarios.
35
+ */
36
+ clientId?: string;
37
+ /**
38
+ * loginHint allows a user name to be pre-selected for interactive logins.
39
+ * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.
40
+ */
41
+ loginHint?: string;
42
+ }
43
+ /**
44
+ * Defines the common options for the InteractiveBrowserCredential class.
45
+ */
46
+ export interface InteractiveBrowserCredentialInBrowserOptions extends InteractiveCredentialOptions {
47
+ /**
48
+ * Gets the redirect URI of the application. This should be same as the value
49
+ * in the application registration portal. Defaults to `window.location.href`.
50
+ * This field is no longer required for Node.js.
51
+ */
52
+ redirectUri?: string | (() => string);
53
+ /**
54
+ * The Microsoft Entra tenant (directory) ID.
55
+ */
56
+ tenantId?: string;
57
+ /**
58
+ * The Client ID of the Microsoft Entra application that users will sign into.
59
+ * This parameter is required on the browser.
60
+ * Developers need to register their applications and assign appropriate roles.
61
+ * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.
62
+ */
63
+ clientId: string;
64
+ /**
65
+ * Specifies whether a redirect or a popup window should be used to
66
+ * initiate the user authentication flow. Possible values are "redirect"
67
+ * or "popup" (default) for browser and "popup" (default) for node.
68
+ *
69
+ */
70
+ loginStyle?: BrowserLoginStyle;
71
+ /**
72
+ * loginHint allows a user name to be pre-selected for interactive logins.
73
+ * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.
74
+ */
75
+ loginHint?: string;
76
+ }
77
+ //# sourceMappingURL=interactiveBrowserCredentialOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveBrowserCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,uCACf,SAAQ,4BAA4B,EAClC,4BAA4B,EAC5B,2BAA2B,EAC3B,iBAAiB;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,4CAA6C,SAAQ,4BAA4B;IAChG;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=interactiveBrowserCredentialOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveBrowserCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/interactiveBrowserCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BrowserCustomizationOptions } from \"./browserCustomizationOptions.js\";\nimport type { BrokerAuthOptions } from \"./brokerAuthOptions.js\";\nimport type { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { InteractiveCredentialOptions } from \"./interactiveCredentialOptions.js\";\n\n/**\n * (Browser-only feature)\n * The \"login style\" to use in the authentication flow:\n * - \"redirect\" redirects the user to the authentication page and then\n * redirects them back to the page once authentication is completed.\n * - \"popup\" opens a new browser window through with the redirect flow\n * is initiated. The user's existing browser window does not leave\n * the current page\n */\nexport type BrowserLoginStyle = \"redirect\" | \"popup\";\n\n/**\n * Defines the common options for the InteractiveBrowserCredential class.\n */\nexport interface InteractiveBrowserCredentialNodeOptions\n extends InteractiveCredentialOptions,\n CredentialPersistenceOptions,\n BrowserCustomizationOptions,\n BrokerAuthOptions {\n /**\n * Gets the redirect URI of the application. This should be same as the value\n * in the application registration portal. Defaults to `window.location.href`.\n * This field is no longer required for Node.js.\n */\n redirectUri?: string | (() => string);\n\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n\n /**\n * The Client ID of the Microsoft Entra application that users will sign into.\n * It is recommended that developers register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n * If not specified, users will authenticate to an Azure development application,\n * which is not recommended for production scenarios.\n */\n clientId?: string;\n\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n\n/**\n * Defines the common options for the InteractiveBrowserCredential class.\n */\nexport interface InteractiveBrowserCredentialInBrowserOptions extends InteractiveCredentialOptions {\n /**\n * Gets the redirect URI of the application. This should be same as the value\n * in the application registration portal. Defaults to `window.location.href`.\n * This field is no longer required for Node.js.\n */\n redirectUri?: string | (() => string);\n\n /**\n * The Microsoft Entra tenant (directory) ID.\n */\n tenantId?: string;\n\n /**\n * The Client ID of the Microsoft Entra application that users will sign into.\n * This parameter is required on the browser.\n * Developers need to register their applications and assign appropriate roles.\n * For more information, visit https://aka.ms/identity/AppRegistrationAndRoleAssignment.\n */\n clientId: string;\n\n /**\n * Specifies whether a redirect or a popup window should be used to\n * initiate the user authentication flow. Possible values are \"redirect\"\n * or \"popup\" (default) for browser and \"popup\" (default) for node.\n *\n */\n loginStyle?: BrowserLoginStyle;\n\n /**\n * loginHint allows a user name to be pre-selected for interactive logins.\n * Setting this option skips the account selection prompt and immediately attempts to login with the specified account.\n */\n loginHint?: string;\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import type { AuthenticationRecord } from "../msal/types.js";
2
+ import type { AuthorityValidationOptions } from "./authorityValidationOptions.js";
3
+ import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
4
+ /**
5
+ * Common constructor options for the Identity credentials that requires user interaction.
6
+ */
7
+ export interface InteractiveCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
8
+ /**
9
+ * Result of a previous authentication that can be used to retrieve the cached credentials of each individual account.
10
+ * This is necessary to provide in case the application wants to work with more than one account per
11
+ * Client ID and Tenant ID pair.
12
+ *
13
+ * This record can be retrieved by calling to the credential's `authenticate()` method, as follows:
14
+ *
15
+ * const authenticationRecord = await credential.authenticate();
16
+ *
17
+ */
18
+ authenticationRecord?: AuthenticationRecord;
19
+ /**
20
+ * Makes getToken throw if a manual authentication is necessary.
21
+ * Developers will need to call to `authenticate()` to control when to manually authenticate.
22
+ */
23
+ disableAutomaticAuthentication?: boolean;
24
+ }
25
+ //# sourceMappingURL=interactiveCredentialOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/interactiveCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,4BACf,SAAQ,iCAAiC,EACvC,0BAA0B;IAC5B;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C;;;OAGG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=interactiveCredentialOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactiveCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/interactiveCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthenticationRecord } from \"../msal/types.js\";\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Common constructor options for the Identity credentials that requires user interaction.\n */\nexport interface InteractiveCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {\n /**\n * Result of a previous authentication that can be used to retrieve the cached credentials of each individual account.\n * This is necessary to provide in case the application wants to work with more than one account per\n * Client ID and Tenant ID pair.\n *\n * This record can be retrieved by calling to the credential's `authenticate()` method, as follows:\n *\n * const authenticationRecord = await credential.authenticate();\n *\n */\n authenticationRecord?: AuthenticationRecord;\n\n /**\n * Makes getToken throw if a manual authentication is necessary.\n * Developers will need to call to `authenticate()` to control when to manually authenticate.\n */\n disableAutomaticAuthentication?: boolean;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import type { GetTokenOptions } from "@azure/core-auth";
2
+ import type { IdentityClient } from "../../client/identityClient.js";
3
+ /**
4
+ * Defines how to determine whether the Azure IMDS MSI is available.
5
+ *
6
+ * Actually getting the token once we determine IMDS is available is handled by MSAL.
7
+ */
8
+ export declare const imdsMsi: {
9
+ name: string;
10
+ isAvailable(options: {
11
+ scopes: string | string[];
12
+ identityClient?: IdentityClient;
13
+ clientId?: string;
14
+ resourceId?: string;
15
+ getTokenOptions?: GetTokenOptions;
16
+ }): Promise<boolean>;
17
+ };
18
+ //# sourceMappingURL=imdsMsi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imdsMsi.d.ts","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/imdsMsi.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAmCrE;;;;GAIG;AACH,eAAO,MAAM,OAAO;;yBAES;QACzB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,OAAO,CAAC;CAgErB,CAAC"}