@azure/identity 4.14.0-beta.2 → 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 (368) hide show
  1. package/dist/browser/constants.d.ts +1 -1
  2. package/dist/browser/constants.js +1 -1
  3. package/dist/browser/constants.js.map +1 -1
  4. package/dist/browser/credentials/authorizationCodeCredential.d.ts +3 -3
  5. package/dist/browser/credentials/authorizationCodeCredential.d.ts.map +1 -0
  6. package/dist/browser/credentials/authorizationCodeCredential.js +2 -2
  7. package/dist/browser/credentials/authorizationCodeCredential.js.map +1 -0
  8. package/dist/browser/credentials/azureCliCredential.d.ts +5 -4
  9. package/dist/browser/credentials/azureCliCredential.d.ts.map +1 -0
  10. package/dist/browser/credentials/azureCliCredential.js +3 -3
  11. package/dist/browser/credentials/azureCliCredential.js.map +1 -0
  12. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +5 -4
  13. package/dist/browser/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
  14. package/dist/browser/credentials/azureDeveloperCliCredential.js +3 -3
  15. package/dist/browser/credentials/azureDeveloperCliCredential.js.map +1 -0
  16. package/dist/browser/credentials/azurePipelinesCredential.d.ts +5 -4
  17. package/dist/browser/credentials/azurePipelinesCredential.d.ts.map +1 -0
  18. package/dist/browser/credentials/azurePipelinesCredential.js +3 -3
  19. package/dist/browser/credentials/azurePipelinesCredential.js.map +1 -0
  20. package/dist/browser/credentials/azurePowerShellCredential.d.ts +5 -4
  21. package/dist/browser/credentials/azurePowerShellCredential.d.ts.map +1 -0
  22. package/dist/browser/credentials/azurePowerShellCredential.js +3 -3
  23. package/dist/browser/credentials/azurePowerShellCredential.js.map +1 -0
  24. package/dist/browser/credentials/clientAssertionCredential.d.ts +5 -4
  25. package/dist/browser/credentials/clientAssertionCredential.d.ts.map +1 -0
  26. package/dist/browser/credentials/clientAssertionCredential.js +3 -3
  27. package/dist/browser/credentials/clientAssertionCredential.js.map +1 -0
  28. package/dist/browser/credentials/clientCertificateCredential.d.ts +6 -4
  29. package/dist/browser/credentials/clientCertificateCredential.d.ts.map +1 -0
  30. package/dist/browser/credentials/clientCertificateCredential.js +3 -3
  31. package/dist/browser/credentials/clientCertificateCredential.js.map +1 -0
  32. package/dist/browser/credentials/clientSecretCredential.d.ts +1 -1
  33. package/dist/browser/credentials/clientSecretCredential.d.ts.map +1 -0
  34. package/dist/browser/credentials/clientSecretCredential.js +1 -1
  35. package/dist/browser/credentials/clientSecretCredential.js.map +1 -0
  36. package/dist/browser/credentials/defaultAzureCredential.d.ts +3 -3
  37. package/dist/browser/credentials/defaultAzureCredential.d.ts.map +1 -0
  38. package/dist/browser/credentials/defaultAzureCredential.js +2 -2
  39. package/dist/browser/credentials/defaultAzureCredential.js.map +1 -0
  40. package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  41. package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -1
  42. package/dist/browser/credentials/deviceCodeCredential.d.ts +5 -4
  43. package/dist/browser/credentials/deviceCodeCredential.d.ts.map +1 -0
  44. package/dist/browser/credentials/deviceCodeCredential.js +3 -3
  45. package/dist/browser/credentials/deviceCodeCredential.js.map +1 -0
  46. package/dist/browser/credentials/environmentCredential.d.ts +5 -4
  47. package/dist/browser/credentials/environmentCredential.d.ts.map +1 -0
  48. package/dist/browser/credentials/environmentCredential.js +3 -3
  49. package/dist/browser/credentials/environmentCredential.js.map +1 -0
  50. package/dist/browser/credentials/interactiveBrowserCredential.d.ts +1 -1
  51. package/dist/browser/credentials/interactiveBrowserCredential.d.ts.map +1 -0
  52. package/dist/browser/credentials/interactiveBrowserCredential.js +1 -1
  53. package/dist/browser/credentials/interactiveBrowserCredential.js.map +1 -0
  54. package/dist/browser/credentials/managedIdentityCredential/index.d.ts +9 -4
  55. package/dist/browser/credentials/managedIdentityCredential/index.d.ts.map +1 -0
  56. package/dist/browser/credentials/managedIdentityCredential/index.js +3 -3
  57. package/dist/browser/credentials/managedIdentityCredential/index.js.map +1 -0
  58. package/dist/browser/credentials/onBehalfOfCredential.d.ts +5 -4
  59. package/dist/browser/credentials/onBehalfOfCredential.d.ts.map +1 -0
  60. package/dist/browser/credentials/onBehalfOfCredential.js +3 -3
  61. package/dist/browser/credentials/onBehalfOfCredential.js.map +1 -0
  62. package/dist/browser/credentials/usernamePasswordCredential.d.ts +1 -1
  63. package/dist/browser/credentials/usernamePasswordCredential.d.ts.map +1 -0
  64. package/dist/browser/credentials/usernamePasswordCredential.js +1 -1
  65. package/dist/browser/credentials/usernamePasswordCredential.js.map +1 -0
  66. package/dist/browser/credentials/visualStudioCodeCredential.d.ts +5 -4
  67. package/dist/browser/credentials/visualStudioCodeCredential.d.ts.map +1 -0
  68. package/dist/browser/credentials/visualStudioCodeCredential.js +3 -3
  69. package/dist/browser/credentials/visualStudioCodeCredential.js.map +1 -0
  70. package/dist/browser/credentials/workloadIdentityCredential.d.ts +5 -4
  71. package/dist/browser/credentials/workloadIdentityCredential.d.ts.map +1 -0
  72. package/dist/browser/credentials/workloadIdentityCredential.js +3 -3
  73. package/dist/browser/credentials/workloadIdentityCredential.js.map +1 -0
  74. package/dist/browser/index.d.ts +33 -33
  75. package/dist/browser/index.d.ts.map +1 -1
  76. package/dist/browser/index.js.map +1 -1
  77. package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  78. package/dist/browser/msal/browserFlows/msalBrowserCommon.js +2 -3
  79. package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  80. package/dist/browser/msal/msal.d.ts +2 -3
  81. package/dist/browser/msal/msal.d.ts.map +1 -0
  82. package/dist/browser/msal/msal.js +2 -3
  83. package/dist/browser/msal/msal.js.map +1 -0
  84. package/dist/browser/msal/nodeFlows/msalClient.d.ts +2 -2
  85. package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +1 -1
  86. package/dist/browser/msal/nodeFlows/msalClient.js +3 -3
  87. package/dist/browser/msal/nodeFlows/msalClient.js.map +1 -1
  88. package/dist/browser/msal/utils.d.ts +5 -4
  89. package/dist/browser/msal/utils.d.ts.map +1 -1
  90. package/dist/browser/msal/utils.js +10 -10
  91. package/dist/browser/msal/utils.js.map +1 -1
  92. package/dist/browser/plugins/consumer.d.ts +1 -1
  93. package/dist/browser/plugins/consumer.d.ts.map +1 -0
  94. package/dist/browser/plugins/consumer.js +1 -1
  95. package/dist/browser/plugins/consumer.js.map +1 -0
  96. package/dist/browser/util/processMultiTenantRequest.d.ts +3 -2
  97. package/dist/browser/util/processMultiTenantRequest.d.ts.map +1 -0
  98. package/dist/browser/util/processMultiTenantRequest.js +2 -2
  99. package/dist/browser/util/processMultiTenantRequest.js.map +1 -0
  100. package/dist/commonjs/client/identityClient.js +294 -288
  101. package/dist/commonjs/client/identityClient.js.map +7 -1
  102. package/dist/commonjs/constants.d.ts +1 -1
  103. package/dist/commonjs/constants.js +61 -78
  104. package/dist/commonjs/constants.js.map +7 -1
  105. package/dist/commonjs/credentials/authorityValidationOptions.js +16 -5
  106. package/dist/commonjs/credentials/authorityValidationOptions.js.map +7 -1
  107. package/dist/commonjs/credentials/authorizationCodeCredential.js +98 -74
  108. package/dist/commonjs/credentials/authorizationCodeCredential.js.map +7 -1
  109. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +16 -5
  110. package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +7 -1
  111. package/dist/commonjs/credentials/azureCliCredential.js +245 -214
  112. package/dist/commonjs/credentials/azureCliCredential.js.map +7 -1
  113. package/dist/commonjs/credentials/azureCliCredentialOptions.js +16 -5
  114. package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +7 -1
  115. package/dist/commonjs/credentials/azureDeveloperCliCredential.js +237 -225
  116. package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +7 -1
  117. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +16 -5
  118. package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +7 -1
  119. package/dist/commonjs/credentials/azurePipelinesCredential.js +173 -135
  120. package/dist/commonjs/credentials/azurePipelinesCredential.js.map +7 -1
  121. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +16 -5
  122. package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +7 -1
  123. package/dist/commonjs/credentials/azurePowerShellCredential.js +201 -205
  124. package/dist/commonjs/credentials/azurePowerShellCredential.js.map +7 -1
  125. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +16 -5
  126. package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +7 -1
  127. package/dist/commonjs/credentials/brokerAuthOptions.js +16 -3
  128. package/dist/commonjs/credentials/brokerAuthOptions.js.map +7 -1
  129. package/dist/commonjs/credentials/brokerCredential.js +103 -70
  130. package/dist/commonjs/credentials/brokerCredential.js.map +7 -1
  131. package/dist/commonjs/credentials/browserCustomizationOptions.js +16 -5
  132. package/dist/commonjs/credentials/browserCustomizationOptions.js.map +7 -1
  133. package/dist/commonjs/credentials/chainedTokenCredential.js +113 -93
  134. package/dist/commonjs/credentials/chainedTokenCredential.js.map +7 -1
  135. package/dist/commonjs/credentials/clientAssertionCredential.js +101 -63
  136. package/dist/commonjs/credentials/clientAssertionCredential.js.map +7 -1
  137. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +16 -5
  138. package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +7 -1
  139. package/dist/commonjs/credentials/clientCertificateCredential.js +129 -123
  140. package/dist/commonjs/credentials/clientCertificateCredential.js.map +7 -1
  141. package/dist/commonjs/credentials/clientCertificateCredentialModels.js +16 -5
  142. package/dist/commonjs/credentials/clientCertificateCredentialModels.js.map +7 -1
  143. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +16 -5
  144. package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +7 -1
  145. package/dist/commonjs/credentials/clientSecretCredential.js +96 -67
  146. package/dist/commonjs/credentials/clientSecretCredential.js.map +7 -1
  147. package/dist/commonjs/credentials/clientSecretCredentialOptions.js +16 -5
  148. package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +7 -1
  149. package/dist/commonjs/credentials/credentialPersistenceOptions.js +16 -5
  150. package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +7 -1
  151. package/dist/commonjs/credentials/defaultAzureCredential.js +121 -159
  152. package/dist/commonjs/credentials/defaultAzureCredential.js.map +7 -1
  153. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +110 -140
  154. package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +7 -1
  155. package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  156. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +16 -5
  157. package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +7 -1
  158. package/dist/commonjs/credentials/deviceCodeCredential.js +132 -103
  159. package/dist/commonjs/credentials/deviceCodeCredential.js.map +7 -1
  160. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +16 -5
  161. package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +7 -1
  162. package/dist/commonjs/credentials/environmentCredential.js +157 -123
  163. package/dist/commonjs/credentials/environmentCredential.js.map +7 -1
  164. package/dist/commonjs/credentials/environmentCredentialOptions.js +16 -5
  165. package/dist/commonjs/credentials/environmentCredentialOptions.js.map +7 -1
  166. package/dist/commonjs/credentials/interactiveBrowserCredential.js +144 -107
  167. package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +7 -1
  168. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +16 -5
  169. package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +7 -1
  170. package/dist/commonjs/credentials/interactiveCredentialOptions.js +16 -5
  171. package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +7 -1
  172. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +92 -91
  173. package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +7 -1
  174. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +51 -44
  175. package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +7 -1
  176. package/dist/commonjs/credentials/managedIdentityCredential/index.js +256 -242
  177. package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +7 -1
  178. package/dist/commonjs/credentials/managedIdentityCredential/models.js +16 -5
  179. package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +7 -1
  180. package/dist/commonjs/credentials/managedIdentityCredential/options.js +16 -5
  181. package/dist/commonjs/credentials/managedIdentityCredential/options.js.map +7 -1
  182. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +56 -39
  183. package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +7 -1
  184. package/dist/commonjs/credentials/managedIdentityCredential/utils.js +79 -75
  185. package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +7 -1
  186. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +16 -5
  187. package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +7 -1
  188. package/dist/commonjs/credentials/onBehalfOfCredential.js +168 -126
  189. package/dist/commonjs/credentials/onBehalfOfCredential.js.map +7 -1
  190. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +16 -5
  191. package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +7 -1
  192. package/dist/commonjs/credentials/usernamePasswordCredential.js +112 -75
  193. package/dist/commonjs/credentials/usernamePasswordCredential.js.map +7 -1
  194. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +16 -5
  195. package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +7 -1
  196. package/dist/commonjs/credentials/visualStudioCodeCredential.js +144 -132
  197. package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +7 -1
  198. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +16 -5
  199. package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +7 -1
  200. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +16 -5
  201. package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +7 -1
  202. package/dist/commonjs/credentials/workloadIdentityCredential.js +284 -274
  203. package/dist/commonjs/credentials/workloadIdentityCredential.js.map +7 -1
  204. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +16 -5
  205. package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +7 -1
  206. package/dist/commonjs/errors.js +131 -132
  207. package/dist/commonjs/errors.js.map +7 -1
  208. package/dist/commonjs/index.d.ts +33 -33
  209. package/dist/commonjs/index.d.ts.map +1 -1
  210. package/dist/commonjs/index.js +115 -67
  211. package/dist/commonjs/index.js.map +7 -1
  212. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  213. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +226 -249
  214. package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +7 -1
  215. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +16 -5
  216. package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js.map +7 -1
  217. package/dist/commonjs/msal/credentials.js +16 -5
  218. package/dist/commonjs/msal/credentials.js.map +7 -1
  219. package/dist/commonjs/msal/msal.d.ts +1 -2
  220. package/dist/commonjs/msal/msal.d.ts.map +1 -1
  221. package/dist/commonjs/msal/msal.js +30 -9
  222. package/dist/commonjs/msal/msal.js.map +7 -1
  223. package/dist/commonjs/msal/nodeFlows/brokerOptions.js +16 -3
  224. package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +7 -1
  225. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts +2 -2
  226. package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -1
  227. package/dist/commonjs/msal/nodeFlows/msalClient.js +450 -478
  228. package/dist/commonjs/msal/nodeFlows/msalClient.js.map +7 -1
  229. package/dist/commonjs/msal/nodeFlows/msalPlugins.js +140 -147
  230. package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +7 -1
  231. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +16 -5
  232. package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +7 -1
  233. package/dist/commonjs/msal/types.js +16 -5
  234. package/dist/commonjs/msal/types.js.map +7 -1
  235. package/dist/commonjs/msal/utils.d.ts +5 -4
  236. package/dist/commonjs/msal/utils.d.ts.map +1 -1
  237. package/dist/commonjs/msal/utils.js +171 -211
  238. package/dist/commonjs/msal/utils.js.map +7 -1
  239. package/dist/commonjs/plugins/consumer.js +32 -40
  240. package/dist/commonjs/plugins/consumer.js.map +7 -1
  241. package/dist/commonjs/plugins/provider.js +16 -5
  242. package/dist/commonjs/plugins/provider.js.map +7 -1
  243. package/dist/commonjs/regionalAuthority.js +93 -141
  244. package/dist/commonjs/regionalAuthority.js.map +7 -1
  245. package/dist/commonjs/tokenCredentialOptions.js +16 -5
  246. package/dist/commonjs/tokenCredentialOptions.js.map +7 -1
  247. package/dist/commonjs/tokenProvider.js +52 -52
  248. package/dist/commonjs/tokenProvider.js.map +7 -1
  249. package/dist/commonjs/tsdoc-metadata.json +1 -1
  250. package/dist/commonjs/util/authorityHost.js +34 -19
  251. package/dist/commonjs/util/authorityHost.js.map +7 -1
  252. package/dist/commonjs/util/certificatesUtils.js +54 -45
  253. package/dist/commonjs/util/certificatesUtils.js.map +7 -1
  254. package/dist/commonjs/util/identityTokenEndpoint.js +32 -12
  255. package/dist/commonjs/util/identityTokenEndpoint.js.map +7 -1
  256. package/dist/commonjs/util/logging.js +91 -97
  257. package/dist/commonjs/util/logging.js.map +7 -1
  258. package/dist/commonjs/util/processMultiTenantRequest.js +43 -33
  259. package/dist/commonjs/util/processMultiTenantRequest.js.map +7 -1
  260. package/dist/commonjs/util/processUtils.js +60 -35
  261. package/dist/commonjs/util/processUtils.js.map +7 -1
  262. package/dist/commonjs/util/scopeUtils.js +39 -28
  263. package/dist/commonjs/util/scopeUtils.js.map +7 -1
  264. package/dist/commonjs/util/subscriptionUtils.js +35 -17
  265. package/dist/commonjs/util/subscriptionUtils.js.map +7 -1
  266. package/dist/commonjs/util/tenantIdUtils.js +61 -45
  267. package/dist/commonjs/util/tenantIdUtils.js.map +7 -1
  268. package/dist/commonjs/util/tracing.js +33 -16
  269. package/dist/commonjs/util/tracing.js.map +7 -1
  270. package/dist/esm/constants.d.ts +1 -1
  271. package/dist/esm/constants.js +1 -1
  272. package/dist/esm/constants.js.map +1 -1
  273. package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  274. package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -1
  275. package/dist/esm/index.d.ts +33 -33
  276. package/dist/esm/index.d.ts.map +1 -1
  277. package/dist/esm/index.js.map +1 -1
  278. package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  279. package/dist/esm/msal/browserFlows/msalBrowserCommon.js +2 -3
  280. package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  281. package/dist/esm/msal/msal.d.ts +1 -2
  282. package/dist/esm/msal/msal.d.ts.map +1 -1
  283. package/dist/esm/msal/msal.js +1 -2
  284. package/dist/esm/msal/msal.js.map +1 -1
  285. package/dist/esm/msal/nodeFlows/msalClient.d.ts +2 -2
  286. package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -1
  287. package/dist/esm/msal/nodeFlows/msalClient.js +3 -3
  288. package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -1
  289. package/dist/esm/msal/utils.d.ts +5 -4
  290. package/dist/esm/msal/utils.d.ts.map +1 -1
  291. package/dist/esm/msal/utils.js +10 -10
  292. package/dist/esm/msal/utils.js.map +1 -1
  293. package/dist/workerd/constants.d.ts +1 -1
  294. package/dist/workerd/constants.js +1 -1
  295. package/dist/workerd/constants.js.map +1 -1
  296. package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts +2 -2
  297. package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -1
  298. package/dist/workerd/index.d.ts +33 -33
  299. package/dist/workerd/index.d.ts.map +1 -1
  300. package/dist/workerd/index.js.map +1 -1
  301. package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -1
  302. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +2 -3
  303. package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +1 -1
  304. package/dist/workerd/msal/msal.d.ts +1 -2
  305. package/dist/workerd/msal/msal.d.ts.map +1 -1
  306. package/dist/workerd/msal/msal.js +1 -2
  307. package/dist/workerd/msal/msal.js.map +1 -1
  308. package/dist/workerd/msal/nodeFlows/msalClient.d.ts +2 -2
  309. package/dist/workerd/msal/nodeFlows/msalClient.d.ts.map +1 -1
  310. package/dist/workerd/msal/nodeFlows/msalClient.js +3 -3
  311. package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -1
  312. package/dist/workerd/msal/utils.d.ts +5 -4
  313. package/dist/workerd/msal/utils.d.ts.map +1 -1
  314. package/dist/workerd/msal/utils.js +10 -10
  315. package/dist/workerd/msal/utils.js.map +1 -1
  316. package/package.json +10 -27
  317. package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +0 -1
  318. package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +0 -1
  319. package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +0 -1
  320. package/dist/browser/credentials/azureCliCredential-browser.mjs.map +0 -1
  321. package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +0 -1
  322. package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +0 -1
  323. package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +0 -1
  324. package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +0 -1
  325. package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +0 -1
  326. package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +0 -1
  327. package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +0 -1
  328. package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +0 -1
  329. package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +0 -1
  330. package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +0 -1
  331. package/dist/browser/credentials/clientSecretCredential-browser.d.mts.map +0 -1
  332. package/dist/browser/credentials/clientSecretCredential-browser.mjs.map +0 -1
  333. package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +0 -1
  334. package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +0 -1
  335. package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +0 -1
  336. package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +0 -1
  337. package/dist/browser/credentials/environmentCredential-browser.d.mts.map +0 -1
  338. package/dist/browser/credentials/environmentCredential-browser.mjs.map +0 -1
  339. package/dist/browser/credentials/interactiveBrowserCredential-browser.d.mts.map +0 -1
  340. package/dist/browser/credentials/interactiveBrowserCredential-browser.mjs.map +0 -1
  341. package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +0 -1
  342. package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +0 -1
  343. package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +0 -1
  344. package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +0 -1
  345. package/dist/browser/credentials/usernamePasswordCredential-browser.d.mts.map +0 -1
  346. package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +0 -1
  347. package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +0 -1
  348. package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +0 -1
  349. package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +0 -1
  350. package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +0 -1
  351. package/dist/browser/msal/msal-browser.d.mts.map +0 -1
  352. package/dist/browser/msal/msal-browser.mjs.map +0 -1
  353. package/dist/browser/plugins/consumer-browser.d.mts.map +0 -1
  354. package/dist/browser/plugins/consumer-browser.mjs.map +0 -1
  355. package/dist/browser/util/authHostEnv-browser.d.mts +0 -4
  356. package/dist/browser/util/authHostEnv-browser.d.mts.map +0 -1
  357. package/dist/browser/util/authHostEnv-browser.mjs +0 -7
  358. package/dist/browser/util/authHostEnv-browser.mjs.map +0 -1
  359. package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +0 -1
  360. package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +0 -1
  361. package/dist/esm/util/authHostEnv-browser.d.mts +0 -4
  362. package/dist/esm/util/authHostEnv-browser.d.mts.map +0 -1
  363. package/dist/esm/util/authHostEnv-browser.mjs +0 -7
  364. package/dist/esm/util/authHostEnv-browser.mjs.map +0 -1
  365. package/dist/workerd/util/authHostEnv-browser.d.mts +0 -4
  366. package/dist/workerd/util/authHostEnv-browser.d.mts.map +0 -1
  367. package/dist/workerd/util/authHostEnv-browser.mjs +0 -7
  368. package/dist/workerd/util/authHostEnv-browser.mjs.map +0 -1
