@azure/identity 4.14.0-beta.1 → 4.14.0-beta.3

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 (571) hide show
  1. package/README.md +4 -40
  2. package/dist/browser/client/identityClient.d.ts +5 -4
  3. package/dist/browser/client/identityClient.d.ts.map +1 -1
  4. package/dist/browser/client/identityClient.js +56 -18
  5. package/dist/browser/client/identityClient.js.map +1 -1
  6. package/dist/browser/constants.d.ts +1 -1
  7. package/dist/browser/constants.js +1 -1
  8. package/dist/browser/constants.js.map +1 -1
  9. package/dist/browser/credentials/authorizationCodeCredential.d.ts +3 -3
  10. package/dist/browser/credentials/authorizationCodeCredential.d.ts.map +1 -0
  11. package/dist/browser/credentials/authorizationCodeCredential.js +2 -2
  12. package/dist/browser/credentials/authorizationCodeCredential.js.map +1 -0
  13. package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  14. package/dist/browser/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  15. package/dist/browser/credentials/azureCliCredential.d.ts +5 -4
  16. package/dist/browser/credentials/azureCliCredential.d.ts.map +1 -0
  17. package/dist/browser/credentials/azureCliCredential.js +3 -3
  18. package/dist/browser/credentials/azureCliCredential.js.map +1 -0
  19. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +5 -4
  20. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  21. package/dist/browser/credentials/azureDeveloperCliCredential.js +3 -3
  22. package/dist/browser/credentials/azureDeveloperCliCredential.js.map +1 -0
  23. package/dist/browser/credentials/azurePipelinesCredential.d.ts +5 -4
  24. package/dist/browser/credentials/azurePipelinesCredential.d.ts.map +1 -0
  25. package/dist/browser/credentials/azurePipelinesCredential.js +3 -3
  26. package/dist/browser/credentials/azurePipelinesCredential.js.map +1 -0
  27. package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  28. package/dist/browser/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  29. package/dist/browser/credentials/azurePowerShellCredential.d.ts +5 -4
  30. package/dist/browser/credentials/azurePowerShellCredential.d.ts.map +1 -0
  31. package/dist/browser/credentials/azurePowerShellCredential.js +3 -3
  32. package/dist/browser/credentials/azurePowerShellCredential.js.map +1 -0
  33. package/dist/browser/credentials/brokerCredential.d.ts +2 -2
  34. package/dist/browser/credentials/brokerCredential.d.ts.map +1 -1
  35. package/dist/browser/credentials/brokerCredential.js +0 -1
  36. package/dist/browser/credentials/brokerCredential.js.map +1 -1
  37. package/dist/browser/credentials/clientAssertionCredential.d.ts +5 -4
  38. package/dist/browser/credentials/clientAssertionCredential.d.ts.map +1 -0
  39. package/dist/browser/credentials/clientAssertionCredential.js +3 -3
  40. package/dist/browser/credentials/clientAssertionCredential.js.map +1 -0
  41. package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  42. package/dist/browser/credentials/clientAssertionCredentialOptions.js.map +1 -1
  43. package/dist/browser/credentials/clientCertificateCredential.d.ts +6 -4
  44. package/dist/browser/credentials/clientCertificateCredential.d.ts.map +1 -0
  45. package/dist/browser/credentials/clientCertificateCredential.js +3 -3
  46. package/dist/browser/credentials/clientCertificateCredential.js.map +1 -0
  47. package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  48. package/dist/browser/credentials/clientCertificateCredentialOptions.js.map +1 -1
  49. package/dist/browser/credentials/clientSecretCredential.d.ts +1 -1
  50. package/dist/browser/credentials/clientSecretCredential.d.ts.map +1 -0
  51. package/dist/browser/credentials/clientSecretCredential.js +1 -1
  52. package/dist/browser/credentials/clientSecretCredential.js.map +1 -0
  53. package/dist/browser/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  54. package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -1
  55. package/dist/browser/credentials/defaultAzureCredential.d.ts +3 -3
  56. package/dist/browser/credentials/defaultAzureCredential.d.ts.map +1 -0
  57. package/dist/browser/credentials/defaultAzureCredential.js +2 -2
  58. package/dist/browser/credentials/defaultAzureCredential.js.map +1 -0
  59. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  60. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  61. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -1
  62. package/dist/browser/credentials/deviceCodeCredential.d.ts +5 -4
  63. package/dist/browser/credentials/deviceCodeCredential.d.ts.map +1 -0
  64. package/dist/browser/credentials/deviceCodeCredential.js +3 -3
  65. package/dist/browser/credentials/deviceCodeCredential.js.map +1 -0
  66. package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  67. package/dist/browser/credentials/deviceCodeCredentialOptions.js.map +1 -1
  68. package/dist/browser/credentials/environmentCredential.d.ts +5 -4
  69. package/dist/browser/credentials/environmentCredential.d.ts.map +1 -0
  70. package/dist/browser/credentials/environmentCredential.js +3 -3
  71. package/dist/browser/credentials/environmentCredential.js.map +1 -0
  72. package/dist/browser/credentials/environmentCredentialOptions.d.ts.map +1 -1
  73. package/dist/browser/credentials/environmentCredentialOptions.js.map +1 -1
  74. package/dist/browser/credentials/interactiveBrowserCredential.d.ts +1 -1
  75. package/dist/browser/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  76. package/dist/browser/credentials/interactiveBrowserCredential.js +1 -1
  77. package/dist/browser/credentials/interactiveBrowserCredential.js.map +1 -0
  78. package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  79. package/dist/browser/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  80. package/dist/browser/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  81. package/dist/browser/credentials/interactiveCredentialOptions.js.map +1 -1
  82. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +9 -4
  83. package/dist/browser/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  84. package/dist/browser/credentials/managedIdentityCredential/index.js +3 -3
  85. package/dist/browser/credentials/managedIdentityCredential/index.js.map +1 -0
  86. package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  87. package/dist/browser/credentials/onBehalfOfCredential.d.ts +5 -4
  88. package/dist/browser/credentials/onBehalfOfCredential.d.ts.map +1 -0
  89. package/dist/browser/credentials/onBehalfOfCredential.js +3 -3
  90. package/dist/browser/credentials/onBehalfOfCredential.js.map +1 -0
  91. package/dist/browser/credentials/usernamePasswordCredential.d.ts +1 -1
  92. package/dist/browser/credentials/usernamePasswordCredential.d.ts.map +1 -0
  93. package/dist/browser/credentials/usernamePasswordCredential.js +1 -1
  94. package/dist/browser/credentials/usernamePasswordCredential.js.map +1 -0
  95. package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  96. package/dist/browser/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  97. package/dist/browser/credentials/visualStudioCodeCredential.d.ts +5 -4
  98. package/dist/browser/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  99. package/dist/browser/credentials/visualStudioCodeCredential.js +3 -3
  100. package/dist/browser/credentials/visualStudioCodeCredential.js.map +1 -0
  101. package/dist/browser/credentials/workloadIdentityCredential.d.ts +5 -4
  102. package/dist/browser/credentials/workloadIdentityCredential.d.ts.map +1 -0
  103. package/dist/browser/credentials/workloadIdentityCredential.js +3 -3
  104. package/dist/browser/credentials/workloadIdentityCredential.js.map +1 -0
  105. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts +2 -2
  106. package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  107. package/dist/browser/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  108. package/dist/browser/index.d.ts +33 -33
  109. package/dist/browser/index.d.ts.map +1 -1
  110. package/dist/browser/index.js.map +1 -1
  111. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  112. package/dist/browser/msal/browserFlows/msalBrowserCommon.js +2 -3
  113. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  114. package/dist/browser/msal/msal.d.ts +2 -3
  115. package/dist/browser/msal/msal.d.ts.map +1 -0
  116. package/dist/browser/msal/msal.js +2 -3
  117. package/dist/browser/msal/msal.js.map +1 -0
  118. package/dist/browser/msal/nodeFlows/msalClient.d.ts +14 -8
  119. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +1 -1
  120. package/dist/browser/msal/nodeFlows/msalClient.js +6 -6
  121. package/dist/browser/msal/nodeFlows/msalClient.js.map +1 -1
  122. package/dist/browser/msal/utils.d.ts +5 -13
  123. package/dist/browser/msal/utils.d.ts.map +1 -1
  124. package/dist/browser/msal/utils.js +12 -25
  125. package/dist/browser/msal/utils.js.map +1 -1
  126. package/dist/browser/plugins/consumer.d.ts +1 -1
  127. package/dist/browser/plugins/consumer.d.ts.map +1 -0
  128. package/dist/browser/plugins/consumer.js +1 -1
  129. package/dist/browser/plugins/consumer.js.map +1 -0
  130. package/dist/browser/util/authorityHost.d.ts +10 -0
  131. package/dist/browser/util/authorityHost.d.ts.map +1 -0
  132. package/dist/browser/util/authorityHost.js +18 -0
  133. package/dist/browser/util/authorityHost.js.map +1 -0
  134. package/dist/browser/util/processMultiTenantRequest.d.ts +3 -2
  135. package/dist/browser/util/processMultiTenantRequest.d.ts.map +1 -0
  136. package/dist/browser/util/processMultiTenantRequest.js +2 -2
  137. package/dist/browser/util/processMultiTenantRequest.js.map +1 -0
  138. package/dist/commonjs/client/identityClient.d.ts +5 -4
  139. package/dist/commonjs/client/identityClient.d.ts.map +1 -1
  140. package/dist/commonjs/client/identityClient.js +295 -252
  141. package/dist/commonjs/client/identityClient.js.map +7 -1
  142. package/dist/commonjs/constants.d.ts +1 -1
  143. package/dist/commonjs/constants.js +61 -78
  144. package/dist/commonjs/constants.js.map +7 -1
  145. package/dist/commonjs/credentials/authorityValidationOptions.js +16 -5
  146. package/dist/commonjs/credentials/authorityValidationOptions.js.map +7 -1
  147. package/dist/commonjs/credentials/authorizationCodeCredential.d.ts.map +1 -1
  148. package/dist/commonjs/credentials/authorizationCodeCredential.js +98 -75
  149. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +7 -1
  150. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  151. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +16 -5
  152. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +7 -1
  153. package/dist/commonjs/credentials/azureCliCredential.js +245 -214
  154. package/dist/commonjs/credentials/azureCliCredential.js.map +7 -1
  155. package/dist/commonjs/credentials/azureCliCredentialOptions.js +16 -5
  156. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +7 -1
  157. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts +10 -0
  158. package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  159. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +237 -202
  160. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +7 -1
  161. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +16 -5
  162. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +7 -1
  163. package/dist/commonjs/credentials/azurePipelinesCredential.js +173 -135
  164. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +7 -1
  165. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  166. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +16 -5
  167. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +7 -1
  168. package/dist/commonjs/credentials/azurePowerShellCredential.js +201 -205
  169. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +7 -1
  170. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +16 -5
  171. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +7 -1
  172. package/dist/commonjs/credentials/brokerAuthOptions.js +16 -3
  173. package/dist/commonjs/credentials/brokerAuthOptions.js.map +7 -1
  174. package/dist/commonjs/credentials/brokerCredential.d.ts +2 -2
  175. package/dist/commonjs/credentials/brokerCredential.d.ts.map +1 -1
  176. package/dist/commonjs/credentials/brokerCredential.js +103 -71
  177. package/dist/commonjs/credentials/brokerCredential.js.map +7 -1
  178. package/dist/commonjs/credentials/browserCustomizationOptions.js +16 -5
  179. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +7 -1
  180. package/dist/commonjs/credentials/chainedTokenCredential.js +113 -93
  181. package/dist/commonjs/credentials/chainedTokenCredential.js.map +7 -1
  182. package/dist/commonjs/credentials/clientAssertionCredential.d.ts.map +1 -1
  183. package/dist/commonjs/credentials/clientAssertionCredential.js +101 -64
  184. package/dist/commonjs/credentials/clientAssertionCredential.js.map +7 -1
  185. package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  186. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +16 -5
  187. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +7 -1
  188. package/dist/commonjs/credentials/clientCertificateCredential.d.ts.map +1 -1
  189. package/dist/commonjs/credentials/clientCertificateCredential.js +129 -124
  190. package/dist/commonjs/credentials/clientCertificateCredential.js.map +7 -1
  191. package/dist/commonjs/credentials/clientCertificateCredentialModels.js +16 -5
  192. package/dist/commonjs/credentials/clientCertificateCredentialModels.js.map +7 -1
  193. package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  194. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +16 -5
  195. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +7 -1
  196. package/dist/commonjs/credentials/clientSecretCredential.d.ts.map +1 -1
  197. package/dist/commonjs/credentials/clientSecretCredential.js +96 -68
  198. package/dist/commonjs/credentials/clientSecretCredential.js.map +7 -1
  199. package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  200. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +16 -5
  201. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +7 -1
  202. package/dist/commonjs/credentials/credentialPersistenceOptions.js +16 -5
  203. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +7 -1
  204. package/dist/commonjs/credentials/defaultAzureCredential.js +121 -159
  205. package/dist/commonjs/credentials/defaultAzureCredential.js.map +7 -1
  206. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +110 -140
  207. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +7 -1
  208. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  209. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  210. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +16 -5
  211. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +7 -1
  212. package/dist/commonjs/credentials/deviceCodeCredential.d.ts.map +1 -1
  213. package/dist/commonjs/credentials/deviceCodeCredential.js +132 -104
  214. package/dist/commonjs/credentials/deviceCodeCredential.js.map +7 -1
  215. package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  216. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +16 -5
  217. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +7 -1
  218. package/dist/commonjs/credentials/environmentCredential.js +157 -123
  219. package/dist/commonjs/credentials/environmentCredential.js.map +7 -1
  220. package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -1
  221. package/dist/commonjs/credentials/environmentCredentialOptions.js +16 -5
  222. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +7 -1
  223. package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts.map +1 -1
  224. package/dist/commonjs/credentials/interactiveBrowserCredential.js +144 -108
  225. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +7 -1
  226. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  227. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +16 -5
  228. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +7 -1
  229. package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  230. package/dist/commonjs/credentials/interactiveCredentialOptions.js +16 -5
  231. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +7 -1
  232. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +92 -91
  233. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +7 -1
  234. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +51 -44
  235. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +7 -1
  236. package/dist/commonjs/credentials/managedIdentityCredential/index.js +256 -242
  237. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +7 -1
  238. package/dist/commonjs/credentials/managedIdentityCredential/models.js +16 -5
  239. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +7 -1
  240. package/dist/commonjs/credentials/managedIdentityCredential/options.js +16 -5
  241. package/dist/commonjs/credentials/managedIdentityCredential/options.js.map +7 -1
  242. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +56 -39
  243. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +7 -1
  244. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +79 -75
  245. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +7 -1
  246. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +16 -5
  247. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +7 -1
  248. package/dist/commonjs/credentials/onBehalfOfCredential.d.ts.map +1 -1
  249. package/dist/commonjs/credentials/onBehalfOfCredential.js +168 -127
  250. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +7 -1
  251. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +16 -5
  252. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +7 -1
  253. package/dist/commonjs/credentials/usernamePasswordCredential.d.ts.map +1 -1
  254. package/dist/commonjs/credentials/usernamePasswordCredential.js +112 -76
  255. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +7 -1
  256. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  257. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +16 -5
  258. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +7 -1
  259. package/dist/commonjs/credentials/visualStudioCodeCredential.js +144 -132
  260. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +7 -1
  261. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +16 -5
  262. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +7 -1
  263. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +16 -5
  264. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +7 -1
  265. package/dist/commonjs/credentials/workloadIdentityCredential.js +284 -274
  266. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +7 -1
  267. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts +2 -2
  268. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  269. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +16 -5
  270. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +7 -1
  271. package/dist/commonjs/errors.js +131 -132
  272. package/dist/commonjs/errors.js.map +7 -1
  273. package/dist/commonjs/index.d.ts +33 -33
  274. package/dist/commonjs/index.d.ts.map +1 -1
  275. package/dist/commonjs/index.js +115 -67
  276. package/dist/commonjs/index.js.map +7 -1
  277. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  278. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +226 -249
  279. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +7 -1
  280. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +16 -5
  281. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +7 -1
  282. package/dist/commonjs/msal/credentials.js +16 -5
  283. package/dist/commonjs/msal/credentials.js.map +7 -1
  284. package/dist/commonjs/msal/msal.d.ts +1 -2
  285. package/dist/commonjs/msal/msal.d.ts.map +1 -1
  286. package/dist/commonjs/msal/msal.js +30 -9
  287. package/dist/commonjs/msal/msal.js.map +7 -1
  288. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +16 -3
  289. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +7 -1
  290. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts +14 -8
  291. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -1
  292. package/dist/commonjs/msal/nodeFlows/msalClient.js +450 -478
  293. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +7 -1
  294. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +140 -147
  295. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +7 -1
  296. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +16 -5
  297. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +7 -1
  298. package/dist/commonjs/msal/types.js +16 -5
  299. package/dist/commonjs/msal/types.js.map +7 -1
  300. package/dist/commonjs/msal/utils.d.ts +5 -13
  301. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  302. package/dist/commonjs/msal/utils.js +172 -226
  303. package/dist/commonjs/msal/utils.js.map +7 -1
  304. package/dist/commonjs/plugins/consumer.js +32 -40
  305. package/dist/commonjs/plugins/consumer.js.map +7 -1
  306. package/dist/commonjs/plugins/provider.js +16 -5
  307. package/dist/commonjs/plugins/provider.js.map +7 -1
  308. package/dist/commonjs/regionalAuthority.js +93 -141
  309. package/dist/commonjs/regionalAuthority.js.map +7 -1
  310. package/dist/commonjs/tokenCredentialOptions.js +16 -5
  311. package/dist/commonjs/tokenCredentialOptions.js.map +7 -1
  312. package/dist/commonjs/tokenProvider.js +52 -52
  313. package/dist/commonjs/tokenProvider.js.map +7 -1
  314. package/dist/commonjs/tsdoc-metadata.json +1 -1
  315. package/dist/commonjs/util/authorityHost.d.ts +10 -0
  316. package/dist/commonjs/util/authorityHost.d.ts.map +1 -0
  317. package/dist/commonjs/util/authorityHost.js +36 -0
  318. package/dist/commonjs/util/authorityHost.js.map +7 -0
  319. package/dist/commonjs/util/certificatesUtils.js +54 -45
  320. package/dist/commonjs/util/certificatesUtils.js.map +7 -1
  321. package/dist/commonjs/util/identityTokenEndpoint.js +32 -12
  322. package/dist/commonjs/util/identityTokenEndpoint.js.map +7 -1
  323. package/dist/commonjs/util/logging.js +91 -97
  324. package/dist/commonjs/util/logging.js.map +7 -1
  325. package/dist/commonjs/util/processMultiTenantRequest.js +43 -33
  326. package/dist/commonjs/util/processMultiTenantRequest.js.map +7 -1
  327. package/dist/commonjs/util/processUtils.js +60 -35
  328. package/dist/commonjs/util/processUtils.js.map +7 -1
  329. package/dist/commonjs/util/scopeUtils.js +39 -28
  330. package/dist/commonjs/util/scopeUtils.js.map +7 -1
  331. package/dist/commonjs/util/subscriptionUtils.js +35 -17
  332. package/dist/commonjs/util/subscriptionUtils.js.map +7 -1
  333. package/dist/commonjs/util/tenantIdUtils.js +61 -45
  334. package/dist/commonjs/util/tenantIdUtils.js.map +7 -1
  335. package/dist/commonjs/util/tracing.js +33 -16
  336. package/dist/commonjs/util/tracing.js.map +7 -1
  337. package/dist/esm/client/identityClient.d.ts +5 -4
  338. package/dist/esm/client/identityClient.d.ts.map +1 -1
  339. package/dist/esm/client/identityClient.js +56 -18
  340. package/dist/esm/client/identityClient.js.map +1 -1
  341. package/dist/esm/constants.d.ts +1 -1
  342. package/dist/esm/constants.js +1 -1
  343. package/dist/esm/constants.js.map +1 -1
  344. package/dist/esm/credentials/authorizationCodeCredential.d.ts.map +1 -1
  345. package/dist/esm/credentials/authorizationCodeCredential.js +0 -1
  346. package/dist/esm/credentials/authorizationCodeCredential.js.map +1 -1
  347. package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  348. package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  349. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts +10 -0
  350. package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  351. package/dist/esm/credentials/azureDeveloperCliCredential.js +24 -1
  352. package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -1
  353. package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  354. package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  355. package/dist/esm/credentials/brokerCredential.d.ts +2 -2
  356. package/dist/esm/credentials/brokerCredential.d.ts.map +1 -1
  357. package/dist/esm/credentials/brokerCredential.js +0 -1
  358. package/dist/esm/credentials/brokerCredential.js.map +1 -1
  359. package/dist/esm/credentials/clientAssertionCredential.d.ts.map +1 -1
  360. package/dist/esm/credentials/clientAssertionCredential.js +1 -2
  361. package/dist/esm/credentials/clientAssertionCredential.js.map +1 -1
  362. package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  363. package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -1
  364. package/dist/esm/credentials/clientCertificateCredential.d.ts.map +1 -1
  365. package/dist/esm/credentials/clientCertificateCredential.js +0 -1
  366. package/dist/esm/credentials/clientCertificateCredential.js.map +1 -1
  367. package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  368. package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -1
  369. package/dist/esm/credentials/clientSecretCredential.d.ts.map +1 -1
  370. package/dist/esm/credentials/clientSecretCredential.js +0 -1
  371. package/dist/esm/credentials/clientSecretCredential.js.map +1 -1
  372. package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  373. package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -1
  374. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  375. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  376. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -1
  377. package/dist/esm/credentials/deviceCodeCredential.d.ts.map +1 -1
  378. package/dist/esm/credentials/deviceCodeCredential.js +0 -1
  379. package/dist/esm/credentials/deviceCodeCredential.js.map +1 -1
  380. package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  381. package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -1
  382. package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -1
  383. package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -1
  384. package/dist/esm/credentials/interactiveBrowserCredential.d.ts.map +1 -1
  385. package/dist/esm/credentials/interactiveBrowserCredential.js +0 -1
  386. package/dist/esm/credentials/interactiveBrowserCredential.js.map +1 -1
  387. package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  388. package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  389. package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  390. package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -1
  391. package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  392. package/dist/esm/credentials/onBehalfOfCredential.d.ts.map +1 -1
  393. package/dist/esm/credentials/onBehalfOfCredential.js +0 -1
  394. package/dist/esm/credentials/onBehalfOfCredential.js.map +1 -1
  395. package/dist/esm/credentials/usernamePasswordCredential.d.ts.map +1 -1
  396. package/dist/esm/credentials/usernamePasswordCredential.js +0 -1
  397. package/dist/esm/credentials/usernamePasswordCredential.js.map +1 -1
  398. package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  399. package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  400. package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -1
  401. package/dist/esm/credentials/workloadIdentityCredential.js +3 -3
  402. package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -1
  403. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts +2 -2
  404. package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  405. package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  406. package/dist/esm/index.d.ts +33 -33
  407. package/dist/esm/index.d.ts.map +1 -1
  408. package/dist/esm/index.js.map +1 -1
  409. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  410. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +2 -3
  411. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  412. package/dist/esm/msal/msal.d.ts +1 -2
  413. package/dist/esm/msal/msal.d.ts.map +1 -1
  414. package/dist/esm/msal/msal.js +1 -2
  415. package/dist/esm/msal/msal.js.map +1 -1
  416. package/dist/esm/msal/nodeFlows/msalClient.d.ts +14 -8
  417. package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -1
  418. package/dist/esm/msal/nodeFlows/msalClient.js +6 -6
  419. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -1
  420. package/dist/esm/msal/utils.d.ts +5 -13
  421. package/dist/esm/msal/utils.d.ts.map +1 -1
  422. package/dist/esm/msal/utils.js +12 -25
  423. package/dist/esm/msal/utils.js.map +1 -1
  424. package/dist/esm/util/authorityHost.d.ts +10 -0
  425. package/dist/esm/util/authorityHost.d.ts.map +1 -0
  426. package/dist/esm/util/authorityHost.js +18 -0
  427. package/dist/esm/util/authorityHost.js.map +1 -0
  428. package/dist/workerd/client/identityClient.d.ts +5 -4
  429. package/dist/workerd/client/identityClient.d.ts.map +1 -1
  430. package/dist/workerd/client/identityClient.js +56 -18
  431. package/dist/workerd/client/identityClient.js.map +1 -1
  432. package/dist/workerd/constants.d.ts +1 -1
  433. package/dist/workerd/constants.js +1 -1
  434. package/dist/workerd/constants.js.map +1 -1
  435. package/dist/workerd/credentials/authorizationCodeCredential.d.ts.map +1 -1
  436. package/dist/workerd/credentials/authorizationCodeCredential.js +0 -1
  437. package/dist/workerd/credentials/authorizationCodeCredential.js.map +1 -1
  438. package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -1
  439. package/dist/workerd/credentials/authorizationCodeCredentialOptions.js.map +1 -1
  440. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts +10 -0
  441. package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -1
  442. package/dist/workerd/credentials/azureDeveloperCliCredential.js +24 -1
  443. package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -1
  444. package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -1
  445. package/dist/workerd/credentials/azurePipelinesCredentialOptions.js.map +1 -1
  446. package/dist/workerd/credentials/brokerCredential.d.ts +2 -2
  447. package/dist/workerd/credentials/brokerCredential.d.ts.map +1 -1
  448. package/dist/workerd/credentials/brokerCredential.js +0 -1
  449. package/dist/workerd/credentials/brokerCredential.js.map +1 -1
  450. package/dist/workerd/credentials/clientAssertionCredential.d.ts.map +1 -1
  451. package/dist/workerd/credentials/clientAssertionCredential.js +1 -2
  452. package/dist/workerd/credentials/clientAssertionCredential.js.map +1 -1
  453. package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts.map +1 -1
  454. package/dist/workerd/credentials/clientAssertionCredentialOptions.js.map +1 -1
  455. package/dist/workerd/credentials/clientCertificateCredential.d.ts.map +1 -1
  456. package/dist/workerd/credentials/clientCertificateCredential.js +0 -1
  457. package/dist/workerd/credentials/clientCertificateCredential.js.map +1 -1
  458. package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts.map +1 -1
  459. package/dist/workerd/credentials/clientCertificateCredentialOptions.js.map +1 -1
  460. package/dist/workerd/credentials/clientSecretCredential.d.ts.map +1 -1
  461. package/dist/workerd/credentials/clientSecretCredential.js +0 -1
  462. package/dist/workerd/credentials/clientSecretCredential.js.map +1 -1
  463. package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts.map +1 -1
  464. package/dist/workerd/credentials/clientSecretCredentialOptions.js.map +1 -1
  465. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  466. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts.map +1 -1
  467. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -1
  468. package/dist/workerd/credentials/deviceCodeCredential.d.ts.map +1 -1
  469. package/dist/workerd/credentials/deviceCodeCredential.js +0 -1
  470. package/dist/workerd/credentials/deviceCodeCredential.js.map +1 -1
  471. package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts.map +1 -1
  472. package/dist/workerd/credentials/deviceCodeCredentialOptions.js.map +1 -1
  473. package/dist/workerd/credentials/environmentCredentialOptions.d.ts.map +1 -1
  474. package/dist/workerd/credentials/environmentCredentialOptions.js.map +1 -1
  475. package/dist/workerd/credentials/interactiveBrowserCredential.d.ts.map +1 -1
  476. package/dist/workerd/credentials/interactiveBrowserCredential.js +0 -1
  477. package/dist/workerd/credentials/interactiveBrowserCredential.js.map +1 -1
  478. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -1
  479. package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  480. package/dist/workerd/credentials/interactiveCredentialOptions.d.ts.map +1 -1
  481. package/dist/workerd/credentials/interactiveCredentialOptions.js.map +1 -1
  482. package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
  483. package/dist/workerd/credentials/onBehalfOfCredential.d.ts.map +1 -1
  484. package/dist/workerd/credentials/onBehalfOfCredential.js +0 -1
  485. package/dist/workerd/credentials/onBehalfOfCredential.js.map +1 -1
  486. package/dist/workerd/credentials/usernamePasswordCredential.d.ts.map +1 -1
  487. package/dist/workerd/credentials/usernamePasswordCredential.js +0 -1
  488. package/dist/workerd/credentials/usernamePasswordCredential.js.map +1 -1
  489. package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -1
  490. package/dist/workerd/credentials/usernamePasswordCredentialOptions.js.map +1 -1
  491. package/dist/workerd/credentials/visualStudioCodeCredential.js.map +1 -1
  492. package/dist/workerd/credentials/workloadIdentityCredential.js +3 -3
  493. package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -1
  494. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts +2 -2
  495. package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -1
  496. package/dist/workerd/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  497. package/dist/workerd/index.d.ts +33 -33
  498. package/dist/workerd/index.d.ts.map +1 -1
  499. package/dist/workerd/index.js.map +1 -1
  500. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  501. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +2 -3
  502. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  503. package/dist/workerd/msal/msal.d.ts +1 -2
  504. package/dist/workerd/msal/msal.d.ts.map +1 -1
  505. package/dist/workerd/msal/msal.js +1 -2
  506. package/dist/workerd/msal/msal.js.map +1 -1
  507. package/dist/workerd/msal/nodeFlows/msalClient.d.ts +14 -8
  508. package/dist/workerd/msal/nodeFlows/msalClient.d.ts.map +1 -1
  509. package/dist/workerd/msal/nodeFlows/msalClient.js +6 -6
  510. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -1
  511. package/dist/workerd/msal/utils.d.ts +5 -13
  512. package/dist/workerd/msal/utils.d.ts.map +1 -1
  513. package/dist/workerd/msal/utils.js +12 -25
  514. package/dist/workerd/msal/utils.js.map +1 -1
  515. package/dist/workerd/util/authorityHost.d.ts +10 -0
  516. package/dist/workerd/util/authorityHost.d.ts.map +1 -0
  517. package/dist/workerd/util/authorityHost.js +18 -0
  518. package/dist/workerd/util/authorityHost.js.map +1 -0
  519. package/package.json +17 -34
  520. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +0 -1
  521. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +0 -1
  522. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +0 -1
  523. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +0 -1
  524. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +0 -1
  525. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +0 -1
  526. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +0 -1
  527. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +0 -1
  528. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +0 -1
  529. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +0 -1
  530. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +0 -1
  531. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +0 -1
  532. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +0 -1
  533. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +0 -1
  534. package/dist/browser/credentials/clientSecretCredential-browser.d.mts.map +0 -1
  535. package/dist/browser/credentials/clientSecretCredential-browser.mjs.map +0 -1
  536. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +0 -1
  537. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +0 -1
  538. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +0 -1
  539. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +0 -1
  540. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +0 -1
  541. package/dist/browser/credentials/environmentCredential-browser.mjs.map +0 -1
  542. package/dist/browser/credentials/interactiveBrowserCredential-browser.d.mts.map +0 -1
  543. package/dist/browser/credentials/interactiveBrowserCredential-browser.mjs.map +0 -1
  544. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +0 -1
  545. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +0 -1
  546. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +0 -1
  547. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +0 -1
  548. package/dist/browser/credentials/usernamePasswordCredential-browser.d.mts.map +0 -1
  549. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +0 -1
  550. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +0 -1
  551. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +0 -1
  552. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +0 -1
  553. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +0 -1
  554. package/dist/browser/msal/msal-browser.d.mts.map +0 -1
  555. package/dist/browser/msal/msal-browser.mjs.map +0 -1
  556. package/dist/browser/plugins/consumer-browser.d.mts.map +0 -1
  557. package/dist/browser/plugins/consumer-browser.mjs.map +0 -1
  558. package/dist/browser/util/authHostEnv-browser.d.mts +0 -4
  559. package/dist/browser/util/authHostEnv-browser.d.mts.map +0 -1
  560. package/dist/browser/util/authHostEnv-browser.mjs +0 -7
  561. package/dist/browser/util/authHostEnv-browser.mjs.map +0 -1
  562. package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +0 -1
  563. package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +0 -1
  564. package/dist/esm/util/authHostEnv-browser.d.mts +0 -4
  565. package/dist/esm/util/authHostEnv-browser.d.mts.map +0 -1
  566. package/dist/esm/util/authHostEnv-browser.mjs +0 -7
  567. package/dist/esm/util/authHostEnv-browser.mjs.map +0 -1
  568. package/dist/workerd/util/authHostEnv-browser.d.mts +0 -4
  569. package/dist/workerd/util/authHostEnv-browser.d.mts.map +0 -1
  570. package/dist/workerd/util/authHostEnv-browser.mjs +0 -7
  571. package/dist/workerd/util/authHostEnv-browser.mjs.map +0 -1