@@ -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=models.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 models_exports = {};
15
+ module.exports = __toCommonJS(models_exports);
16
+ //# sourceMappingURL=models.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken } from \"@azure/core-auth\";\n\nimport type { IdentityClient } from \"../../client/identityClient.js\";\n\n/**\n * @internal\n */\nexport interface MSIConfiguration {\n retryConfig: {\n maxRetries: number;\n startDelayInMs: number;\n intervalIncrement: number;\n };\n identityClient: IdentityClient;\n scopes: string | string[];\n clientId?: string;\n resourceId?: string;\n}\n\n/**\n * @internal\n * Represents an access token for {@link ManagedIdentity} for internal usage,\n * with an expiration time and the time in which token should refresh.\n */\nexport declare interface MSIToken extends AccessToken {}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/credentials/managedIdentityCredential/models.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken } from \"@azure/core-auth\";\n\nimport type { IdentityClient } from \"../../client/identityClient.js\";\n\n/**\n * @internal\n */\nexport interface MSIConfiguration {\n retryConfig: {\n maxRetries: number;\n startDelayInMs: number;\n intervalIncrement: number;\n };\n identityClient: IdentityClient;\n scopes: string | string[];\n clientId?: string;\n resourceId?: string;\n}\n\n/**\n * @internal\n * Represents an access token for {@link ManagedIdentity} for internal usage,\n * with an expiration time and the time in which token should refresh.\n */\nexport declare interface MSIToken extends AccessToken {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
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=options.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 options_exports = {};
15
+ module.exports = __toCommonJS(options_exports);
16
+ //# sourceMappingURL=options.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/options.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredentialOptions } from \"../../tokenCredentialOptions.js\";\n\n/**\n * Options to send on the {@link ManagedIdentityCredential} constructor.\n * This variation supports `clientId` and not `resourceId`, since only one of both is supported.\n */\nexport interface ManagedIdentityCredentialClientIdOptions extends TokenCredentialOptions {\n /**\n * The client ID of the user - assigned identity, or app registration(when working with AKS pod - identity).\n */\n clientId?: string;\n}\n\n/**\n * Options to send on the {@link ManagedIdentityCredential} constructor.\n * This variation supports `resourceId` and not `clientId`, since only one of both is supported.\n */\nexport interface ManagedIdentityCredentialResourceIdOptions extends TokenCredentialOptions {\n /**\n * Allows specifying a custom resource Id.\n * In scenarios such as when user assigned identities are created using an ARM template,\n * where the resource Id of the identity is known but the client Id can't be known ahead of time,\n * this parameter allows programs to use these user assigned identities\n * without having to first determine the client Id of the created identity.\n */\n resourceId: string;\n}\n\n/**\n * Options to send on the {@link ManagedIdentityCredential} constructor.\n * This variation supports `objectId` as a constructor argument.\n */\nexport interface ManagedIdentityCredentialObjectIdOptions extends TokenCredentialOptions {\n /**\n * Allows specifying the object ID of the underlying service principal used to authenticate a user-assigned managed identity.\n * This is an alternative to providing a client ID or resource ID and is not required for system-assigned managed identities.\n */\n objectId: string;\n}\n\n/**\n * @internal\n * Internal options for configuring the {@link ManagedIdentityCredential} with disable probe ability for DAC.\n * This type ensures that we can use any of the credential options (clientId, resourceId, or objectId)\n * along with the disableProbe flag for DefaultAzureCredential.\n */\nexport type InternalManagedIdentityCredentialOptions =\n | (ManagedIdentityCredentialClientIdOptions & ManagedIdentityDisableProbeOptions)\n | (ManagedIdentityCredentialResourceIdOptions & ManagedIdentityDisableProbeOptions)\n | (ManagedIdentityCredentialObjectIdOptions & ManagedIdentityDisableProbeOptions);\n\n/**\n * Options for configuring Managed Identity Credential with disable probe.\n * This is only meant to use in DefaultAzureCredential when AZURE_TOKEN_CREDENTIALS is set to Managed Identity Credential.\n */\ntype ManagedIdentityDisableProbeOptions = { sendProbeRequest?: boolean };\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/credentials/managedIdentityCredential/options.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredentialOptions } from \"../../tokenCredentialOptions.js\";\n\n/**\n * Options to send on the {@link ManagedIdentityCredential} constructor.\n * This variation supports `clientId` and not `resourceId`, since only one of both is supported.\n */\nexport interface ManagedIdentityCredentialClientIdOptions extends TokenCredentialOptions {\n /**\n * The client ID of the user - assigned identity, or app registration(when working with AKS pod - identity).\n */\n clientId?: string;\n}\n\n/**\n * Options to send on the {@link ManagedIdentityCredential} constructor.\n * This variation supports `resourceId` and not `clientId`, since only one of both is supported.\n */\nexport interface ManagedIdentityCredentialResourceIdOptions extends TokenCredentialOptions {\n /**\n * Allows specifying a custom resource Id.\n * In scenarios such as when user assigned identities are created using an ARM template,\n * where the resource Id of the identity is known but the client Id can't be known ahead of time,\n * this parameter allows programs to use these user assigned identities\n * without having to first determine the client Id of the created identity.\n */\n resourceId: string;\n}\n\n/**\n * Options to send on the {@link ManagedIdentityCredential} constructor.\n * This variation supports `objectId` as a constructor argument.\n */\nexport interface ManagedIdentityCredentialObjectIdOptions extends TokenCredentialOptions {\n /**\n * Allows specifying the object ID of the underlying service principal used to authenticate a user-assigned managed identity.\n * This is an alternative to providing a client ID or resource ID and is not required for system-assigned managed identities.\n */\n objectId: string;\n}\n\n/**\n * @internal\n * Internal options for configuring the {@link ManagedIdentityCredential} with disable probe ability for DAC.\n * This type ensures that we can use any of the credential options (clientId, resourceId, or objectId)\n * along with the disableProbe flag for DefaultAzureCredential.\n */\nexport type InternalManagedIdentityCredentialOptions =\n | (ManagedIdentityCredentialClientIdOptions & ManagedIdentityDisableProbeOptions)\n | (ManagedIdentityCredentialResourceIdOptions & ManagedIdentityDisableProbeOptions)\n | (ManagedIdentityCredentialObjectIdOptions & ManagedIdentityDisableProbeOptions);\n\n/**\n * Options for configuring Managed Identity Credential with disable probe.\n * This is only meant to use in DefaultAzureCredential when AZURE_TOKEN_CREDENTIALS is set to Managed Identity Credential.\n */\ntype ManagedIdentityDisableProbeOptions = { sendProbeRequest?: boolean };\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,41 +1,58 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.tokenExchangeMsi = void 0;
6
- const workloadIdentityCredential_js_1 = require("../workloadIdentityCredential.js");
7
- const logging_js_1 = require("../../util/logging.js");
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 tokenExchangeMsi_exports = {};
19
+ __export(tokenExchangeMsi_exports, {
20
+ tokenExchangeMsi: () => tokenExchangeMsi
21
+ });
22
+ module.exports = __toCommonJS(tokenExchangeMsi_exports);
23
+ var import_workloadIdentityCredential = require("../workloadIdentityCredential.js");
24
+ var import_logging = require("../../util/logging.js");
8
25
  const msiName = "ManagedIdentityCredential - Token Exchange";
9
- const logger = (0, logging_js_1.credentialLogger)(msiName);
10
- /**
11
- * Defines how to determine whether the token exchange MSI is available, and also how to retrieve a token from the token exchange MSI.
12
- *
13
- * Token exchange MSI (used by AKS) is the only MSI implementation handled entirely by Azure Identity.
14
- * The rest have been migrated to MSAL.
15
- */
16
- exports.tokenExchangeMsi = {
17
- name: "tokenExchangeMsi",
18
- async isAvailable(clientId) {
19
- const env = process.env;
20
- const result = Boolean((clientId || env.AZURE_CLIENT_ID) &&
21
- env.AZURE_TENANT_ID &&
22
- process.env.AZURE_FEDERATED_TOKEN_FILE);
23
- if (!result) {
24
- logger.info(`${msiName}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`);
25
- }
26
- return result;
27
- },
28
- async getToken(configuration, getTokenOptions = {}) {
29
- const { scopes, clientId } = configuration;
30
- const identityClientTokenCredentialOptions = {};
31
- const workloadIdentityCredential = new workloadIdentityCredential_js_1.WorkloadIdentityCredential({
32
- clientId,
33
- tenantId: process.env.AZURE_TENANT_ID,
34
- tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE,
35
- ...identityClientTokenCredentialOptions,
36
- disableInstanceDiscovery: true,
37
- });
38
- return workloadIdentityCredential.getToken(scopes, getTokenOptions);
39
- },
26
+ const logger = (0, import_logging.credentialLogger)(msiName);
27
+ const tokenExchangeMsi = {
28
+ name: "tokenExchangeMsi",
29
+ async isAvailable(clientId) {
30
+ const env = process.env;
31
+ const result = Boolean(
32
+ (clientId || env.AZURE_CLIENT_ID) && env.AZURE_TENANT_ID && process.env.AZURE_FEDERATED_TOKEN_FILE
33
+ );
34
+ if (!result) {
35
+ logger.info(
36
+ `${msiName}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`
37
+ );
38
+ }
39
+ return result;
40
+ },
41
+ async getToken(configuration, getTokenOptions = {}) {
42
+ const { scopes, clientId } = configuration;
43
+ const identityClientTokenCredentialOptions = {};
44
+ const workloadIdentityCredential = new import_workloadIdentityCredential.WorkloadIdentityCredential({
45
+ clientId,
46
+ tenantId: process.env.AZURE_TENANT_ID,
47
+ tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE,
48
+ ...identityClientTokenCredentialOptions,
49
+ disableInstanceDiscovery: true
50
+ });
51
+ return workloadIdentityCredential.getToken(scopes, getTokenOptions);
52
+ }
40
53
  };
41
- //# sourceMappingURL=tokenExchangeMsi.js.map
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ tokenExchangeMsi
57
+ });
58
+ //# sourceMappingURL=tokenExchangeMsi.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"tokenExchangeMsi.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/tokenExchangeMsi.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC,oFAA8E;AAC9E,sDAAyD;AAGzD,MAAM,OAAO,GAAG,4CAA4C,CAAC;AAC7D,MAAM,MAAM,GAAG,IAAA,6BAAgB,EAAC,OAAO,CAAC,CAAC;AAEzC;;;;;GAKG;AACU,QAAA,gBAAgB,GAAG;IAC9B,IAAI,EAAE,kBAAkB;IACxB,KAAK,CAAC,WAAW,CAAC,QAAiB;QACjC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACxB,MAAM,MAAM,GAAG,OAAO,CACpB,CAAC,QAAQ,IAAI,GAAG,CAAC,eAAe,CAAC;YACjC,GAAG,CAAC,eAAe;YACnB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CACvC,CAAC;QACF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CACT,GAAG,OAAO,qKAAqK,CAChL,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,KAAK,CAAC,QAAQ,CACZ,aAA+B,EAC/B,kBAAmC,EAAE;QAErC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC;QAC3C,MAAM,oCAAoC,GAAG,EAAE,CAAC;QAChD,MAAM,0BAA0B,GAAG,IAAI,0DAA0B,CAAC;YAChE,QAAQ;YACR,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;YACrC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B;YACrD,GAAG,oCAAoC;YACvC,wBAAwB,EAAE,IAAI;SACM,CAAC,CAAC;QACxC,OAAO,0BAA0B,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACtE,CAAC;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport type { MSIConfiguration } from \"./models.js\";\nimport { WorkloadIdentityCredential } from \"../workloadIdentityCredential.js\";\nimport { credentialLogger } from \"../../util/logging.js\";\nimport type { WorkloadIdentityCredentialOptions } from \"../workloadIdentityCredentialOptions.js\";\n\nconst msiName = \"ManagedIdentityCredential - Token Exchange\";\nconst logger = credentialLogger(msiName);\n\n/**\n * Defines how to determine whether the token exchange MSI is available, and also how to retrieve a token from the token exchange MSI.\n *\n * Token exchange MSI (used by AKS) is the only MSI implementation handled entirely by Azure Identity.\n * The rest have been migrated to MSAL.\n */\nexport const tokenExchangeMsi = {\n name: \"tokenExchangeMsi\",\n async isAvailable(clientId?: string): Promise<boolean> {\n const env = process.env;\n const result = Boolean(\n (clientId || env.AZURE_CLIENT_ID) &&\n env.AZURE_TENANT_ID &&\n process.env.AZURE_FEDERATED_TOKEN_FILE,\n );\n if (!result) {\n logger.info(\n `${msiName}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`,\n );\n }\n return result;\n },\n async getToken(\n configuration: MSIConfiguration,\n getTokenOptions: GetTokenOptions = {},\n ): Promise<AccessToken | null> {\n const { scopes, clientId } = configuration;\n const identityClientTokenCredentialOptions = {};\n const workloadIdentityCredential = new WorkloadIdentityCredential({\n clientId,\n tenantId: process.env.AZURE_TENANT_ID,\n tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE,\n ...identityClientTokenCredentialOptions,\n disableInstanceDiscovery: true,\n } as WorkloadIdentityCredentialOptions);\n return workloadIdentityCredential.getToken(scopes, getTokenOptions);\n },\n};\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/credentials/managedIdentityCredential/tokenExchangeMsi.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions } from \"@azure/core-auth\";\nimport type { MSIConfiguration } from \"./models.js\";\nimport { WorkloadIdentityCredential } from \"../workloadIdentityCredential.js\";\nimport { credentialLogger } from \"../../util/logging.js\";\nimport type { WorkloadIdentityCredentialOptions } from \"../workloadIdentityCredentialOptions.js\";\n\nconst msiName = \"ManagedIdentityCredential - Token Exchange\";\nconst logger = credentialLogger(msiName);\n\n/**\n * Defines how to determine whether the token exchange MSI is available, and also how to retrieve a token from the token exchange MSI.\n *\n * Token exchange MSI (used by AKS) is the only MSI implementation handled entirely by Azure Identity.\n * The rest have been migrated to MSAL.\n */\nexport const tokenExchangeMsi = {\n name: \"tokenExchangeMsi\",\n async isAvailable(clientId?: string): Promise<boolean> {\n const env = process.env;\n const result = Boolean(\n (clientId || env.AZURE_CLIENT_ID) &&\n env.AZURE_TENANT_ID &&\n process.env.AZURE_FEDERATED_TOKEN_FILE,\n );\n if (!result) {\n logger.info(\n `${msiName}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`,\n );\n }\n return result;\n },\n async getToken(\n configuration: MSIConfiguration,\n getTokenOptions: GetTokenOptions = {},\n ): Promise<AccessToken | null> {\n const { scopes, clientId } = configuration;\n const identityClientTokenCredentialOptions = {};\n const workloadIdentityCredential = new WorkloadIdentityCredential({\n clientId,\n tenantId: process.env.AZURE_TENANT_ID,\n tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE,\n ...identityClientTokenCredentialOptions,\n disableInstanceDiscovery: true,\n } as WorkloadIdentityCredentialOptions);\n return workloadIdentityCredential.getToken(scopes, getTokenOptions);\n },\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,wCAA2C;AAC3C,qBAAiC;AAGjC,MAAM,UAAU;AAChB,MAAM,aAAS,iCAAiB,OAAO;AAQhC,MAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM,YAAY,UAAqC;AACrD,UAAM,MAAM,QAAQ;AACpB,UAAM,SAAS;AAAA,OACZ,YAAY,IAAI,oBACjB,IAAI,mBACJ,QAAQ,IAAI;AAAA,IACd;AACA,QAAI,CAAC,QAAQ;AACX,aAAO;AAAA,QACL,GAAG,OAAO;AAAA,MACZ;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EACA,MAAM,SACJ,eACA,kBAAmC,CAAC,GACP;AAC7B,UAAM,EAAE,QAAQ,SAAS,IAAI;AAC7B,UAAM,uCAAuC,CAAC;AAC9C,UAAM,6BAA6B,IAAI,6DAA2B;AAAA,MAChE;AAAA,MACA,UAAU,QAAQ,IAAI;AAAA,MACtB,eAAe,QAAQ,IAAI;AAAA,MAC3B,GAAG;AAAA,MACH,0BAA0B;AAAA,IAC5B,CAAsC;AACtC,WAAO,2BAA2B,SAAS,QAAQ,eAAe;AAAA,EACpE;AACF;",
6
+ "names": []
7
+ }
@@ -1,87 +1,91 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.serviceFabricErrorMessage = void 0;
6
- exports.mapScopesToResource = mapScopesToResource;
7
- exports.parseExpirationTimestamp = parseExpirationTimestamp;
8
- exports.parseRefreshTimestamp = parseRefreshTimestamp;
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 utils_exports = {};
19
+ __export(utils_exports, {
20
+ mapScopesToResource: () => mapScopesToResource,
21
+ parseExpirationTimestamp: () => parseExpirationTimestamp,
22
+ parseRefreshTimestamp: () => parseRefreshTimestamp,
23
+ serviceFabricErrorMessage: () => serviceFabricErrorMessage
24
+ });
25
+ module.exports = __toCommonJS(utils_exports);
9
26
  const DefaultScopeSuffix = "/.default";