@@ -1,44 +1,36 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.useIdentityPlugin = useIdentityPlugin;
6
- const msalPlugins_js_1 = require("../msal/nodeFlows/msalPlugins.js");
7
- /**
8
- * The context passed to an Identity plugin. This contains objects that
9
- * plugins can use to set backend implementations.
10
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var consumer_exports = {};
19
+ __export(consumer_exports, {
20
+ useIdentityPlugin: () => useIdentityPlugin
21
+ });
22
+ module.exports = __toCommonJS(consumer_exports);
23
+ var import_msalPlugins = require("../msal/nodeFlows/msalPlugins.js");
11
24
  const pluginContext = {
12
- cachePluginControl: msalPlugins_js_1.msalNodeFlowCacheControl,
13
- nativeBrokerPluginControl: msalPlugins_js_1.msalNodeFlowNativeBrokerControl,
14
- vsCodeCredentialControl: msalPlugins_js_1.msalNodeFlowVSCodeCredentialControl,
25
+ cachePluginControl: import_msalPlugins.msalNodeFlowCacheControl,
26
+ nativeBrokerPluginControl: import_msalPlugins.msalNodeFlowNativeBrokerControl,
27
+ vsCodeCredentialControl: import_msalPlugins.msalNodeFlowVSCodeCredentialControl
15
28
  };
16
- /**
17
- * Extend Azure Identity with additional functionality. Pass a plugin from
18
- * a plugin package, such as:
19
- *
20
- * - `@azure/identity-cache-persistence`: provides persistent token caching
21
- * - `@azure/identity-vscode`: provides the dependencies of
22
- * `VisualStudioCodeCredential` and enables it
23
- *
24
- * Example:
25
- *
26
- * ```ts snippet:consumer_example
27
- * import { useIdentityPlugin, DeviceCodeCredential } from "@azure/identity";
28
- *
29
- * useIdentityPlugin(cachePersistencePlugin);
30
- * // The plugin has the capability to extend `DeviceCodeCredential` and to
31
- * // add middleware to the underlying credentials, such as persistence.
32
- * const credential = new DeviceCodeCredential({
33
- * tokenCachePersistenceOptions: {
34
- * enabled: true,
35
- * },
36
- * });
37
- * ```
38
- *
39
- * @param plugin - the plugin to register
40
- */
41
29
  function useIdentityPlugin(plugin) {
42
- plugin(pluginContext);
30
+ plugin(pluginContext);
43
31
  }
44
- //# sourceMappingURL=consumer.js.map
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ useIdentityPlugin
35
+ });
36
+ //# sourceMappingURL=consumer.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"consumer.js","sourceRoot":"","sources":["../../../src/plugins/consumer.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA4ClC,8CAEC;AA3CD,qEAI0C;AAE1C;;;GAGG;AACH,MAAM,aAAa,GAAuB;IACxC,kBAAkB,EAAE,yCAAwB;IAC5C,yBAAyB,EAAE,gDAA+B;IAC1D,uBAAuB,EAAE,oDAAmC;CAC7D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,iBAAiB,CAAC,MAAsB;IACtD,MAAM,CAAC,aAAa,CAAC,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzurePluginContext, IdentityPlugin } from \"./provider.js\";\nimport {\n msalNodeFlowCacheControl,\n msalNodeFlowNativeBrokerControl,\n msalNodeFlowVSCodeCredentialControl,\n} from \"../msal/nodeFlows/msalPlugins.js\";\n\n/**\n * The context passed to an Identity plugin. This contains objects that\n * plugins can use to set backend implementations.\n */\nconst pluginContext: AzurePluginContext = {\n cachePluginControl: msalNodeFlowCacheControl,\n nativeBrokerPluginControl: msalNodeFlowNativeBrokerControl,\n vsCodeCredentialControl: msalNodeFlowVSCodeCredentialControl,\n};\n\n/**\n * Extend Azure Identity with additional functionality. Pass a plugin from\n * a plugin package, such as:\n *\n * - `@azure/identity-cache-persistence`: provides persistent token caching\n * - `@azure/identity-vscode`: provides the dependencies of\n * `VisualStudioCodeCredential` and enables it\n *\n * Example:\n *\n * ```ts snippet:consumer_example\n * import { useIdentityPlugin, DeviceCodeCredential } from \"@azure/identity\";\n *\n * useIdentityPlugin(cachePersistencePlugin);\n * // The plugin has the capability to extend `DeviceCodeCredential` and to\n * // add middleware to the underlying credentials, such as persistence.\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n * ```\n *\n * @param plugin - the plugin to register\n */\nexport function useIdentityPlugin(plugin: IdentityPlugin): void {\n plugin(pluginContext);\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugins/consumer.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzurePluginContext, IdentityPlugin } from \"./provider.js\";\nimport {\n msalNodeFlowCacheControl,\n msalNodeFlowNativeBrokerControl,\n msalNodeFlowVSCodeCredentialControl,\n} from \"../msal/nodeFlows/msalPlugins.js\";\n\n/**\n * The context passed to an Identity plugin. This contains objects that\n * plugins can use to set backend implementations.\n */\nconst pluginContext: AzurePluginContext = {\n cachePluginControl: msalNodeFlowCacheControl,\n nativeBrokerPluginControl: msalNodeFlowNativeBrokerControl,\n vsCodeCredentialControl: msalNodeFlowVSCodeCredentialControl,\n};\n\n/**\n * Extend Azure Identity with additional functionality. Pass a plugin from\n * a plugin package, such as:\n *\n * - `@azure/identity-cache-persistence`: provides persistent token caching\n * - `@azure/identity-vscode`: provides the dependencies of\n * `VisualStudioCodeCredential` and enables it\n *\n * Example:\n *\n * ```ts snippet:consumer_example\n * import { useIdentityPlugin, DeviceCodeCredential } from \"@azure/identity\";\n *\n * useIdentityPlugin(cachePersistencePlugin);\n * // The plugin has the capability to extend `DeviceCodeCredential` and to\n * // add middleware to the underlying credentials, such as persistence.\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n * ```\n *\n * @param plugin - the plugin to register\n */\nexport function useIdentityPlugin(plugin: IdentityPlugin): void {\n plugin(pluginContext);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,yBAIO;AAMP,MAAM,gBAAoC;AAAA,EACxC,oBAAoB;AAAA,EACpB,2BAA2B;AAAA,EAC3B,yBAAyB;AAC3B;AA2BO,SAAS,kBAAkB,QAA8B;AAC9D,SAAO,aAAa;AACtB;",
6
+ "names": []
7
+ }
@@ -1,5 +1,16 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=provider.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var provider_exports = {};
15
+ module.exports = __toCommonJS(provider_exports);
16
+ //# sourceMappingURL=provider.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/plugins/provider.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCachePersistenceOptions } from \"../msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\n/**\n * The type of an Azure Identity plugin, a function accepting a plugin\n * context.\n */\nexport type IdentityPlugin = (context: unknown) => void;\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\nexport interface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n\nexport interface NativeBrokerPluginControl {\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\nexport interface VisualStudioCodeCredentialControl {\n setVSCodeAuthRecordPath(path: string): void;\n setVSCodeBroker(broker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Context options passed to a plugin during initialization.\n *\n * Plugin authors are responsible for casting their plugin context values\n * to this type.\n *\n * @internal\n */\nexport interface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugins/provider.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCachePersistenceOptions } from \"../msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\n/**\n * The type of an Azure Identity plugin, a function accepting a plugin\n * context.\n */\nexport type IdentityPlugin = (context: unknown) => void;\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\nexport interface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n\nexport interface NativeBrokerPluginControl {\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\nexport interface VisualStudioCodeCredentialControl {\n setVSCodeAuthRecordPath(path: string): void;\n setVSCodeBroker(broker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Context options passed to a plugin during initialization.\n *\n * Plugin authors are responsible for casting their plugin context values\n * to this type.\n *\n * @internal\n */\nexport interface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,143 +1,95 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.RegionalAuthority = void 0;
6
- exports.calculateRegionalAuthority = calculateRegionalAuthority;
7
- /**
8
- * Helps specify a regional authority, or "AutoDiscoverRegion" to auto-detect the region.
9
- */
10
- var RegionalAuthority;
11
- (function (RegionalAuthority) {
12
- /** Instructs MSAL to attempt to discover the region */
13
- RegionalAuthority["AutoDiscoverRegion"] = "AutoDiscoverRegion";
14
- /** Uses the {@link RegionalAuthority} for the Azure 'westus' region. */
15
- RegionalAuthority["USWest"] = "westus";
16
- /** Uses the {@link RegionalAuthority} for the Azure 'westus2' region. */
17
- RegionalAuthority["USWest2"] = "westus2";
18
- /** Uses the {@link RegionalAuthority} for the Azure 'centralus' region. */
19
- RegionalAuthority["USCentral"] = "centralus";
20
- /** Uses the {@link RegionalAuthority} for the Azure 'eastus' region. */
21
- RegionalAuthority["USEast"] = "eastus";
22
- /** Uses the {@link RegionalAuthority} for the Azure 'eastus2' region. */
23
- RegionalAuthority["USEast2"] = "eastus2";
24
- /** Uses the {@link RegionalAuthority} for the Azure 'northcentralus' region. */
25
- RegionalAuthority["USNorthCentral"] = "northcentralus";
26
- /** Uses the {@link RegionalAuthority} for the Azure 'southcentralus' region. */
27
- RegionalAuthority["USSouthCentral"] = "southcentralus";
28
- /** Uses the {@link RegionalAuthority} for the Azure 'westcentralus' region. */
29
- RegionalAuthority["USWestCentral"] = "westcentralus";
30
- /** Uses the {@link RegionalAuthority} for the Azure 'canadacentral' region. */
31
- RegionalAuthority["CanadaCentral"] = "canadacentral";
32
- /** Uses the {@link RegionalAuthority} for the Azure 'canadaeast' region. */
33
- RegionalAuthority["CanadaEast"] = "canadaeast";
34
- /** Uses the {@link RegionalAuthority} for the Azure 'brazilsouth' region. */
35
- RegionalAuthority["BrazilSouth"] = "brazilsouth";
36
- /** Uses the {@link RegionalAuthority} for the Azure 'northeurope' region. */
37
- RegionalAuthority["EuropeNorth"] = "northeurope";
38
- /** Uses the {@link RegionalAuthority} for the Azure 'westeurope' region. */
39
- RegionalAuthority["EuropeWest"] = "westeurope";
40
- /** Uses the {@link RegionalAuthority} for the Azure 'uksouth' region. */
41
- RegionalAuthority["UKSouth"] = "uksouth";
42
- /** Uses the {@link RegionalAuthority} for the Azure 'ukwest' region. */
43
- RegionalAuthority["UKWest"] = "ukwest";
44
- /** Uses the {@link RegionalAuthority} for the Azure 'francecentral' region. */
45
- RegionalAuthority["FranceCentral"] = "francecentral";
46
- /** Uses the {@link RegionalAuthority} for the Azure 'francesouth' region. */
47
- RegionalAuthority["FranceSouth"] = "francesouth";
48
- /** Uses the {@link RegionalAuthority} for the Azure 'switzerlandnorth' region. */
49
- RegionalAuthority["SwitzerlandNorth"] = "switzerlandnorth";
50
- /** Uses the {@link RegionalAuthority} for the Azure 'switzerlandwest' region. */
51
- RegionalAuthority["SwitzerlandWest"] = "switzerlandwest";
52
- /** Uses the {@link RegionalAuthority} for the Azure 'germanynorth' region. */
53
- RegionalAuthority["GermanyNorth"] = "germanynorth";
54
- /** Uses the {@link RegionalAuthority} for the Azure 'germanywestcentral' region. */
55
- RegionalAuthority["GermanyWestCentral"] = "germanywestcentral";
56
- /** Uses the {@link RegionalAuthority} for the Azure 'norwaywest' region. */
57
- RegionalAuthority["NorwayWest"] = "norwaywest";
58
- /** Uses the {@link RegionalAuthority} for the Azure 'norwayeast' region. */
59
- RegionalAuthority["NorwayEast"] = "norwayeast";
60
- /** Uses the {@link RegionalAuthority} for the Azure 'eastasia' region. */
61
- RegionalAuthority["AsiaEast"] = "eastasia";
62
- /** Uses the {@link RegionalAuthority} for the Azure 'southeastasia' region. */
63
- RegionalAuthority["AsiaSouthEast"] = "southeastasia";
64
- /** Uses the {@link RegionalAuthority} for the Azure 'japaneast' region. */
65
- RegionalAuthority["JapanEast"] = "japaneast";
66
- /** Uses the {@link RegionalAuthority} for the Azure 'japanwest' region. */
67
- RegionalAuthority["JapanWest"] = "japanwest";
68
- /** Uses the {@link RegionalAuthority} for the Azure 'australiaeast' region. */
69
- RegionalAuthority["AustraliaEast"] = "australiaeast";
70
- /** Uses the {@link RegionalAuthority} for the Azure 'australiasoutheast' region. */
71
- RegionalAuthority["AustraliaSouthEast"] = "australiasoutheast";
72
- /** Uses the {@link RegionalAuthority} for the Azure 'australiacentral' region. */
73
- RegionalAuthority["AustraliaCentral"] = "australiacentral";
74
- /** Uses the {@link RegionalAuthority} for the Azure 'australiacentral2' region. */
75
- RegionalAuthority["AustraliaCentral2"] = "australiacentral2";
76
- /** Uses the {@link RegionalAuthority} for the Azure 'centralindia' region. */
77
- RegionalAuthority["IndiaCentral"] = "centralindia";
78
- /** Uses the {@link RegionalAuthority} for the Azure 'southindia' region. */
79
- RegionalAuthority["IndiaSouth"] = "southindia";
80
- /** Uses the {@link RegionalAuthority} for the Azure 'westindia' region. */
81
- RegionalAuthority["IndiaWest"] = "westindia";
82
- /** Uses the {@link RegionalAuthority} for the Azure 'koreasouth' region. */
83
- RegionalAuthority["KoreaSouth"] = "koreasouth";
84
- /** Uses the {@link RegionalAuthority} for the Azure 'koreacentral' region. */
85
- RegionalAuthority["KoreaCentral"] = "koreacentral";
86
- /** Uses the {@link RegionalAuthority} for the Azure 'uaecentral' region. */
87
- RegionalAuthority["UAECentral"] = "uaecentral";
88
- /** Uses the {@link RegionalAuthority} for the Azure 'uaenorth' region. */
89
- RegionalAuthority["UAENorth"] = "uaenorth";
90
- /** Uses the {@link RegionalAuthority} for the Azure 'southafricanorth' region. */
91
- RegionalAuthority["SouthAfricaNorth"] = "southafricanorth";
92
- /** Uses the {@link RegionalAuthority} for the Azure 'southafricawest' region. */
93
- RegionalAuthority["SouthAfricaWest"] = "southafricawest";
94
- /** Uses the {@link RegionalAuthority} for the Azure 'chinanorth' region. */
95
- RegionalAuthority["ChinaNorth"] = "chinanorth";
96
- /** Uses the {@link RegionalAuthority} for the Azure 'chinaeast' region. */
97
- RegionalAuthority["ChinaEast"] = "chinaeast";
98
- /** Uses the {@link RegionalAuthority} for the Azure 'chinanorth2' region. */
99
- RegionalAuthority["ChinaNorth2"] = "chinanorth2";
100
- /** Uses the {@link RegionalAuthority} for the Azure 'chinaeast2' region. */
101
- RegionalAuthority["ChinaEast2"] = "chinaeast2";
102
- /** Uses the {@link RegionalAuthority} for the Azure 'germanycentral' region. */
103
- RegionalAuthority["GermanyCentral"] = "germanycentral";
104
- /** Uses the {@link RegionalAuthority} for the Azure 'germanynortheast' region. */
105
- RegionalAuthority["GermanyNorthEast"] = "germanynortheast";
106
- /** Uses the {@link RegionalAuthority} for the Azure 'usgovvirginia' region. */
107
- RegionalAuthority["GovernmentUSVirginia"] = "usgovvirginia";
108
- /** Uses the {@link RegionalAuthority} for the Azure 'usgoviowa' region. */
109
- RegionalAuthority["GovernmentUSIowa"] = "usgoviowa";
110
- /** Uses the {@link RegionalAuthority} for the Azure 'usgovarizona' region. */
111
- RegionalAuthority["GovernmentUSArizona"] = "usgovarizona";
112
- /** Uses the {@link RegionalAuthority} for the Azure 'usgovtexas' region. */
113
- RegionalAuthority["GovernmentUSTexas"] = "usgovtexas";
114
- /** Uses the {@link RegionalAuthority} for the Azure 'usdodeast' region. */
115
- RegionalAuthority["GovernmentUSDodEast"] = "usdodeast";
116
- /** Uses the {@link RegionalAuthority} for the Azure 'usdodcentral' region. */
117
- RegionalAuthority["GovernmentUSDodCentral"] = "usdodcentral";
118
- })(RegionalAuthority || (exports.RegionalAuthority = RegionalAuthority = {}));
119
- /**
120
- * Calculates the correct regional authority based on the supplied value
121
- * and the AZURE_REGIONAL_AUTHORITY_NAME environment variable.
122
- *
123
- * Values will be returned verbatim, except for {@link RegionalAuthority.AutoDiscoverRegion}
124
- * which is mapped to a value MSAL can understand.
125
- *
126
- * @internal
127
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var regionalAuthority_exports = {};
19
+ __export(regionalAuthority_exports, {
20
+ RegionalAuthority: () => RegionalAuthority,
21
+ calculateRegionalAuthority: () => calculateRegionalAuthority
22
+ });
23
+ module.exports = __toCommonJS(regionalAuthority_exports);
24
+ var RegionalAuthority = /* @__PURE__ */ ((RegionalAuthority2) => {
25
+ RegionalAuthority2["AutoDiscoverRegion"] = "AutoDiscoverRegion";
26
+ RegionalAuthority2["USWest"] = "westus";
27
+ RegionalAuthority2["USWest2"] = "westus2";
28
+ RegionalAuthority2["USCentral"] = "centralus";
29
+ RegionalAuthority2["USEast"] = "eastus";
30
+ RegionalAuthority2["USEast2"] = "eastus2";
31
+ RegionalAuthority2["USNorthCentral"] = "northcentralus";
32
+ RegionalAuthority2["USSouthCentral"] = "southcentralus";
33
+ RegionalAuthority2["USWestCentral"] = "westcentralus";
34
+ RegionalAuthority2["CanadaCentral"] = "canadacentral";
35
+ RegionalAuthority2["CanadaEast"] = "canadaeast";
36
+ RegionalAuthority2["BrazilSouth"] = "brazilsouth";
37
+ RegionalAuthority2["EuropeNorth"] = "northeurope";
38
+ RegionalAuthority2["EuropeWest"] = "westeurope";
39
+ RegionalAuthority2["UKSouth"] = "uksouth";
40
+ RegionalAuthority2["UKWest"] = "ukwest";
41
+ RegionalAuthority2["FranceCentral"] = "francecentral";
42
+ RegionalAuthority2["FranceSouth"] = "francesouth";
43
+ RegionalAuthority2["SwitzerlandNorth"] = "switzerlandnorth";
44
+ RegionalAuthority2["SwitzerlandWest"] = "switzerlandwest";
45
+ RegionalAuthority2["GermanyNorth"] = "germanynorth";
46
+ RegionalAuthority2["GermanyWestCentral"] = "germanywestcentral";
47
+ RegionalAuthority2["NorwayWest"] = "norwaywest";
48
+ RegionalAuthority2["NorwayEast"] = "norwayeast";
49
+ RegionalAuthority2["AsiaEast"] = "eastasia";
50
+ RegionalAuthority2["AsiaSouthEast"] = "southeastasia";
51
+ RegionalAuthority2["JapanEast"] = "japaneast";
52
+ RegionalAuthority2["JapanWest"] = "japanwest";
53
+ RegionalAuthority2["AustraliaEast"] = "australiaeast";
54
+ RegionalAuthority2["AustraliaSouthEast"] = "australiasoutheast";
55
+ RegionalAuthority2["AustraliaCentral"] = "australiacentral";
56
+ RegionalAuthority2["AustraliaCentral2"] = "australiacentral2";
57
+ RegionalAuthority2["IndiaCentral"] = "centralindia";
58
+ RegionalAuthority2["IndiaSouth"] = "southindia";
59
+ RegionalAuthority2["IndiaWest"] = "westindia";
60
+ RegionalAuthority2["KoreaSouth"] = "koreasouth";
61
+ RegionalAuthority2["KoreaCentral"] = "koreacentral";
62
+ RegionalAuthority2["UAECentral"] = "uaecentral";
63
+ RegionalAuthority2["UAENorth"] = "uaenorth";
64
+ RegionalAuthority2["SouthAfricaNorth"] = "southafricanorth";
65
+ RegionalAuthority2["SouthAfricaWest"] = "southafricawest";
66
+ RegionalAuthority2["ChinaNorth"] = "chinanorth";
67
+ RegionalAuthority2["ChinaEast"] = "chinaeast";
68
+ RegionalAuthority2["ChinaNorth2"] = "chinanorth2";
69
+ RegionalAuthority2["ChinaEast2"] = "chinaeast2";
70
+ RegionalAuthority2["GermanyCentral"] = "germanycentral";
71
+ RegionalAuthority2["GermanyNorthEast"] = "germanynortheast";
72
+ RegionalAuthority2["GovernmentUSVirginia"] = "usgovvirginia";
73
+ RegionalAuthority2["GovernmentUSIowa"] = "usgoviowa";
74
+ RegionalAuthority2["GovernmentUSArizona"] = "usgovarizona";
75
+ RegionalAuthority2["GovernmentUSTexas"] = "usgovtexas";
76
+ RegionalAuthority2["GovernmentUSDodEast"] = "usdodeast";
77
+ RegionalAuthority2["GovernmentUSDodCentral"] = "usdodcentral";
78
+ return RegionalAuthority2;
79
+ })(RegionalAuthority || {});
128
80
  function calculateRegionalAuthority(regionalAuthority) {
129
- // Note: as of today only 3 credentials support regional authority, and the parameter
130
- // is not exposed via the public API. Regional Authority is _only_ supported
131
- // via the AZURE_REGIONAL_AUTHORITY_NAME env var and _only_ for: ClientSecretCredential, ClientCertificateCredential, and ClientAssertionCredential.
132
- // Accepting the regionalAuthority parameter will allow us to support it in the future.
133
- let azureRegion = regionalAuthority;
134
- if (azureRegion === undefined &&
135
- globalThis.process?.env?.AZURE_REGIONAL_AUTHORITY_NAME !== undefined) {
136
- azureRegion = process.env.AZURE_REGIONAL_AUTHORITY_NAME;
137
- }
138
- if (azureRegion === RegionalAuthority.AutoDiscoverRegion) {
139
- return "AUTO_DISCOVER";
140
- }
141
- return azureRegion;
81
+ let azureRegion = regionalAuthority;
82
+ if (azureRegion === void 0 && globalThis.process?.env?.AZURE_REGIONAL_AUTHORITY_NAME !== void 0) {
83
+ azureRegion = process.env.AZURE_REGIONAL_AUTHORITY_NAME;
84
+ }
85
+ if (azureRegion === "AutoDiscoverRegion" /* AutoDiscoverRegion */) {
86
+ return "AUTO_DISCOVER";
87
+ }
88
+ return azureRegion;
142
89
  }
143
- //# sourceMappingURL=regionalAuthority.js.map
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ RegionalAuthority,
93
+ calculateRegionalAuthority
94
+ });
95
+ //# sourceMappingURL=regionalAuthority.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"regionalAuthority.js","sourceRoot":"","sources":["../../src/regionalAuthority.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA2HlC,gEAoBC;AA7ID;;GAEG;AACH,IAAY,iBA2GX;AA3GD,WAAY,iBAAiB;IAC3B,uDAAuD;IACvD,8DAAyC,CAAA;IACzC,wEAAwE;IACxE,sCAAiB,CAAA;IACjB,yEAAyE;IACzE,wCAAmB,CAAA;IACnB,2EAA2E;IAC3E,4CAAuB,CAAA;IACvB,wEAAwE;IACxE,sCAAiB,CAAA;IACjB,yEAAyE;IACzE,wCAAmB,CAAA;IACnB,gFAAgF;IAChF,sDAAiC,CAAA;IACjC,gFAAgF;IAChF,sDAAiC,CAAA;IACjC,+EAA+E;IAC/E,oDAA+B,CAAA;IAC/B,+EAA+E;IAC/E,oDAA+B,CAAA;IAC/B,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,6EAA6E;IAC7E,gDAA2B,CAAA;IAC3B,6EAA6E;IAC7E,gDAA2B,CAAA;IAC3B,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,yEAAyE;IACzE,wCAAmB,CAAA;IACnB,wEAAwE;IACxE,sCAAiB,CAAA;IACjB,+EAA+E;IAC/E,oDAA+B,CAAA;IAC/B,6EAA6E;IAC7E,gDAA2B,CAAA;IAC3B,kFAAkF;IAClF,0DAAqC,CAAA;IACrC,iFAAiF;IACjF,wDAAmC,CAAA;IACnC,8EAA8E;IAC9E,kDAA6B,CAAA;IAC7B,oFAAoF;IACpF,8DAAyC,CAAA;IACzC,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,0EAA0E;IAC1E,0CAAqB,CAAA;IACrB,+EAA+E;IAC/E,oDAA+B,CAAA;IAC/B,2EAA2E;IAC3E,4CAAuB,CAAA;IACvB,2EAA2E;IAC3E,4CAAuB,CAAA;IACvB,+EAA+E;IAC/E,oDAA+B,CAAA;IAC/B,oFAAoF;IACpF,8DAAyC,CAAA;IACzC,kFAAkF;IAClF,0DAAqC,CAAA;IACrC,mFAAmF;IACnF,4DAAuC,CAAA;IACvC,8EAA8E;IAC9E,kDAA6B,CAAA;IAC7B,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,2EAA2E;IAC3E,4CAAuB,CAAA;IACvB,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,8EAA8E;IAC9E,kDAA6B,CAAA;IAC7B,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,0EAA0E;IAC1E,0CAAqB,CAAA;IACrB,kFAAkF;IAClF,0DAAqC,CAAA;IACrC,iFAAiF;IACjF,wDAAmC,CAAA;IACnC,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,2EAA2E;IAC3E,4CAAuB,CAAA;IACvB,6EAA6E;IAC7E,gDAA2B,CAAA;IAC3B,4EAA4E;IAC5E,8CAAyB,CAAA;IACzB,gFAAgF;IAChF,sDAAiC,CAAA;IACjC,kFAAkF;IAClF,0DAAqC,CAAA;IACrC,+EAA+E;IAC/E,2DAAsC,CAAA;IACtC,2EAA2E;IAC3E,mDAA8B,CAAA;IAC9B,8EAA8E;IAC9E,yDAAoC,CAAA;IACpC,4EAA4E;IAC5E,qDAAgC,CAAA;IAChC,2EAA2E;IAC3E,sDAAiC,CAAA;IACjC,8EAA8E;IAC9E,4DAAuC,CAAA;AACzC,CAAC,EA3GW,iBAAiB,iCAAjB,iBAAiB,QA2G5B;AAED;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CAAC,iBAA0B;IACnE,qFAAqF;IACrF,4EAA4E;IAC5E,oJAAoJ;IAEpJ,uFAAuF;IACvF,IAAI,WAAW,GAAG,iBAAiB,CAAC;IAEpC,IACE,WAAW,KAAK,SAAS;QACzB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,6BAA6B,KAAK,SAAS,EACpE,CAAC;QACD,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;IAC1D,CAAC;IAED,IAAI,WAAW,KAAK,iBAAiB,CAAC,kBAAkB,EAAE,CAAC;QACzD,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Helps specify a regional authority, or \"AutoDiscoverRegion\" to auto-detect the region.\n */\nexport enum RegionalAuthority {\n /** Instructs MSAL to attempt to discover the region */\n AutoDiscoverRegion = \"AutoDiscoverRegion\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westus' region. */\n USWest = \"westus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westus2' region. */\n USWest2 = \"westus2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'centralus' region. */\n USCentral = \"centralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'eastus' region. */\n USEast = \"eastus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'eastus2' region. */\n USEast2 = \"eastus2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'northcentralus' region. */\n USNorthCentral = \"northcentralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southcentralus' region. */\n USSouthCentral = \"southcentralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westcentralus' region. */\n USWestCentral = \"westcentralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'canadacentral' region. */\n CanadaCentral = \"canadacentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'canadaeast' region. */\n CanadaEast = \"canadaeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'brazilsouth' region. */\n BrazilSouth = \"brazilsouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'northeurope' region. */\n EuropeNorth = \"northeurope\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westeurope' region. */\n EuropeWest = \"westeurope\",\n /** Uses the {@link RegionalAuthority} for the Azure 'uksouth' region. */\n UKSouth = \"uksouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'ukwest' region. */\n UKWest = \"ukwest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'francecentral' region. */\n FranceCentral = \"francecentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'francesouth' region. */\n FranceSouth = \"francesouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'switzerlandnorth' region. */\n SwitzerlandNorth = \"switzerlandnorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'switzerlandwest' region. */\n SwitzerlandWest = \"switzerlandwest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanynorth' region. */\n GermanyNorth = \"germanynorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanywestcentral' region. */\n GermanyWestCentral = \"germanywestcentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'norwaywest' region. */\n NorwayWest = \"norwaywest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'norwayeast' region. */\n NorwayEast = \"norwayeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'eastasia' region. */\n AsiaEast = \"eastasia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southeastasia' region. */\n AsiaSouthEast = \"southeastasia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'japaneast' region. */\n JapanEast = \"japaneast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'japanwest' region. */\n JapanWest = \"japanwest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiaeast' region. */\n AustraliaEast = \"australiaeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiasoutheast' region. */\n AustraliaSouthEast = \"australiasoutheast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiacentral' region. */\n AustraliaCentral = \"australiacentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiacentral2' region. */\n AustraliaCentral2 = \"australiacentral2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'centralindia' region. */\n IndiaCentral = \"centralindia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southindia' region. */\n IndiaSouth = \"southindia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westindia' region. */\n IndiaWest = \"westindia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'koreasouth' region. */\n KoreaSouth = \"koreasouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'koreacentral' region. */\n KoreaCentral = \"koreacentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'uaecentral' region. */\n UAECentral = \"uaecentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'uaenorth' region. */\n UAENorth = \"uaenorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southafricanorth' region. */\n SouthAfricaNorth = \"southafricanorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southafricawest' region. */\n SouthAfricaWest = \"southafricawest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinanorth' region. */\n ChinaNorth = \"chinanorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinaeast' region. */\n ChinaEast = \"chinaeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinanorth2' region. */\n ChinaNorth2 = \"chinanorth2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinaeast2' region. */\n ChinaEast2 = \"chinaeast2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanycentral' region. */\n GermanyCentral = \"germanycentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanynortheast' region. */\n GermanyNorthEast = \"germanynortheast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgovvirginia' region. */\n GovernmentUSVirginia = \"usgovvirginia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgoviowa' region. */\n GovernmentUSIowa = \"usgoviowa\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgovarizona' region. */\n GovernmentUSArizona = \"usgovarizona\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgovtexas' region. */\n GovernmentUSTexas = \"usgovtexas\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usdodeast' region. */\n GovernmentUSDodEast = \"usdodeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usdodcentral' region. */\n GovernmentUSDodCentral = \"usdodcentral\",\n}\n\n/**\n * Calculates the correct regional authority based on the supplied value\n * and the AZURE_REGIONAL_AUTHORITY_NAME environment variable.\n *\n * Values will be returned verbatim, except for {@link RegionalAuthority.AutoDiscoverRegion}\n * which is mapped to a value MSAL can understand.\n *\n * @internal\n */\nexport function calculateRegionalAuthority(regionalAuthority?: string): string | undefined {\n // Note: as of today only 3 credentials support regional authority, and the parameter\n // is not exposed via the public API. Regional Authority is _only_ supported\n // via the AZURE_REGIONAL_AUTHORITY_NAME env var and _only_ for: ClientSecretCredential, ClientCertificateCredential, and ClientAssertionCredential.\n\n // Accepting the regionalAuthority parameter will allow us to support it in the future.\n let azureRegion = regionalAuthority;\n\n if (\n azureRegion === undefined &&\n globalThis.process?.env?.AZURE_REGIONAL_AUTHORITY_NAME !== undefined\n ) {\n azureRegion = process.env.AZURE_REGIONAL_AUTHORITY_NAME;\n }\n\n if (azureRegion === RegionalAuthority.AutoDiscoverRegion) {\n return \"AUTO_DISCOVER\";\n }\n\n return azureRegion;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/regionalAuthority.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Helps specify a regional authority, or \"AutoDiscoverRegion\" to auto-detect the region.\n */\nexport enum RegionalAuthority {\n /** Instructs MSAL to attempt to discover the region */\n AutoDiscoverRegion = \"AutoDiscoverRegion\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westus' region. */\n USWest = \"westus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westus2' region. */\n USWest2 = \"westus2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'centralus' region. */\n USCentral = \"centralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'eastus' region. */\n USEast = \"eastus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'eastus2' region. */\n USEast2 = \"eastus2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'northcentralus' region. */\n USNorthCentral = \"northcentralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southcentralus' region. */\n USSouthCentral = \"southcentralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westcentralus' region. */\n USWestCentral = \"westcentralus\",\n /** Uses the {@link RegionalAuthority} for the Azure 'canadacentral' region. */\n CanadaCentral = \"canadacentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'canadaeast' region. */\n CanadaEast = \"canadaeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'brazilsouth' region. */\n BrazilSouth = \"brazilsouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'northeurope' region. */\n EuropeNorth = \"northeurope\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westeurope' region. */\n EuropeWest = \"westeurope\",\n /** Uses the {@link RegionalAuthority} for the Azure 'uksouth' region. */\n UKSouth = \"uksouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'ukwest' region. */\n UKWest = \"ukwest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'francecentral' region. */\n FranceCentral = \"francecentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'francesouth' region. */\n FranceSouth = \"francesouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'switzerlandnorth' region. */\n SwitzerlandNorth = \"switzerlandnorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'switzerlandwest' region. */\n SwitzerlandWest = \"switzerlandwest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanynorth' region. */\n GermanyNorth = \"germanynorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanywestcentral' region. */\n GermanyWestCentral = \"germanywestcentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'norwaywest' region. */\n NorwayWest = \"norwaywest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'norwayeast' region. */\n NorwayEast = \"norwayeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'eastasia' region. */\n AsiaEast = \"eastasia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southeastasia' region. */\n AsiaSouthEast = \"southeastasia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'japaneast' region. */\n JapanEast = \"japaneast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'japanwest' region. */\n JapanWest = \"japanwest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiaeast' region. */\n AustraliaEast = \"australiaeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiasoutheast' region. */\n AustraliaSouthEast = \"australiasoutheast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiacentral' region. */\n AustraliaCentral = \"australiacentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'australiacentral2' region. */\n AustraliaCentral2 = \"australiacentral2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'centralindia' region. */\n IndiaCentral = \"centralindia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southindia' region. */\n IndiaSouth = \"southindia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'westindia' region. */\n IndiaWest = \"westindia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'koreasouth' region. */\n KoreaSouth = \"koreasouth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'koreacentral' region. */\n KoreaCentral = \"koreacentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'uaecentral' region. */\n UAECentral = \"uaecentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'uaenorth' region. */\n UAENorth = \"uaenorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southafricanorth' region. */\n SouthAfricaNorth = \"southafricanorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'southafricawest' region. */\n SouthAfricaWest = \"southafricawest\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinanorth' region. */\n ChinaNorth = \"chinanorth\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinaeast' region. */\n ChinaEast = \"chinaeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinanorth2' region. */\n ChinaNorth2 = \"chinanorth2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'chinaeast2' region. */\n ChinaEast2 = \"chinaeast2\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanycentral' region. */\n GermanyCentral = \"germanycentral\",\n /** Uses the {@link RegionalAuthority} for the Azure 'germanynortheast' region. */\n GermanyNorthEast = \"germanynortheast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgovvirginia' region. */\n GovernmentUSVirginia = \"usgovvirginia\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgoviowa' region. */\n GovernmentUSIowa = \"usgoviowa\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgovarizona' region. */\n GovernmentUSArizona = \"usgovarizona\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usgovtexas' region. */\n GovernmentUSTexas = \"usgovtexas\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usdodeast' region. */\n GovernmentUSDodEast = \"usdodeast\",\n /** Uses the {@link RegionalAuthority} for the Azure 'usdodcentral' region. */\n GovernmentUSDodCentral = \"usdodcentral\",\n}\n\n/**\n * Calculates the correct regional authority based on the supplied value\n * and the AZURE_REGIONAL_AUTHORITY_NAME environment variable.\n *\n * Values will be returned verbatim, except for {@link RegionalAuthority.AutoDiscoverRegion}\n * which is mapped to a value MSAL can understand.\n *\n * @internal\n */\nexport function calculateRegionalAuthority(regionalAuthority?: string): string | undefined {\n // Note: as of today only 3 credentials support regional authority, and the parameter\n // is not exposed via the public API. Regional Authority is _only_ supported\n // via the AZURE_REGIONAL_AUTHORITY_NAME env var and _only_ for: ClientSecretCredential, ClientCertificateCredential, and ClientAssertionCredential.\n\n // Accepting the regionalAuthority parameter will allow us to support it in the future.\n let azureRegion = regionalAuthority;\n\n if (\n azureRegion === undefined &&\n globalThis.process?.env?.AZURE_REGIONAL_AUTHORITY_NAME !== undefined\n ) {\n azureRegion = process.env.AZURE_REGIONAL_AUTHORITY_NAME;\n }\n\n if (azureRegion === RegionalAuthority.AutoDiscoverRegion) {\n return \"AUTO_DISCOVER\";\n }\n\n return azureRegion;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAK,oBAAL,kBAAKA,uBAAL;AAEL,EAAAA,mBAAA,wBAAqB;AAErB,EAAAA,mBAAA,YAAS;AAET,EAAAA,mBAAA,aAAU;AAEV,EAAAA,mBAAA,eAAY;AAEZ,EAAAA,mBAAA,YAAS;AAET,EAAAA,mBAAA,aAAU;AAEV,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,mBAAgB;AAEhB,EAAAA,mBAAA,mBAAgB;AAEhB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,iBAAc;AAEd,EAAAA,mBAAA,iBAAc;AAEd,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,aAAU;AAEV,EAAAA,mBAAA,YAAS;AAET,EAAAA,mBAAA,mBAAgB;AAEhB,EAAAA,mBAAA,iBAAc;AAEd,EAAAA,mBAAA,sBAAmB;AAEnB,EAAAA,mBAAA,qBAAkB;AAElB,EAAAA,mBAAA,kBAAe;AAEf,EAAAA,mBAAA,wBAAqB;AAErB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,cAAW;AAEX,EAAAA,mBAAA,mBAAgB;AAEhB,EAAAA,mBAAA,eAAY;AAEZ,EAAAA,mBAAA,eAAY;AAEZ,EAAAA,mBAAA,mBAAgB;AAEhB,EAAAA,mBAAA,wBAAqB;AAErB,EAAAA,mBAAA,sBAAmB;AAEnB,EAAAA,mBAAA,uBAAoB;AAEpB,EAAAA,mBAAA,kBAAe;AAEf,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,eAAY;AAEZ,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,kBAAe;AAEf,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,cAAW;AAEX,EAAAA,mBAAA,sBAAmB;AAEnB,EAAAA,mBAAA,qBAAkB;AAElB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,eAAY;AAEZ,EAAAA,mBAAA,iBAAc;AAEd,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,sBAAmB;AAEnB,EAAAA,mBAAA,0BAAuB;AAEvB,EAAAA,mBAAA,sBAAmB;AAEnB,EAAAA,mBAAA,yBAAsB;AAEtB,EAAAA,mBAAA,uBAAoB;AAEpB,EAAAA,mBAAA,yBAAsB;AAEtB,EAAAA,mBAAA,4BAAyB;AA1Gf,SAAAA;AAAA,GAAA;AAsHL,SAAS,2BAA2B,mBAAgD;AAMzF,MAAI,cAAc;AAElB,MACE,gBAAgB,UAChB,WAAW,SAAS,KAAK,kCAAkC,QAC3D;AACA,kBAAc,QAAQ,IAAI;AAAA,EAC5B;AAEA,MAAI,gBAAgB,+CAAsC;AACxD,WAAO;AAAA,EACT;AAEA,SAAO;AACT;",
6
+ "names": ["RegionalAuthority"]
7
+ }
@@ -1,5 +1,16 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=tokenCredentialOptions.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var tokenCredentialOptions_exports = {};
15
+ module.exports = __toCommonJS(tokenCredentialOptions_exports);
16
+ //# sourceMappingURL=tokenCredentialOptions.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"tokenCredentialOptions.js","sourceRoot":"","sources":["../../src/tokenCredentialOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions } from \"@azure/core-client\";\nimport type { LogPolicyOptions } from \"@azure/core-rest-pipeline\";\n\n/**\n * Provides options to configure how the Identity library makes authentication\n * requests to Microsoft Entra ID.\n */\nexport interface TokenCredentialOptions extends CommonClientOptions {\n /**\n * The authority host to use for authentication requests.\n * Possible values are available through {@link AzureAuthorityHosts}.\n * The default is \"https://login.microsoftonline.com\".\n */\n authorityHost?: 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"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/tokenCredentialOptions.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions } from \"@azure/core-client\";\nimport type { LogPolicyOptions } from \"@azure/core-rest-pipeline\";\n\n/**\n * Provides options to configure how the Identity library makes authentication\n * requests to Microsoft Entra ID.\n */\nexport interface TokenCredentialOptions extends CommonClientOptions {\n /**\n * The authority host to use for authentication requests.\n * Possible values are available through {@link AzureAuthorityHosts}.\n * The default is \"https://login.microsoftonline.com\".\n */\n authorityHost?: 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"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,55 +1,55 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getBearerTokenProvider = getBearerTokenProvider;
6
- const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
7
- /**
8
- * Returns a callback that provides a bearer token.
9
- * For example, the bearer token can be used to authenticate a request as follows:
10
- * ```ts snippet:token_provider_example
11
- * import { DefaultAzureCredential, getBearerTokenProvider } from "@azure/identity";
12
- * import { createPipelineRequest } from "@azure/core-rest-pipeline";
13
- *
14
- * const credential = new DefaultAzureCredential();
15
- * const scope = "https://cognitiveservices.azure.com/.default";
16
- * const getAccessToken = getBearerTokenProvider(credential, scope);
17
- * const token = await getAccessToken();
18
- *
19
- * // usage
20
- * const request = createPipelineRequest({ url: "https://example.com" });
21
- * request.headers.set("Authorization", `Bearer ${token}`);
22
- * ```
23
- *
24
- * @param credential - The credential used to authenticate the request.
25
- * @param scopes - The scopes required for the bearer token.
26
- * @param options - Options to configure the token provider.
27
- * @returns a callback that provides a bearer token.
28
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var tokenProvider_exports = {};
19
+ __export(tokenProvider_exports, {
20
+ getBearerTokenProvider: () => getBearerTokenProvider
21
+ });
22
+ module.exports = __toCommonJS(tokenProvider_exports);
23
+ var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
29
24
  function getBearerTokenProvider(credential, scopes, options) {
30
- const { abortSignal, tracingOptions } = options || {};
31
- const pipeline = (0, core_rest_pipeline_1.createEmptyPipeline)();
32
- pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, scopes }));
33
- async function getRefreshedToken() {
34
- // Create a pipeline with just the bearer token policy
35
- // and run a dummy request through it to get the token
36
- const res = await pipeline.sendRequest({
37
- sendRequest: (request) => Promise.resolve({
38
- request,
39
- status: 200,
40
- headers: request.headers,
41
- }),
42
- }, (0, core_rest_pipeline_1.createPipelineRequest)({
43
- url: "https://example.com",
44
- abortSignal,
45
- tracingOptions,
46
- }));
47
- const accessToken = res.headers.get("authorization")?.split(" ")[1];
48
- if (!accessToken) {
49
- throw new Error("Failed to get access token");
50
- }
51
- return accessToken;
25
+ const { abortSignal, tracingOptions } = options || {};
26
+ const pipeline = (0, import_core_rest_pipeline.createEmptyPipeline)();
27
+ pipeline.addPolicy((0, import_core_rest_pipeline.bearerTokenAuthenticationPolicy)({ credential, scopes }));
28
+ async function getRefreshedToken() {
29
+ const res = await pipeline.sendRequest(
30
+ {
31
+ sendRequest: (request) => Promise.resolve({
32
+ request,
33
+ status: 200,
34
+ headers: request.headers
35
+ })
36
+ },
37
+ (0, import_core_rest_pipeline.createPipelineRequest)({
38
+ url: "https://example.com",
39
+ abortSignal,
40
+ tracingOptions
41
+ })
42
+ );
43
+ const accessToken = res.headers.get("authorization")?.split(" ")[1];
44
+ if (!accessToken) {
45
+ throw new Error("Failed to get access token");
52
46
  }
53
- return getRefreshedToken;
47
+ return accessToken;
48
+ }
49
+ return getRefreshedToken;
54
50
  }
55
- //# sourceMappingURL=tokenProvider.js.map
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ getBearerTokenProvider
54
+ });
55
+ //# sourceMappingURL=tokenProvider.js.map