10
- /**
11
- * Error message for Service Fabric Managed Identity environment.
12
- */
13
- exports.serviceFabricErrorMessage = "Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information";
14
- /**
15
- * Most MSIs send requests to the IMDS endpoint, or a similar endpoint.
16
- * These are GET requests that require sending a `resource` parameter on the query.
17
- * This resource can be derived from the scopes received through the getToken call, as long as only one scope is received.
18
- * Multiple scopes assume that the resulting token will have access to multiple resources, which won't be the case.
19
- *
20
- * For that reason, when we encounter multiple scopes, we return undefined.
21
- * It's up to the individual MSI implementations to throw the errors (which helps us provide less generic errors).
22
- */
27
+ const serviceFabricErrorMessage = "Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information";
23
28
  function mapScopesToResource(scopes) {
24
- let scope = "";
25
- if (Array.isArray(scopes)) {
26
- if (scopes.length !== 1) {
27
- return;
28
- }
29
- scope = scopes[0];
29
+ let scope = "";
30
+ if (Array.isArray(scopes)) {
31
+ if (scopes.length !== 1) {
32
+ return;
30
33
  }
31
- else if (typeof scopes === "string") {
32
- scope = scopes;
33
- }
34
- if (!scope.endsWith(DefaultScopeSuffix)) {
35
- return scope;
36
- }
37
- return scope.substr(0, scope.lastIndexOf(DefaultScopeSuffix));
34
+ scope = scopes[0];
35
+ } else if (typeof scopes === "string") {
36
+ scope = scopes;
37
+ }
38
+ if (!scope.endsWith(DefaultScopeSuffix)) {
39
+ return scope;
40
+ }
41
+ return scope.substr(0, scope.lastIndexOf(DefaultScopeSuffix));
38
42
  }
39
- /**
40
- * Given a token response, return the expiration timestamp as the number of milliseconds from the Unix epoch.
41
- * @param body - A parsed response body from the authentication endpoint.
42
- */
43
43
  function parseExpirationTimestamp(body) {
44
- if (typeof body.expires_on === "number") {
45
- return body.expires_on * 1000;
46
- }
47
- if (typeof body.expires_on === "string") {
48
- const asNumber = +body.expires_on;
49
- if (!isNaN(asNumber)) {
50
- return asNumber * 1000;
51
- }
52
- const asDate = Date.parse(body.expires_on);
53
- if (!isNaN(asDate)) {
54
- return asDate;
55
- }
44
+ if (typeof body.expires_on === "number") {
45
+ return body.expires_on * 1e3;
46
+ }
47
+ if (typeof body.expires_on === "string") {
48
+ const asNumber = +body.expires_on;
49
+ if (!isNaN(asNumber)) {
50
+ return asNumber * 1e3;
56
51
  }
57
- if (typeof body.expires_in === "number") {
58
- return Date.now() + body.expires_in * 1000;
52
+ const asDate = Date.parse(body.expires_on);
53
+ if (!isNaN(asDate)) {
54
+ return asDate;
59
55
  }
60
- throw new Error(`Failed to parse token expiration from body. expires_in="${body.expires_in}", expires_on="${body.expires_on}"`);
56
+ }
57
+ if (typeof body.expires_in === "number") {
58
+ return Date.now() + body.expires_in * 1e3;
59
+ }
60
+ throw new Error(
61
+ `Failed to parse token expiration from body. expires_in="${body.expires_in}", expires_on="${body.expires_on}"`
62
+ );
61
63
  }
62
- /**
63
- * Given a token response, return the expiration timestamp as the number of milliseconds from the Unix epoch.
64
- * @param body - A parsed response body from the authentication endpoint.
65
- */
66
64
  function parseRefreshTimestamp(body) {
67
- if (body.refresh_on) {
68
- if (typeof body.refresh_on === "number") {
69
- return body.refresh_on * 1000;
70
- }
71
- if (typeof body.refresh_on === "string") {
72
- const asNumber = +body.refresh_on;
73
- if (!isNaN(asNumber)) {
74
- return asNumber * 1000;
75
- }
76
- const asDate = Date.parse(body.refresh_on);
77
- if (!isNaN(asDate)) {
78
- return asDate;
79
- }
80
- }
81
- throw new Error(`Failed to parse refresh_on from body. refresh_on="${body.refresh_on}"`);
65
+ if (body.refresh_on) {
66
+ if (typeof body.refresh_on === "number") {
67
+ return body.refresh_on * 1e3;
82
68
  }
83
- else {
84
- return undefined;
69
+ if (typeof body.refresh_on === "string") {
70
+ const asNumber = +body.refresh_on;
71
+ if (!isNaN(asNumber)) {
72
+ return asNumber * 1e3;
73
+ }
74
+ const asDate = Date.parse(body.refresh_on);
75
+ if (!isNaN(asDate)) {
76
+ return asDate;
77
+ }
85
78
  }
79
+ throw new Error(`Failed to parse refresh_on from body. refresh_on="${body.refresh_on}"`);
80
+ } else {
81
+ return void 0;
82
+ }
86
83
  }
87
- //# sourceMappingURL=utils.js.map
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ mapScopesToResource,
87
+ parseExpirationTimestamp,
88
+ parseRefreshTimestamp,
89
+ serviceFabricErrorMessage
90
+ });
91
+ //# sourceMappingURL=utils.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/credentials/managedIdentityCredential/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAmBlC,kDAiBC;AAmBD,4DAwBC;AAMD,sDAqBC;AAxGD,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC;;GAEG;AACU,QAAA,yBAAyB,GACpC,6QAA6Q,CAAC;AAEhR;;;;;;;;GAQG;AACH,SAAgB,mBAAmB,CAAC,MAAyB;IAC3D,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO;QACT,CAAC;QAED,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,KAAK,GAAG,MAAM,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAChE,CAAC;AAeD;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,IAA6B;IACpE,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAChC,CAAC;IAED,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrB,OAAO,QAAQ,GAAG,IAAI,CAAC;QACzB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAED,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC7C,CAAC;IAED,MAAM,IAAI,KAAK,CACb,2DAA2D,IAAI,CAAC,UAAU,kBAAkB,IAAI,CAAC,UAAU,GAAG,CAC/G,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,IAA6B;IACjE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC;QAED,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;YACxC,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;YAClC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACrB,OAAO,QAAQ,GAAG,IAAI,CAAC;YACzB,CAAC;YAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC3C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnB,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,qDAAqD,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;IAC3F,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst DefaultScopeSuffix = \"/.default\";\n\n/**\n * Error message for Service Fabric Managed Identity environment.\n */\nexport const serviceFabricErrorMessage =\n \"Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information\";\n\n/**\n * Most MSIs send requests to the IMDS endpoint, or a similar endpoint.\n * These are GET requests that require sending a `resource` parameter on the query.\n * This resource can be derived from the scopes received through the getToken call, as long as only one scope is received.\n * Multiple scopes assume that the resulting token will have access to multiple resources, which won't be the case.\n *\n * For that reason, when we encounter multiple scopes, we return undefined.\n * It's up to the individual MSI implementations to throw the errors (which helps us provide less generic errors).\n */\nexport function mapScopesToResource(scopes: string | string[]): string | undefined {\n let scope = \"\";\n if (Array.isArray(scopes)) {\n if (scopes.length !== 1) {\n return;\n }\n\n scope = scopes[0];\n } else if (typeof scopes === \"string\") {\n scope = scopes;\n }\n\n if (!scope.endsWith(DefaultScopeSuffix)) {\n return scope;\n }\n\n return scope.substr(0, scope.lastIndexOf(DefaultScopeSuffix));\n}\n\n/**\n * Internal type roughly matching the raw responses of the authentication endpoints.\n *\n * @internal\n */\nexport interface TokenResponseParsedBody {\n access_token?: string;\n refresh_token?: string;\n expires_in: number;\n expires_on?: number | string;\n refresh_on?: number | string;\n}\n\n/**\n * Given a token response, return the expiration timestamp as the number of milliseconds from the Unix epoch.\n * @param body - A parsed response body from the authentication endpoint.\n */\nexport function parseExpirationTimestamp(body: TokenResponseParsedBody): number {\n if (typeof body.expires_on === \"number\") {\n return body.expires_on * 1000;\n }\n\n if (typeof body.expires_on === \"string\") {\n const asNumber = +body.expires_on;\n if (!isNaN(asNumber)) {\n return asNumber * 1000;\n }\n\n const asDate = Date.parse(body.expires_on);\n if (!isNaN(asDate)) {\n return asDate;\n }\n }\n\n if (typeof body.expires_in === \"number\") {\n return Date.now() + body.expires_in * 1000;\n }\n\n throw new Error(\n `Failed to parse token expiration from body. expires_in=\"${body.expires_in}\", expires_on=\"${body.expires_on}\"`,\n );\n}\n\n/**\n * Given a token response, return the expiration timestamp as the number of milliseconds from the Unix epoch.\n * @param body - A parsed response body from the authentication endpoint.\n */\nexport function parseRefreshTimestamp(body: TokenResponseParsedBody): number | undefined {\n if (body.refresh_on) {\n if (typeof body.refresh_on === \"number\") {\n return body.refresh_on * 1000;\n }\n\n if (typeof body.refresh_on === \"string\") {\n const asNumber = +body.refresh_on;\n if (!isNaN(asNumber)) {\n return asNumber * 1000;\n }\n\n const asDate = Date.parse(body.refresh_on);\n if (!isNaN(asDate)) {\n return asDate;\n }\n }\n throw new Error(`Failed to parse refresh_on from body. refresh_on=\"${body.refresh_on}\"`);\n } else {\n return undefined;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/credentials/managedIdentityCredential/utils.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst DefaultScopeSuffix = \"/.default\";\n\n/**\n * Error message for Service Fabric Managed Identity environment.\n */\nexport const serviceFabricErrorMessage =\n \"Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information\";\n\n/**\n * Most MSIs send requests to the IMDS endpoint, or a similar endpoint.\n * These are GET requests that require sending a `resource` parameter on the query.\n * This resource can be derived from the scopes received through the getToken call, as long as only one scope is received.\n * Multiple scopes assume that the resulting token will have access to multiple resources, which won't be the case.\n *\n * For that reason, when we encounter multiple scopes, we return undefined.\n * It's up to the individual MSI implementations to throw the errors (which helps us provide less generic errors).\n */\nexport function mapScopesToResource(scopes: string | string[]): string | undefined {\n let scope = \"\";\n if (Array.isArray(scopes)) {\n if (scopes.length !== 1) {\n return;\n }\n\n scope = scopes[0];\n } else if (typeof scopes === \"string\") {\n scope = scopes;\n }\n\n if (!scope.endsWith(DefaultScopeSuffix)) {\n return scope;\n }\n\n return scope.substr(0, scope.lastIndexOf(DefaultScopeSuffix));\n}\n\n/**\n * Internal type roughly matching the raw responses of the authentication endpoints.\n *\n * @internal\n */\nexport interface TokenResponseParsedBody {\n access_token?: string;\n refresh_token?: string;\n expires_in: number;\n expires_on?: number | string;\n refresh_on?: number | string;\n}\n\n/**\n * Given a token response, return the expiration timestamp as the number of milliseconds from the Unix epoch.\n * @param body - A parsed response body from the authentication endpoint.\n */\nexport function parseExpirationTimestamp(body: TokenResponseParsedBody): number {\n if (typeof body.expires_on === \"number\") {\n return body.expires_on * 1000;\n }\n\n if (typeof body.expires_on === \"string\") {\n const asNumber = +body.expires_on;\n if (!isNaN(asNumber)) {\n return asNumber * 1000;\n }\n\n const asDate = Date.parse(body.expires_on);\n if (!isNaN(asDate)) {\n return asDate;\n }\n }\n\n if (typeof body.expires_in === \"number\") {\n return Date.now() + body.expires_in * 1000;\n }\n\n throw new Error(\n `Failed to parse token expiration from body. expires_in=\"${body.expires_in}\", expires_on=\"${body.expires_on}\"`,\n );\n}\n\n/**\n * Given a token response, return the expiration timestamp as the number of milliseconds from the Unix epoch.\n * @param body - A parsed response body from the authentication endpoint.\n */\nexport function parseRefreshTimestamp(body: TokenResponseParsedBody): number | undefined {\n if (body.refresh_on) {\n if (typeof body.refresh_on === \"number\") {\n return body.refresh_on * 1000;\n }\n\n if (typeof body.refresh_on === \"string\") {\n const asNumber = +body.refresh_on;\n if (!isNaN(asNumber)) {\n return asNumber * 1000;\n }\n\n const asDate = Date.parse(body.refresh_on);\n if (!isNaN(asDate)) {\n return asDate;\n }\n }\n throw new Error(`Failed to parse refresh_on from body. refresh_on=\"${body.refresh_on}\"`);\n } else {\n return undefined;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,MAAM,qBAAqB;AAKpB,MAAM,4BACX;AAWK,SAAS,oBAAoB,QAA+C;AACjF,MAAI,QAAQ;AACZ,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,QAAI,OAAO,WAAW,GAAG;AACvB;AAAA,IACF;AAEA,YAAQ,OAAO,CAAC;AAAA,EAClB,WAAW,OAAO,WAAW,UAAU;AACrC,YAAQ;AAAA,EACV;AAEA,MAAI,CAAC,MAAM,SAAS,kBAAkB,GAAG;AACvC,WAAO;AAAA,EACT;AAEA,SAAO,MAAM,OAAO,GAAG,MAAM,YAAY,kBAAkB,CAAC;AAC9D;AAmBO,SAAS,yBAAyB,MAAuC;AAC9E,MAAI,OAAO,KAAK,eAAe,UAAU;AACvC,WAAO,KAAK,aAAa;AAAA,EAC3B;AAEA,MAAI,OAAO,KAAK,eAAe,UAAU;AACvC,UAAM,WAAW,CAAC,KAAK;AACvB,QAAI,CAAC,MAAM,QAAQ,GAAG;AACpB,aAAO,WAAW;AAAA,IACpB;AAEA,UAAM,SAAS,KAAK,MAAM,KAAK,UAAU;AACzC,QAAI,CAAC,MAAM,MAAM,GAAG;AAClB,aAAO;AAAA,IACT;AAAA,EACF;AAEA,MAAI,OAAO,KAAK,eAAe,UAAU;AACvC,WAAO,KAAK,IAAI,IAAI,KAAK,aAAa;AAAA,EACxC;AAEA,QAAM,IAAI;AAAA,IACR,2DAA2D,KAAK,UAAU,kBAAkB,KAAK,UAAU;AAAA,EAC7G;AACF;AAMO,SAAS,sBAAsB,MAAmD;AACvF,MAAI,KAAK,YAAY;AACnB,QAAI,OAAO,KAAK,eAAe,UAAU;AACvC,aAAO,KAAK,aAAa;AAAA,IAC3B;AAEA,QAAI,OAAO,KAAK,eAAe,UAAU;AACvC,YAAM,WAAW,CAAC,KAAK;AACvB,UAAI,CAAC,MAAM,QAAQ,GAAG;AACpB,eAAO,WAAW;AAAA,MACpB;AAEA,YAAM,SAAS,KAAK,MAAM,KAAK,UAAU;AACzC,UAAI,CAAC,MAAM,MAAM,GAAG;AAClB,eAAO;AAAA,MACT;AAAA,IACF;AACA,UAAM,IAAI,MAAM,qDAAqD,KAAK,UAAU,GAAG;AAAA,EACzF,OAAO;AACL,WAAO;AAAA,EACT;AACF;",
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=multiTenantTokenCredentialOptions.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 multiTenantTokenCredentialOptions_exports = {};
15
+ module.exports = __toCommonJS(multiTenantTokenCredentialOptions_exports);
16
+ //# sourceMappingURL=multiTenantTokenCredentialOptions.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"multiTenantTokenCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/multiTenantTokenCredentialOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\n\n/**\n * Options for multi-tenant applications which allows for additionally allowed tenants.\n */\nexport interface MultiTenantTokenCredentialOptions extends TokenCredentialOptions {\n /**\n * For multi-tenant applications, specifies additional tenants for which the credential may acquire tokens.\n * Add the wildcard value \"*\" to allow the credential to acquire tokens for any tenant the application is installed.\n */\n additionallyAllowedTenants?: string[];\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/credentials/multiTenantTokenCredentialOptions.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredentialOptions } from \"../tokenCredentialOptions.js\";\n\n/**\n * Options for multi-tenant applications which allows for additionally allowed tenants.\n */\nexport interface MultiTenantTokenCredentialOptions extends TokenCredentialOptions {\n /**\n * For multi-tenant applications, specifies additional tenants for which the credential may acquire tokens.\n * Add the wildcard value \"*\" to allow the credential to acquire tokens for any tenant the application is installed.\n */\n additionallyAllowedTenants?: string[];\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }