daftari 3.13.1 → 3.15.0

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 (278) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/consolidate/index.d.ts.map +1 -1
  3. package/dist/consolidate/index.js +3 -12
  4. package/dist/consolidate/index.js.map +1 -1
  5. package/dist/distill/cli.d.ts.map +1 -1
  6. package/dist/distill/cli.js +2 -1
  7. package/dist/distill/cli.js.map +1 -1
  8. package/dist/distill/cost.d.ts +3 -3
  9. package/dist/distill/cost.d.ts.map +1 -1
  10. package/dist/distill/index.d.ts.map +1 -1
  11. package/dist/distill/index.js +3 -15
  12. package/dist/distill/index.js.map +1 -1
  13. package/dist/distill/propose.d.ts.map +1 -1
  14. package/dist/distill/propose.js +10 -3
  15. package/dist/distill/propose.js.map +1 -1
  16. package/dist/distill/state.d.ts +12 -0
  17. package/dist/distill/state.d.ts.map +1 -1
  18. package/dist/distill/state.js +16 -6
  19. package/dist/distill/state.js.map +1 -1
  20. package/dist/eval/index.d.ts.map +1 -1
  21. package/dist/eval/index.js +11 -16
  22. package/dist/eval/index.js.map +1 -1
  23. package/dist/eval/llm-openrouter.d.ts +4 -1
  24. package/dist/eval/llm-openrouter.d.ts.map +1 -1
  25. package/dist/eval/llm-openrouter.js +21 -5
  26. package/dist/eval/llm-openrouter.js.map +1 -1
  27. package/dist/eval/transport.d.ts +5 -0
  28. package/dist/eval/transport.d.ts.map +1 -0
  29. package/dist/eval/transport.js +27 -0
  30. package/dist/eval/transport.js.map +1 -0
  31. package/dist/extract/index.d.ts +16 -0
  32. package/dist/extract/index.d.ts.map +1 -0
  33. package/dist/extract/index.js +95 -0
  34. package/dist/extract/index.js.map +1 -0
  35. package/dist/extract/normalize.d.ts +7 -0
  36. package/dist/extract/normalize.d.ts.map +1 -0
  37. package/dist/extract/normalize.js +52 -0
  38. package/dist/extract/normalize.js.map +1 -0
  39. package/dist/extract/office.d.ts +63 -0
  40. package/dist/extract/office.d.ts.map +1 -0
  41. package/dist/extract/office.js +763 -0
  42. package/dist/extract/office.js.map +1 -0
  43. package/dist/extract/pdf.d.ts +16 -0
  44. package/dist/extract/pdf.d.ts.map +1 -0
  45. package/dist/extract/pdf.js +196 -0
  46. package/dist/extract/pdf.js.map +1 -0
  47. package/dist/extract/types.d.ts +55 -0
  48. package/dist/extract/types.d.ts.map +1 -0
  49. package/dist/extract/types.js +47 -0
  50. package/dist/extract/types.js.map +1 -0
  51. package/dist/extract/worker.d.ts +2 -0
  52. package/dist/extract/worker.d.ts.map +1 -0
  53. package/dist/extract/worker.js +57 -0
  54. package/dist/extract/worker.js.map +1 -0
  55. package/dist/integrations/engine.d.ts +174 -3
  56. package/dist/integrations/engine.d.ts.map +1 -1
  57. package/dist/integrations/engine.js +184 -16
  58. package/dist/integrations/engine.js.map +1 -1
  59. package/dist/integrations/google.d.ts +2 -1
  60. package/dist/integrations/google.d.ts.map +1 -1
  61. package/dist/integrations/google.js +12 -117
  62. package/dist/integrations/google.js.map +1 -1
  63. package/dist/integrations/http-json.d.ts +27 -0
  64. package/dist/integrations/http-json.d.ts.map +1 -0
  65. package/dist/integrations/http-json.js +148 -0
  66. package/dist/integrations/http-json.js.map +1 -0
  67. package/dist/integrations/microsoft.d.ts +22 -0
  68. package/dist/integrations/microsoft.d.ts.map +1 -0
  69. package/dist/integrations/microsoft.js +1780 -0
  70. package/dist/integrations/microsoft.js.map +1 -0
  71. package/dist/integrations/microsoft.ui.d.ts +18 -0
  72. package/dist/integrations/microsoft.ui.d.ts.map +1 -0
  73. package/dist/integrations/microsoft.ui.js +131 -0
  74. package/dist/integrations/microsoft.ui.js.map +1 -0
  75. package/dist/integrations/oauth.d.ts.map +1 -1
  76. package/dist/integrations/oauth.js +10 -2
  77. package/dist/integrations/oauth.js.map +1 -1
  78. package/dist/integrations/queue.d.ts +1 -1
  79. package/dist/integrations/queue.d.ts.map +1 -1
  80. package/dist/integrations/queue.js +23 -1
  81. package/dist/integrations/queue.js.map +1 -1
  82. package/dist/integrations/routes.d.ts +26 -0
  83. package/dist/integrations/routes.d.ts.map +1 -1
  84. package/dist/integrations/routes.js +502 -8
  85. package/dist/integrations/routes.js.map +1 -1
  86. package/dist/integrations/runtime.d.ts +14 -2
  87. package/dist/integrations/runtime.d.ts.map +1 -1
  88. package/dist/integrations/runtime.js +39 -7
  89. package/dist/integrations/runtime.js.map +1 -1
  90. package/dist/integrations/state.d.ts +1 -1
  91. package/dist/integrations/state.d.ts.map +1 -1
  92. package/dist/integrations/state.js +48 -8
  93. package/dist/integrations/state.js.map +1 -1
  94. package/dist/integrations/types.d.ts +54 -3
  95. package/dist/integrations/types.d.ts.map +1 -1
  96. package/dist/integrations/types.js +21 -1
  97. package/dist/integrations/types.js.map +1 -1
  98. package/dist/search/watcher.d.ts.map +1 -1
  99. package/dist/search/watcher.js +3 -22
  100. package/dist/search/watcher.js.map +1 -1
  101. package/dist/serve/index.d.ts.map +1 -1
  102. package/dist/serve/index.js +7 -0
  103. package/dist/serve/index.js.map +1 -1
  104. package/dist/sleep/index.d.ts.map +1 -1
  105. package/dist/sleep/index.js +6 -16
  106. package/dist/sleep/index.js.map +1 -1
  107. package/dist/sleep/report.js +1 -1
  108. package/dist/sleep/report.js.map +1 -1
  109. package/dist/sleep/tension-scan.d.ts.map +1 -1
  110. package/dist/sleep/tension-scan.js +0 -0
  111. package/dist/sleep/tension-scan.js.map +1 -1
  112. package/dist/storage/local.d.ts +1 -0
  113. package/dist/storage/local.d.ts.map +1 -1
  114. package/dist/storage/local.js +8 -1
  115. package/dist/storage/local.js.map +1 -1
  116. package/dist/utils/config.d.ts +8 -1
  117. package/dist/utils/config.d.ts.map +1 -1
  118. package/dist/utils/config.js +143 -19
  119. package/dist/utils/config.js.map +1 -1
  120. package/dist/view/pages.d.ts.map +1 -1
  121. package/dist/view/pages.js +11 -0
  122. package/dist/view/pages.js.map +1 -1
  123. package/dist/view/render.d.ts.map +1 -1
  124. package/dist/view/render.js +37 -2
  125. package/dist/view/render.js.map +1 -1
  126. package/package.json +8 -3
  127. package/src/integrations/microsoft/assets/VENDORING.md +109 -0
  128. package/src/integrations/microsoft/assets/glue.js +244 -0
  129. package/src/integrations/microsoft/assets/picker-serializer.js +99 -0
  130. package/src/integrations/microsoft/assets/vendor/msal-browser/app/IPublicClientApplication.mjs +91 -0
  131. package/src/integrations/microsoft/assets/vendor/msal-browser/app/PublicClientApplication.mjs +355 -0
  132. package/src/integrations/microsoft/assets/vendor/msal-browser/broker/nativeBroker/NativeStatusCodes.mjs +15 -0
  133. package/src/integrations/microsoft/assets/vendor/msal-browser/broker/nativeBroker/PlatformAuthDOMHandler.mjs +153 -0
  134. package/src/integrations/microsoft/assets/vendor/msal-browser/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +271 -0
  135. package/src/integrations/microsoft/assets/vendor/msal-browser/broker/nativeBroker/PlatformAuthProvider.mjs +95 -0
  136. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/AccountManager.mjs +49 -0
  137. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/AsyncMemoryStorage.mjs +144 -0
  138. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/BrowserCacheManager.mjs +1465 -0
  139. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/CacheHelpers.mjs +45 -0
  140. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/CacheKeys.mjs +32 -0
  141. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/CookieStorage.mjs +94 -0
  142. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/DatabaseStorage.mjs +208 -0
  143. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/EncryptedData.mjs +13 -0
  144. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/LocalStorage.mjs +319 -0
  145. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/MemoryStorage.mjs +48 -0
  146. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/SessionStorage.mjs +46 -0
  147. package/src/integrations/microsoft/assets/vendor/msal-browser/cache/TokenCache.mjs +220 -0
  148. package/src/integrations/microsoft/assets/vendor/msal-browser/config/Configuration.mjs +138 -0
  149. package/src/integrations/microsoft/assets/vendor/msal-browser/controllers/NestedAppAuthController.mjs +483 -0
  150. package/src/integrations/microsoft/assets/vendor/msal-browser/controllers/StandardController.mjs +1532 -0
  151. package/src/integrations/microsoft/assets/vendor/msal-browser/crypto/BrowserCrypto.mjs +354 -0
  152. package/src/integrations/microsoft/assets/vendor/msal-browser/crypto/CryptoOps.mjs +146 -0
  153. package/src/integrations/microsoft/assets/vendor/msal-browser/crypto/PkceGenerator.mjs +63 -0
  154. package/src/integrations/microsoft/assets/vendor/msal-browser/crypto/SignedHttpRequest.mjs +50 -0
  155. package/src/integrations/microsoft/assets/vendor/msal-browser/crypto/TokenBindingKeyManager.mjs +156 -0
  156. package/src/integrations/microsoft/assets/vendor/msal-browser/encode/Base64Decode.mjs +43 -0
  157. package/src/integrations/microsoft/assets/vendor/msal-browser/encode/Base64Encode.mjs +47 -0
  158. package/src/integrations/microsoft/assets/vendor/msal-browser/error/BrowserAuthError.mjs +26 -0
  159. package/src/integrations/microsoft/assets/vendor/msal-browser/error/BrowserAuthErrorCodes.mjs +65 -0
  160. package/src/integrations/microsoft/assets/vendor/msal-browser/error/BrowserConfigurationAuthError.mjs +24 -0
  161. package/src/integrations/microsoft/assets/vendor/msal-browser/error/BrowserConfigurationAuthErrorCodes.mjs +11 -0
  162. package/src/integrations/microsoft/assets/vendor/msal-browser/error/NativeAuthError.mjs +79 -0
  163. package/src/integrations/microsoft/assets/vendor/msal-browser/error/NativeAuthErrorCodes.mjs +12 -0
  164. package/src/integrations/microsoft/assets/vendor/msal-browser/error/NestedAppAuthError.mjs +25 -0
  165. package/src/integrations/microsoft/assets/vendor/msal-browser/event/EventHandler.mjs +110 -0
  166. package/src/integrations/microsoft/assets/vendor/msal-browser/event/EventMessage.mjs +60 -0
  167. package/src/integrations/microsoft/assets/vendor/msal-browser/event/EventType.mjs +30 -0
  168. package/src/integrations/microsoft/assets/vendor/msal-browser/index.mjs +48 -0
  169. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/BaseInteractionClient.mjs +150 -0
  170. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/HybridSpaAuthorizationCodeClient.mjs +16 -0
  171. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/PlatformAuthInteractionClient.mjs +734 -0
  172. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/PopupClient.mjs +528 -0
  173. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/RedirectClient.mjs +464 -0
  174. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/SilentAuthCodeClient.mjs +85 -0
  175. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/SilentCacheClient.mjs +58 -0
  176. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/SilentIframeClient.mjs +255 -0
  177. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/SilentRefreshClient.mjs +77 -0
  178. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_client/StandardInteractionClient.mjs +217 -0
  179. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_handler/InteractionHandler.mjs +95 -0
  180. package/src/integrations/microsoft/assets/vendor/msal-browser/interaction_handler/SilentHandler.mjs +71 -0
  181. package/src/integrations/microsoft/assets/vendor/msal-browser/naa/BridgeError.mjs +11 -0
  182. package/src/integrations/microsoft/assets/vendor/msal-browser/naa/BridgeProxy.mjs +152 -0
  183. package/src/integrations/microsoft/assets/vendor/msal-browser/naa/BridgeStatusCode.mjs +18 -0
  184. package/src/integrations/microsoft/assets/vendor/msal-browser/naa/mapping/NestedAppAuthAdapter.mjs +239 -0
  185. package/src/integrations/microsoft/assets/vendor/msal-browser/navigation/NavigationClient.mjs +47 -0
  186. package/src/integrations/microsoft/assets/vendor/msal-browser/network/FetchClient.mjs +153 -0
  187. package/src/integrations/microsoft/assets/vendor/msal-browser/operatingcontext/BaseOperatingContext.mjs +112 -0
  188. package/src/integrations/microsoft/assets/vendor/msal-browser/operatingcontext/NestedAppOperatingContext.mjs +79 -0
  189. package/src/integrations/microsoft/assets/vendor/msal-browser/operatingcontext/StandardOperatingContext.mjs +50 -0
  190. package/src/integrations/microsoft/assets/vendor/msal-browser/packageMetadata.mjs +7 -0
  191. package/src/integrations/microsoft/assets/vendor/msal-browser/popup_relay/constants.mjs +20 -0
  192. package/src/integrations/microsoft/assets/vendor/msal-browser/popup_relay/relayClient.mjs +113 -0
  193. package/src/integrations/microsoft/assets/vendor/msal-browser/protocol/Authorize.mjs +326 -0
  194. package/src/integrations/microsoft/assets/vendor/msal-browser/request/RequestHelpers.mjs +143 -0
  195. package/src/integrations/microsoft/assets/vendor/msal-browser/response/ResponseHandler.mjs +45 -0
  196. package/src/integrations/microsoft/assets/vendor/msal-browser/telemetry/BrowserPerformanceClient.mjs +126 -0
  197. package/src/integrations/microsoft/assets/vendor/msal-browser/telemetry/BrowserPerformanceEvents.mjs +133 -0
  198. package/src/integrations/microsoft/assets/vendor/msal-browser/telemetry/BrowserPerformanceMeasurement.mjs +96 -0
  199. package/src/integrations/microsoft/assets/vendor/msal-browser/telemetry/BrowserRootPerformanceEvents.mjs +53 -0
  200. package/src/integrations/microsoft/assets/vendor/msal-browser/utils/BrowserConstants.mjs +220 -0
  201. package/src/integrations/microsoft/assets/vendor/msal-browser/utils/BrowserProtocolUtils.mjs +27 -0
  202. package/src/integrations/microsoft/assets/vendor/msal-browser/utils/BrowserUtils.mjs +364 -0
  203. package/src/integrations/microsoft/assets/vendor/msal-browser/utils/Helpers.mjs +19 -0
  204. package/src/integrations/microsoft/assets/vendor/msal-browser/utils/MsalFrameStatsUtils.mjs +38 -0
  205. package/src/integrations/microsoft/assets/vendor/msal-browser/webBrokerBridge/PendingRequestRegistry.mjs +63 -0
  206. package/src/integrations/microsoft/assets/vendor/msal-browser/webBrokerBridge/WebBrokerBridgeError.mjs +38 -0
  207. package/src/integrations/microsoft/assets/vendor/msal-browser/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +57 -0
  208. package/src/integrations/microsoft/assets/vendor/msal-common/account/AccountInfo.mjs +91 -0
  209. package/src/integrations/microsoft/assets/vendor/msal-common/account/AuthToken.mjs +70 -0
  210. package/src/integrations/microsoft/assets/vendor/msal-common/account/CcsCredential.mjs +12 -0
  211. package/src/integrations/microsoft/assets/vendor/msal-common/account/ClientInfo.mjs +43 -0
  212. package/src/integrations/microsoft/assets/vendor/msal-common/account/TokenClaims.mjs +24 -0
  213. package/src/integrations/microsoft/assets/vendor/msal-common/authority/Authority.mjs +988 -0
  214. package/src/integrations/microsoft/assets/vendor/msal-common/authority/AuthorityFactory.mjs +41 -0
  215. package/src/integrations/microsoft/assets/vendor/msal-common/authority/AuthorityMetadata.mjs +158 -0
  216. package/src/integrations/microsoft/assets/vendor/msal-common/authority/AuthorityOptions.mjs +20 -0
  217. package/src/integrations/microsoft/assets/vendor/msal-common/authority/AuthorityType.mjs +16 -0
  218. package/src/integrations/microsoft/assets/vendor/msal-common/authority/CloudInstanceDiscoveryErrorResponse.mjs +12 -0
  219. package/src/integrations/microsoft/assets/vendor/msal-common/authority/CloudInstanceDiscoveryResponse.mjs +12 -0
  220. package/src/integrations/microsoft/assets/vendor/msal-common/authority/OpenIdConfigResponse.mjs +14 -0
  221. package/src/integrations/microsoft/assets/vendor/msal-common/authority/ProtocolMode.mjs +26 -0
  222. package/src/integrations/microsoft/assets/vendor/msal-common/authority/RegionDiscovery.mjs +116 -0
  223. package/src/integrations/microsoft/assets/vendor/msal-common/cache/CacheManager.mjs +1202 -0
  224. package/src/integrations/microsoft/assets/vendor/msal-common/cache/persistence/TokenCacheContext.mjs +29 -0
  225. package/src/integrations/microsoft/assets/vendor/msal-common/cache/utils/AccountEntityUtils.mjs +222 -0
  226. package/src/integrations/microsoft/assets/vendor/msal-common/cache/utils/CacheHelpers.mjs +294 -0
  227. package/src/integrations/microsoft/assets/vendor/msal-common/client/AuthorizationCodeClient.mjs +289 -0
  228. package/src/integrations/microsoft/assets/vendor/msal-common/client/RefreshTokenClient.mjs +262 -0
  229. package/src/integrations/microsoft/assets/vendor/msal-common/client/SilentFlowClient.mjs +142 -0
  230. package/src/integrations/microsoft/assets/vendor/msal-common/config/ClientConfiguration.mjs +111 -0
  231. package/src/integrations/microsoft/assets/vendor/msal-common/constants/AADServerParamKeys.mjs +74 -0
  232. package/src/integrations/microsoft/assets/vendor/msal-common/crypto/DpopProofGenerator.mjs +152 -0
  233. package/src/integrations/microsoft/assets/vendor/msal-common/crypto/ICrypto.mjs +52 -0
  234. package/src/integrations/microsoft/assets/vendor/msal-common/crypto/ITokenBindingKeyManager.mjs +27 -0
  235. package/src/integrations/microsoft/assets/vendor/msal-common/crypto/JoseHeader.mjs +72 -0
  236. package/src/integrations/microsoft/assets/vendor/msal-common/crypto/PopTokenGenerator.mjs +109 -0
  237. package/src/integrations/microsoft/assets/vendor/msal-common/error/AuthError.mjs +31 -0
  238. package/src/integrations/microsoft/assets/vendor/msal-common/error/AuthErrorCodes.mjs +13 -0
  239. package/src/integrations/microsoft/assets/vendor/msal-common/error/CacheError.mjs +44 -0
  240. package/src/integrations/microsoft/assets/vendor/msal-common/error/CacheErrorCodes.mjs +10 -0
  241. package/src/integrations/microsoft/assets/vendor/msal-common/error/ClientAuthError.mjs +26 -0
  242. package/src/integrations/microsoft/assets/vendor/msal-common/error/ClientAuthErrorCodes.mjs +46 -0
  243. package/src/integrations/microsoft/assets/vendor/msal-common/error/ClientConfigurationError.mjs +23 -0
  244. package/src/integrations/microsoft/assets/vendor/msal-common/error/ClientConfigurationErrorCodes.mjs +38 -0
  245. package/src/integrations/microsoft/assets/vendor/msal-common/error/InteractionRequiredAuthError.mjs +73 -0
  246. package/src/integrations/microsoft/assets/vendor/msal-common/error/InteractionRequiredAuthErrorCodes.mjs +53 -0
  247. package/src/integrations/microsoft/assets/vendor/msal-common/error/JoseHeaderError.mjs +24 -0
  248. package/src/integrations/microsoft/assets/vendor/msal-common/error/JoseHeaderErrorCodes.mjs +12 -0
  249. package/src/integrations/microsoft/assets/vendor/msal-common/error/NetworkError.mjs +34 -0
  250. package/src/integrations/microsoft/assets/vendor/msal-common/error/PlatformBrokerError.mjs +48 -0
  251. package/src/integrations/microsoft/assets/vendor/msal-common/error/ServerError.mjs +22 -0
  252. package/src/integrations/microsoft/assets/vendor/msal-common/index-browser.mjs +79 -0
  253. package/src/integrations/microsoft/assets/vendor/msal-common/logger/Logger.mjs +291 -0
  254. package/src/integrations/microsoft/assets/vendor/msal-common/network/INetworkModule.mjs +20 -0
  255. package/src/integrations/microsoft/assets/vendor/msal-common/network/RequestThumbprint.mjs +27 -0
  256. package/src/integrations/microsoft/assets/vendor/msal-common/network/ThrottlingUtils.mjs +91 -0
  257. package/src/integrations/microsoft/assets/vendor/msal-common/packageMetadata.mjs +7 -0
  258. package/src/integrations/microsoft/assets/vendor/msal-common/protocol/Authorize.mjs +239 -0
  259. package/src/integrations/microsoft/assets/vendor/msal-common/protocol/Token.mjs +148 -0
  260. package/src/integrations/microsoft/assets/vendor/msal-common/request/AuthenticationHeaderParser.mjs +63 -0
  261. package/src/integrations/microsoft/assets/vendor/msal-common/request/BaseAuthRequest.mjs +37 -0
  262. package/src/integrations/microsoft/assets/vendor/msal-common/request/RequestParameterBuilder.mjs +529 -0
  263. package/src/integrations/microsoft/assets/vendor/msal-common/request/ScopeSet.mjs +204 -0
  264. package/src/integrations/microsoft/assets/vendor/msal-common/response/ResponseHandler.mjs +432 -0
  265. package/src/integrations/microsoft/assets/vendor/msal-common/telemetry/performance/PerformanceClient.mjs +557 -0
  266. package/src/integrations/microsoft/assets/vendor/msal-common/telemetry/performance/PerformanceEvent.mjs +68 -0
  267. package/src/integrations/microsoft/assets/vendor/msal-common/telemetry/performance/PerformanceEvents.mjs +73 -0
  268. package/src/integrations/microsoft/assets/vendor/msal-common/telemetry/performance/StubPerformanceClient.mjs +61 -0
  269. package/src/integrations/microsoft/assets/vendor/msal-common/telemetry/server/ServerTelemetryManager.mjs +297 -0
  270. package/src/integrations/microsoft/assets/vendor/msal-common/url/UrlString.mjs +164 -0
  271. package/src/integrations/microsoft/assets/vendor/msal-common/utils/ClientAssertionUtils.mjs +21 -0
  272. package/src/integrations/microsoft/assets/vendor/msal-common/utils/Constants.mjs +304 -0
  273. package/src/integrations/microsoft/assets/vendor/msal-common/utils/FunctionWrappers.mjs +95 -0
  274. package/src/integrations/microsoft/assets/vendor/msal-common/utils/ObjectUtils.mjs +27 -0
  275. package/src/integrations/microsoft/assets/vendor/msal-common/utils/ProtocolUtils.mjs +76 -0
  276. package/src/integrations/microsoft/assets/vendor/msal-common/utils/StringUtils.mjs +82 -0
  277. package/src/integrations/microsoft/assets/vendor/msal-common/utils/TimeUtils.mjs +75 -0
  278. package/src/integrations/microsoft/assets/vendor/msal-common/utils/UrlUtils.mjs +128 -0
@@ -0,0 +1,1202 @@
1
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
2
+ 'use strict';
3
+ import { updateAccountTenantProfileData } from '../account/AccountInfo.mjs';
4
+ import { extractTokenClaims } from '../account/AuthToken.mjs';
5
+ import { getAliasesFromStaticSources } from '../authority/AuthorityMetadata.mjs';
6
+ import { AuthError } from '../error/AuthError.mjs';
7
+ import { createCacheError } from '../error/CacheError.mjs';
8
+ import { createClientAuthError } from '../error/ClientAuthError.mjs';
9
+ import { name, version } from '../packageMetadata.mjs';
10
+ import { ScopeSet } from '../request/ScopeSet.mjs';
11
+ import { CredentialType, AuthenticationScheme, THE_FAMILY_ID, APP_METADATA, AUTHORITY_METADATA_CACHE_KEY } from '../utils/Constants.mjs';
12
+ import { getAccountInfo } from './utils/AccountEntityUtils.mjs';
13
+ import { serializeAttributeTokens } from './utils/CacheHelpers.mjs';
14
+ import { invalidCacheRecord, multipleMatchingAppMetadata, methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';
15
+
16
+ /*
17
+ * Copyright (c) Microsoft Corporation. All rights reserved.
18
+ * Licensed under the MIT License.
19
+ */
20
+ /**
21
+ * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.
22
+ * @internal
23
+ */
24
+ class CacheManager {
25
+ constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager) {
26
+ this.clientId = clientId;
27
+ this.cryptoImpl = cryptoImpl;
28
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
29
+ this.commonLogger = logger.clone(name, version);
30
+ this.staticAuthorityOptions = staticAuthorityOptions;
31
+ this.performanceClient = performanceClient;
32
+ }
33
+ /**
34
+ * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
35
+ * @param accountFilter - (Optional) filter to narrow down the accounts returned
36
+ * @returns Array of AccountInfo objects in cache
37
+ */
38
+ getAllAccounts(accountFilter = {}, correlationId) {
39
+ return this.buildTenantProfiles(this.getAccountsFilteredBy(accountFilter, correlationId), correlationId, accountFilter);
40
+ }
41
+ /**
42
+ * Gets first tenanted AccountInfo object found based on provided filters
43
+ */
44
+ getAccountInfoFilteredBy(accountFilter, correlationId) {
45
+ if (Object.keys(accountFilter).length === 0 ||
46
+ Object.values(accountFilter).every((value) => value === null || value === undefined || value === "")) {
47
+ this.commonLogger.warning("1skb02", correlationId);
48
+ return null;
49
+ }
50
+ const allAccounts = this.getAllAccounts(accountFilter, correlationId);
51
+ if (allAccounts.length > 1) {
52
+ // If one or more accounts are found, prioritize accounts that have an ID token
53
+ const sortedAccounts = allAccounts.sort((a, b) => {
54
+ const aHasClaims = a.idTokenClaims ? 1 : 0;
55
+ const bHasClaims = b.idTokenClaims ? 1 : 0;
56
+ return bHasClaims - aHasClaims;
57
+ });
58
+ return sortedAccounts[0];
59
+ }
60
+ else if (allAccounts.length === 1) {
61
+ // If only one account is found, return it regardless of whether a matching ID token was found
62
+ return allAccounts[0];
63
+ }
64
+ else {
65
+ return null;
66
+ }
67
+ }
68
+ /**
69
+ * Returns a single matching
70
+ * @param accountFilter
71
+ * @returns
72
+ */
73
+ getBaseAccountInfo(accountFilter, correlationId) {
74
+ const accountEntities = this.getAccountsFilteredBy(accountFilter, correlationId);
75
+ if (accountEntities.length > 0) {
76
+ return getAccountInfo(accountEntities[0]);
77
+ }
78
+ else {
79
+ return null;
80
+ }
81
+ }
82
+ /**
83
+ * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters
84
+ * and builds the account info objects from the matching ID token's claims
85
+ * @param cachedAccounts
86
+ * @param accountFilter
87
+ * @returns Array of AccountInfo objects that match account and tenant profile filters
88
+ */
89
+ buildTenantProfiles(cachedAccounts, correlationId, accountFilter) {
90
+ return cachedAccounts.flatMap((accountEntity) => {
91
+ return this.getTenantProfilesFromAccountEntity(accountEntity, correlationId, accountFilter?.tenantId, accountFilter);
92
+ });
93
+ }
94
+ getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter) {
95
+ let tenantedAccountInfo = null;
96
+ let idTokenClaims;
97
+ if (tenantProfileFilter) {
98
+ if (!this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter)) {
99
+ return null;
100
+ }
101
+ }
102
+ const idToken = this.getIdToken(accountInfo, correlationId, tokenKeys, tenantProfile.tenantId);
103
+ if (idToken) {
104
+ idTokenClaims = extractTokenClaims(idToken.secret, this.cryptoImpl.base64Decode, correlationId);
105
+ if (!this.idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter)) {
106
+ // ID token sourced claims don't match so this tenant profile is not a match
107
+ return null;
108
+ }
109
+ }
110
+ // Expand tenant profile into account info based on matching tenant profile and if available matching ID token claims
111
+ tenantedAccountInfo = updateAccountTenantProfileData(accountInfo, tenantProfile, idTokenClaims, idToken?.secret);
112
+ return tenantedAccountInfo;
113
+ }
114
+ getTenantProfilesFromAccountEntity(accountEntity, correlationId, targetTenantId, tenantProfileFilter) {
115
+ const accountInfo = getAccountInfo(accountEntity);
116
+ let searchTenantProfiles = accountInfo.tenantProfiles || new Map();
117
+ const tokenKeys = this.getTokenKeys();
118
+ // If a tenant ID was provided, only return the tenant profile for that tenant ID if it exists
119
+ if (targetTenantId) {
120
+ const tenantProfile = searchTenantProfiles.get(targetTenantId);
121
+ if (tenantProfile) {
122
+ // Reduce search field to just this tenant profile
123
+ searchTenantProfiles = new Map([
124
+ [targetTenantId, tenantProfile],
125
+ ]);
126
+ }
127
+ else {
128
+ // No tenant profile for search tenant ID, return empty array
129
+ return [];
130
+ }
131
+ }
132
+ const matchingTenantProfiles = [];
133
+ searchTenantProfiles.forEach((tenantProfile) => {
134
+ const tenantedAccountInfo = this.getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter);
135
+ if (tenantedAccountInfo) {
136
+ matchingTenantProfiles.push(tenantedAccountInfo);
137
+ }
138
+ });
139
+ return matchingTenantProfiles;
140
+ }
141
+ tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter) {
142
+ if (!!tenantProfileFilter.localAccountId &&
143
+ !this.matchLocalAccountIdFromTenantProfile(tenantProfile, tenantProfileFilter.localAccountId)) {
144
+ return false;
145
+ }
146
+ if (!!tenantProfileFilter.name &&
147
+ !(tenantProfile.name === tenantProfileFilter.name)) {
148
+ return false;
149
+ }
150
+ if (tenantProfileFilter.isHomeTenant !== undefined &&
151
+ !(tenantProfile.isHomeTenant === tenantProfileFilter.isHomeTenant)) {
152
+ return false;
153
+ }
154
+ if (!!tenantProfileFilter.username &&
155
+ !this.matchUsername(tenantProfile.username, tenantProfileFilter.username) &&
156
+ !this.matchUsername(tenantProfile.upn, tenantProfileFilter.username)) {
157
+ return false;
158
+ }
159
+ if (!!tenantProfileFilter.loginHint &&
160
+ !this.matchLoginHintWithTenantProfile(tenantProfile, tenantProfileFilter.loginHint)) {
161
+ return false;
162
+ }
163
+ if (!!tenantProfileFilter.upn &&
164
+ !(tenantProfile.upn === tenantProfileFilter.upn)) {
165
+ return false;
166
+ }
167
+ if (!!tenantProfileFilter.nativeAccountId &&
168
+ tenantProfile.nativeAccountId !==
169
+ tenantProfileFilter.nativeAccountId) {
170
+ return false;
171
+ }
172
+ return true;
173
+ }
174
+ idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter) {
175
+ // Tenant Profile filtering
176
+ if (tenantProfileFilter) {
177
+ if (!!tenantProfileFilter.localAccountId &&
178
+ !this.matchLocalAccountIdFromTokenClaims(idTokenClaims, tenantProfileFilter.localAccountId)) {
179
+ return false;
180
+ }
181
+ if (!!tenantProfileFilter.loginHint &&
182
+ !this.matchLoginHintFromTokenClaims(idTokenClaims, tenantProfileFilter.loginHint)) {
183
+ return false;
184
+ }
185
+ if (!!tenantProfileFilter.username &&
186
+ !this.matchUsername(idTokenClaims.preferred_username, tenantProfileFilter.username) &&
187
+ !this.matchUsername(idTokenClaims.upn, tenantProfileFilter.username)) {
188
+ return false;
189
+ }
190
+ if (!!tenantProfileFilter.name &&
191
+ !this.matchName(idTokenClaims, tenantProfileFilter.name)) {
192
+ return false;
193
+ }
194
+ if (!!tenantProfileFilter.sid &&
195
+ !this.matchSid(idTokenClaims, tenantProfileFilter.sid)) {
196
+ return false;
197
+ }
198
+ }
199
+ return true;
200
+ }
201
+ /**
202
+ * saves a cache record
203
+ * @param cacheRecord {CacheRecord}
204
+ * @param storeInCache {?StoreInCache}
205
+ * @param correlationId {?string} correlation id
206
+ */
207
+ async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
208
+ if (!cacheRecord) {
209
+ throw createClientAuthError(invalidCacheRecord, correlationId);
210
+ }
211
+ try {
212
+ if (!!cacheRecord.account) {
213
+ await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
214
+ }
215
+ if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
216
+ await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
217
+ }
218
+ if (!!cacheRecord.accessToken &&
219
+ storeInCache?.accessToken !== false) {
220
+ await this.saveAccessToken(cacheRecord.accessToken, correlationId, kmsi);
221
+ }
222
+ if (!!cacheRecord.refreshToken &&
223
+ storeInCache?.refreshToken !== false) {
224
+ await this.setRefreshTokenCredential(cacheRecord.refreshToken, correlationId, kmsi);
225
+ }
226
+ if (!!cacheRecord.appMetadata) {
227
+ this.setAppMetadata(cacheRecord.appMetadata, correlationId);
228
+ }
229
+ }
230
+ catch (e) {
231
+ this.commonLogger?.error("0j476p", correlationId);
232
+ if (e instanceof AuthError) {
233
+ throw e;
234
+ }
235
+ else {
236
+ throw createCacheError(e);
237
+ }
238
+ }
239
+ }
240
+ /**
241
+ * saves access token credential
242
+ * @param credential - the access token entity to save
243
+ * @param correlationId - unique identifier for the request
244
+ * @param kmsi - keep me signed in flag
245
+ */
246
+ async saveAccessToken(credential, correlationId, kmsi) {
247
+ // Compute hash from components on the entity itself — no need to thread externally.
248
+ let additionalCacheKeyHash;
249
+ if (credential.additionalCacheKeyComponents &&
250
+ Object.keys(credential.additionalCacheKeyComponents).length > 0) {
251
+ additionalCacheKeyHash = await this.cryptoImpl.hashString(JSON.stringify(credential.additionalCacheKeyComponents));
252
+ }
253
+ const accessTokenFilter = {
254
+ clientId: credential.clientId,
255
+ credentialType: credential.credentialType,
256
+ environment: credential.environment,
257
+ homeAccountId: credential.homeAccountId,
258
+ realm: credential.realm,
259
+ tokenType: credential.tokenType,
260
+ };
261
+ const tokenKeys = this.getTokenKeys();
262
+ const currentScopes = ScopeSet.fromString(credential.target, correlationId);
263
+ tokenKeys.accessToken.forEach((key) => {
264
+ if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) {
265
+ return;
266
+ }
267
+ const tokenEntity = this.getAccessTokenCredential(key, correlationId);
268
+ if (tokenEntity &&
269
+ this.credentialMatchesFilter(tokenEntity, accessTokenFilter, correlationId)) {
270
+ const tokenScopeSet = ScopeSet.fromString(tokenEntity.target, correlationId);
271
+ if (tokenScopeSet.intersectingScopeSets(currentScopes)) {
272
+ this.removeAccessToken(key, correlationId);
273
+ }
274
+ }
275
+ });
276
+ await this.setAccessTokenCredential(credential, correlationId, kmsi, additionalCacheKeyHash);
277
+ }
278
+ /**
279
+ * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache
280
+ * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared
281
+ * @param accountFilter - An object containing Account properties to filter by
282
+ */
283
+ getAccountsFilteredBy(accountFilter, correlationId) {
284
+ const allAccountKeys = this.getAccountKeys();
285
+ const matchingAccounts = [];
286
+ allAccountKeys.forEach((cacheKey) => {
287
+ const entity = this.getAccount(cacheKey, correlationId);
288
+ // Match base account fields
289
+ if (!entity) {
290
+ return;
291
+ }
292
+ if (!!accountFilter.homeAccountId &&
293
+ !this.matchHomeAccountId(entity, accountFilter.homeAccountId)) {
294
+ return;
295
+ }
296
+ if (!!accountFilter.environment &&
297
+ !this.matchEnvironment(entity, accountFilter.environment, correlationId)) {
298
+ return;
299
+ }
300
+ if (!!accountFilter.realm &&
301
+ !this.matchRealm(entity, accountFilter.realm)) {
302
+ return;
303
+ }
304
+ if (!!accountFilter.authorityType &&
305
+ !this.matchAuthorityType(entity, accountFilter.authorityType)) {
306
+ return;
307
+ }
308
+ // If at least one tenant profile matches the tenant profile filter, add the account to the list of matching accounts
309
+ const tenantProfileFilter = {
310
+ localAccountId: accountFilter?.localAccountId,
311
+ name: accountFilter?.name,
312
+ username: accountFilter?.username,
313
+ loginHint: accountFilter?.loginHint,
314
+ upn: accountFilter?.upn,
315
+ nativeAccountId: accountFilter?.nativeAccountId,
316
+ };
317
+ const matchingTenantProfiles = entity.tenantProfiles?.filter((tenantProfile) => {
318
+ return this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter);
319
+ });
320
+ if (matchingTenantProfiles && matchingTenantProfiles.length === 0) {
321
+ // No tenant profile for this account matches filter, don't add to list of matching accounts
322
+ return;
323
+ }
324
+ matchingAccounts.push(entity);
325
+ });
326
+ return matchingAccounts;
327
+ }
328
+ /**
329
+ * Returns whether or not the given credential entity matches the filter
330
+ * @param entity
331
+ * @param filter
332
+ * @param correlationId
333
+ * @returns
334
+ */
335
+ credentialMatchesFilter(entity, filter, correlationId) {
336
+ if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) {
337
+ return false;
338
+ }
339
+ if (!!filter.userAssertionHash &&
340
+ !this.matchUserAssertionHash(entity, filter.userAssertionHash)) {
341
+ return false;
342
+ }
343
+ /*
344
+ * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of ""
345
+ * because we don't want a client_credential request to return a cached token that has a homeAccountId
346
+ */
347
+ if (typeof filter.homeAccountId === "string" &&
348
+ !this.matchHomeAccountId(entity, filter.homeAccountId)) {
349
+ return false;
350
+ }
351
+ if (!!filter.environment &&
352
+ !this.matchEnvironment(entity, filter.environment, correlationId)) {
353
+ return false;
354
+ }
355
+ if (!!filter.realm && !this.matchRealm(entity, filter.realm)) {
356
+ return false;
357
+ }
358
+ if (!!filter.credentialType &&
359
+ !this.matchCredentialType(entity, filter.credentialType)) {
360
+ return false;
361
+ }
362
+ if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) {
363
+ return false;
364
+ }
365
+ /*
366
+ * idTokens do not have "target", target specific refreshTokens do exist for some types of authentication
367
+ * Resource specific refresh tokens case will be added when the support is deemed necessary
368
+ */
369
+ if (!!filter.target &&
370
+ !this.matchTarget(entity, filter.target, correlationId)) {
371
+ return false;
372
+ }
373
+ // Access Token with Auth Scheme specific matching
374
+ if (entity.credentialType ===
375
+ CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) {
376
+ if (!this.matchAccessTokenWithAuthScheme(entity, filter)) {
377
+ return false;
378
+ }
379
+ }
380
+ // Additional cache key components matching (bidirectional isolation)
381
+ const entityComponents = entity.additionalCacheKeyComponents;
382
+ const filterComponents = filter.additionalCacheKeyComponents;
383
+ const entityHasComponents = !!entityComponents && Object.keys(entityComponents).length > 0;
384
+ const filterHasComponents = !!filterComponents && Object.keys(filterComponents).length > 0;
385
+ if (entityHasComponents !== filterHasComponents) {
386
+ return false;
387
+ }
388
+ if (entityHasComponents && filterHasComponents) {
389
+ const entityKeys = Object.keys(entityComponents).sort();
390
+ const filterKeys = Object.keys(filterComponents).sort();
391
+ if (entityKeys.length !== filterKeys.length) {
392
+ return false;
393
+ }
394
+ for (let i = 0; i < entityKeys.length; i++) {
395
+ if (entityKeys[i] !== filterKeys[i] ||
396
+ entityComponents[entityKeys[i]] !==
397
+ filterComponents[filterKeys[i]]) {
398
+ return false;
399
+ }
400
+ }
401
+ }
402
+ return true;
403
+ }
404
+ /**
405
+ * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata
406
+ * @param filter
407
+ * @param correlationId
408
+ */
409
+ getAppMetadataFilteredBy(filter, correlationId) {
410
+ const allCacheKeys = this.getKeys();
411
+ const matchingAppMetadata = {};
412
+ allCacheKeys.forEach((cacheKey) => {
413
+ // don't parse any non-appMetadata type cache entities
414
+ if (!this.isAppMetadata(cacheKey)) {
415
+ return;
416
+ }
417
+ // Attempt retrieval
418
+ const entity = this.getAppMetadata(cacheKey, correlationId);
419
+ if (!entity) {
420
+ return;
421
+ }
422
+ if (!!filter.environment &&
423
+ !this.matchEnvironment(entity, filter.environment, correlationId)) {
424
+ return;
425
+ }
426
+ if (!!filter.clientId &&
427
+ !this.matchClientId(entity, filter.clientId)) {
428
+ return;
429
+ }
430
+ matchingAppMetadata[cacheKey] = entity;
431
+ });
432
+ return matchingAppMetadata;
433
+ }
434
+ /**
435
+ * retrieve authorityMetadata that contains a matching alias
436
+ * @param host
437
+ * @param correlationId
438
+ */
439
+ getAuthorityMetadataByAlias(host, correlationId) {
440
+ const allCacheKeys = this.getAuthorityMetadataKeys();
441
+ let matchedEntity = null;
442
+ allCacheKeys.forEach((cacheKey) => {
443
+ // don't parse any non-authorityMetadata type cache entities
444
+ if (!this.isAuthorityMetadata(cacheKey) ||
445
+ cacheKey.indexOf(this.clientId) === -1) {
446
+ return;
447
+ }
448
+ // Attempt retrieval
449
+ const entity = this.getAuthorityMetadata(cacheKey, correlationId);
450
+ if (!entity) {
451
+ return;
452
+ }
453
+ if (entity.aliases.indexOf(host) === -1) {
454
+ return;
455
+ }
456
+ matchedEntity = entity;
457
+ });
458
+ return matchedEntity;
459
+ }
460
+ /**
461
+ * Removes all accounts and related tokens from cache.
462
+ */
463
+ removeAllAccounts(correlationId) {
464
+ const accounts = this.getAllAccounts({}, correlationId);
465
+ accounts.forEach((account) => {
466
+ this.removeAccount(account, correlationId);
467
+ });
468
+ }
469
+ /**
470
+ * Removes the account and related tokens for a given account key
471
+ * @param account
472
+ */
473
+ removeAccount(account, correlationId) {
474
+ this.removeAccountContext(account, correlationId);
475
+ const accountKeys = this.getAccountKeys();
476
+ const keyFilter = (key) => {
477
+ return (key.includes(account.homeAccountId) &&
478
+ key.includes(account.environment));
479
+ };
480
+ accountKeys.filter(keyFilter).forEach((key) => {
481
+ this.removeItem(key, correlationId);
482
+ this.performanceClient.incrementFields({ accountsRemoved: 1 }, correlationId);
483
+ });
484
+ }
485
+ /**
486
+ * Removes credentials associated with the provided account
487
+ * @param account
488
+ */
489
+ removeAccountContext(account, correlationId) {
490
+ const allTokenKeys = this.getTokenKeys();
491
+ const keyFilter = (key) => {
492
+ return (key.includes(account.homeAccountId) &&
493
+ key.includes(account.environment));
494
+ };
495
+ allTokenKeys.idToken.filter(keyFilter).forEach((key) => {
496
+ this.removeIdToken(key, correlationId);
497
+ });
498
+ allTokenKeys.accessToken.filter(keyFilter).forEach((key) => {
499
+ this.removeAccessToken(key, correlationId);
500
+ });
501
+ allTokenKeys.refreshToken.filter(keyFilter).forEach((key) => {
502
+ this.removeRefreshToken(key, correlationId);
503
+ });
504
+ }
505
+ /**
506
+ * returns a boolean if the given credential is removed
507
+ * @param key
508
+ * @param correlationId
509
+ */
510
+ removeAccessToken(key, correlationId) {
511
+ const credential = this.getAccessTokenCredential(key, correlationId);
512
+ if (!credential) {
513
+ return;
514
+ }
515
+ this.removeItem(key, correlationId);
516
+ this.performanceClient.incrementFields({ accessTokensRemoved: 1 }, correlationId);
517
+ // Remove Token Binding Key from key store for token-bound access token credentials
518
+ if (credential.credentialType.toLowerCase() ===
519
+ CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
520
+ const tokenType = credential.tokenType?.toLowerCase();
521
+ switch (tokenType) {
522
+ case AuthenticationScheme.POP:
523
+ case AuthenticationScheme.DPOP.toLowerCase(): {
524
+ const accessTokenWithAuthSchemeEntity = credential;
525
+ const kid = accessTokenWithAuthSchemeEntity.keyId;
526
+ if (kid) {
527
+ void this.tokenBindingKeyManager
528
+ .removeTokenBindingKey(kid, correlationId)
529
+ .catch(() => {
530
+ this.commonLogger.error("0id34f", correlationId);
531
+ this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
532
+ });
533
+ }
534
+ break;
535
+ }
536
+ }
537
+ }
538
+ }
539
+ /**
540
+ * Removes all app metadata objects from cache.
541
+ */
542
+ removeAppMetadata(correlationId) {
543
+ const allCacheKeys = this.getKeys();
544
+ allCacheKeys.forEach((cacheKey) => {
545
+ if (this.isAppMetadata(cacheKey)) {
546
+ this.removeItem(cacheKey, correlationId);
547
+ }
548
+ });
549
+ return true;
550
+ }
551
+ /**
552
+ * Retrieve IdTokenEntity from cache
553
+ * @param account {AccountInfo}
554
+ * @param tokenKeys {?TokenKeys}
555
+ * @param targetRealm {?string}
556
+ * @param performanceClient {?IPerformanceClient}
557
+ * @param correlationId {?string}
558
+ */
559
+ getIdToken(account, correlationId, tokenKeys, targetRealm) {
560
+ this.commonLogger.trace("1drz22", correlationId);
561
+ const idTokenFilter = {
562
+ homeAccountId: account.homeAccountId,
563
+ environment: account.environment,
564
+ credentialType: CredentialType.ID_TOKEN,
565
+ clientId: this.clientId,
566
+ realm: targetRealm,
567
+ };
568
+ const idTokenMap = this.getIdTokensByFilter(idTokenFilter, correlationId, tokenKeys);
569
+ const numIdTokens = idTokenMap.size;
570
+ if (numIdTokens < 1) {
571
+ this.commonLogger.info("1atvtd", correlationId);
572
+ return null;
573
+ }
574
+ else if (numIdTokens > 1) {
575
+ let tokensToBeRemoved = idTokenMap;
576
+ // Multiple tenant profiles and no tenant specified, pick home account
577
+ if (!targetRealm) {
578
+ const homeIdTokenMap = new Map();
579
+ idTokenMap.forEach((idToken, key) => {
580
+ if (idToken.realm === account.tenantId) {
581
+ homeIdTokenMap.set(key, idToken);
582
+ }
583
+ });
584
+ const numHomeIdTokens = homeIdTokenMap.size;
585
+ if (numHomeIdTokens < 1) {
586
+ this.commonLogger.info("0ooalx", correlationId);
587
+ return idTokenMap.values().next().value ?? null;
588
+ }
589
+ else if (numHomeIdTokens === 1) {
590
+ this.commonLogger.info("1eq2vc", correlationId);
591
+ return homeIdTokenMap.values().next().value ?? null;
592
+ }
593
+ else {
594
+ // Multiple ID tokens for home tenant profile, remove all and return null
595
+ tokensToBeRemoved = homeIdTokenMap;
596
+ }
597
+ }
598
+ // Multiple tokens for a single tenant profile, remove all and return null
599
+ this.commonLogger.info("1ws328", correlationId);
600
+ tokensToBeRemoved.forEach((idToken, key) => {
601
+ this.removeIdToken(key, correlationId);
602
+ });
603
+ this.performanceClient.addFields({ multiMatchedID: idTokenMap.size }, correlationId);
604
+ return null;
605
+ }
606
+ this.commonLogger.info("1sm769", correlationId);
607
+ return idTokenMap.values().next().value ?? null;
608
+ }
609
+ /**
610
+ * Gets all idTokens matching the given filter
611
+ * @param filter
612
+ * @returns
613
+ */
614
+ getIdTokensByFilter(filter, correlationId, tokenKeys) {
615
+ const idTokenKeys = (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken;
616
+ const idTokens = new Map();
617
+ idTokenKeys.forEach((key) => {
618
+ if (!this.idTokenKeyMatchesFilter(key, {
619
+ clientId: this.clientId,
620
+ ...filter,
621
+ })) {
622
+ return;
623
+ }
624
+ const idToken = this.getIdTokenCredential(key, correlationId);
625
+ if (idToken &&
626
+ this.credentialMatchesFilter(idToken, filter, correlationId)) {
627
+ idTokens.set(key, idToken);
628
+ }
629
+ });
630
+ return idTokens;
631
+ }
632
+ /**
633
+ * Validate the cache key against filter before retrieving and parsing cache value
634
+ * @param key
635
+ * @param filter
636
+ * @returns
637
+ */
638
+ idTokenKeyMatchesFilter(inputKey, filter) {
639
+ const key = inputKey.toLowerCase();
640
+ if (filter.clientId &&
641
+ key.indexOf(filter.clientId.toLowerCase()) === -1) {
642
+ return false;
643
+ }
644
+ if (filter.homeAccountId &&
645
+ key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {
646
+ return false;
647
+ }
648
+ return true;
649
+ }
650
+ /**
651
+ * Removes idToken from the cache
652
+ * @param key
653
+ */
654
+ removeIdToken(key, correlationId) {
655
+ this.removeItem(key, correlationId);
656
+ }
657
+ /**
658
+ * Removes refresh token from the cache
659
+ * @param key
660
+ */
661
+ removeRefreshToken(key, correlationId) {
662
+ this.removeItem(key, correlationId);
663
+ }
664
+ /**
665
+ * Retrieve AccessTokenEntity from cache
666
+ * @param account {AccountInfo}
667
+ * @param request {BaseAuthRequest}
668
+ * @param tokenKeys {?TokenKeys}
669
+ * @param performanceClient {?IPerformanceClient}
670
+ */
671
+ getAccessToken(account, request, tokenKeys, targetRealm) {
672
+ const correlationId = request.correlationId;
673
+ this.commonLogger.trace("1t7hz1", correlationId);
674
+ const scopes = ScopeSet.createSearchScopes(request.scopes, correlationId);
675
+ const authScheme = request.authenticationScheme ||
676
+ AuthenticationScheme.BEARER;
677
+ /*
678
+ * Distinguish between Bearer and PoP/SSH token cache types
679
+ * Cast to lowercase to handle "bearer" from ADFS
680
+ */
681
+ const credentialType = authScheme &&
682
+ authScheme.toLowerCase() !==
683
+ AuthenticationScheme.BEARER.toLowerCase()
684
+ ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME
685
+ : CredentialType.ACCESS_TOKEN;
686
+ const attributeTokenPartition = serializeAttributeTokens(request.attributeTokens);
687
+ const additionalCacheKeyComponents = attributeTokenPartition
688
+ ? {
689
+ attribute_tokens: attributeTokenPartition,
690
+ }
691
+ : undefined;
692
+ const accessTokenFilter = {
693
+ homeAccountId: account.homeAccountId,
694
+ environment: account.environment,
695
+ credentialType: credentialType,
696
+ clientId: this.clientId,
697
+ realm: targetRealm || account.tenantId,
698
+ target: scopes,
699
+ tokenType: authScheme,
700
+ keyId: authScheme === AuthenticationScheme.SSH
701
+ ? request.sshKid
702
+ : undefined,
703
+ additionalCacheKeyComponents: additionalCacheKeyComponents,
704
+ };
705
+ const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) ||
706
+ this.getTokenKeys().accessToken;
707
+ const accessTokens = [];
708
+ const matchedKeys = [];
709
+ accessTokenKeys.forEach((key) => {
710
+ // Validate key
711
+ if (this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true)) {
712
+ const accessToken = this.getAccessTokenCredential(key, correlationId);
713
+ // Validate value
714
+ if (accessToken &&
715
+ this.credentialMatchesFilter(accessToken, accessTokenFilter, correlationId)) {
716
+ accessTokens.push(accessToken);
717
+ matchedKeys.push(key);
718
+ }
719
+ }
720
+ });
721
+ if (accessTokens.length < 1) {
722
+ this.commonLogger.info("1nckna", correlationId);
723
+ return null;
724
+ }
725
+ else if (accessTokens.length > 1) {
726
+ this.commonLogger.info("1wkfwp", correlationId);
727
+ matchedKeys.forEach((key) => {
728
+ this.removeAccessToken(key, correlationId);
729
+ });
730
+ this.performanceClient.addFields({ multiMatchedAT: accessTokens.length }, correlationId);
731
+ return null;
732
+ }
733
+ this.commonLogger.info("06yt98", correlationId);
734
+ return accessTokens[0];
735
+ }
736
+ /**
737
+ * Validate the cache key against filter before retrieving and parsing cache value
738
+ * @param key
739
+ * @param filter
740
+ * @param keyMustContainAllScopes
741
+ * @returns
742
+ */
743
+ accessTokenKeyMatchesFilter(inputKey, filter, keyMustContainAllScopes) {
744
+ const key = inputKey.toLowerCase();
745
+ if (filter.clientId &&
746
+ key.indexOf(filter.clientId.toLowerCase()) === -1) {
747
+ return false;
748
+ }
749
+ if (filter.homeAccountId &&
750
+ key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {
751
+ return false;
752
+ }
753
+ if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) {
754
+ return false;
755
+ }
756
+ if (filter.target) {
757
+ const scopes = filter.target.asArray();
758
+ for (let i = 0; i < scopes.length; i++) {
759
+ if (keyMustContainAllScopes &&
760
+ !key.includes(scopes[i].toLowerCase())) {
761
+ // When performing a cache lookup a missing scope would be a cache miss
762
+ return false;
763
+ }
764
+ else if (!keyMustContainAllScopes &&
765
+ key.includes(scopes[i].toLowerCase())) {
766
+ // When performing a cache write, any token with a subset of requested scopes should be replaced
767
+ return true;
768
+ }
769
+ }
770
+ }
771
+ return true;
772
+ }
773
+ /**
774
+ * Gets all access tokens matching the filter
775
+ * @param filter
776
+ * @returns
777
+ */
778
+ getAccessTokensByFilter(filter, correlationId) {
779
+ const tokenKeys = this.getTokenKeys();
780
+ const accessTokens = [];
781
+ tokenKeys.accessToken.forEach((key) => {
782
+ if (!this.accessTokenKeyMatchesFilter(key, filter, true)) {
783
+ return;
784
+ }
785
+ const accessToken = this.getAccessTokenCredential(key, correlationId);
786
+ if (accessToken &&
787
+ this.credentialMatchesFilter(accessToken, filter, correlationId)) {
788
+ accessTokens.push(accessToken);
789
+ }
790
+ });
791
+ return accessTokens;
792
+ }
793
+ /**
794
+ * Helper to retrieve the appropriate refresh token from cache
795
+ * @param account {AccountInfo}
796
+ * @param familyRT {boolean}
797
+ * @param tokenKeys {?TokenKeys}
798
+ * @param performanceClient {?IPerformanceClient}
799
+ * @param correlationId {?string}
800
+ */
801
+ getRefreshToken(account, familyRT, correlationId, tokenKeys) {
802
+ this.commonLogger.trace("0x53vi", correlationId);
803
+ const id = familyRT ? THE_FAMILY_ID : undefined;
804
+ const refreshTokenFilter = {
805
+ homeAccountId: account.homeAccountId,
806
+ environment: account.environment,
807
+ credentialType: CredentialType.REFRESH_TOKEN,
808
+ clientId: this.clientId,
809
+ familyId: id,
810
+ };
811
+ const refreshTokenKeys = (tokenKeys && tokenKeys.refreshToken) ||
812
+ this.getTokenKeys().refreshToken;
813
+ const refreshTokens = [];
814
+ refreshTokenKeys.forEach((key) => {
815
+ // Validate key
816
+ if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) {
817
+ const refreshToken = this.getRefreshTokenCredential(key, correlationId);
818
+ // Validate value
819
+ if (refreshToken &&
820
+ this.credentialMatchesFilter(refreshToken, refreshTokenFilter, correlationId)) {
821
+ refreshTokens.push(refreshToken);
822
+ }
823
+ }
824
+ });
825
+ const numRefreshTokens = refreshTokens.length;
826
+ if (numRefreshTokens < 1) {
827
+ this.commonLogger.info("0dlw11", correlationId);
828
+ return null;
829
+ }
830
+ // address the else case after remove functions address environment aliases
831
+ if (numRefreshTokens > 1) {
832
+ this.performanceClient.addFields({ multiMatchedRT: numRefreshTokens }, correlationId);
833
+ }
834
+ this.commonLogger.info("0wcnep", correlationId);
835
+ return refreshTokens[0];
836
+ }
837
+ /**
838
+ * Validate the cache key against filter before retrieving and parsing cache value
839
+ * @param key
840
+ * @param filter
841
+ */
842
+ refreshTokenKeyMatchesFilter(inputKey, filter) {
843
+ const key = inputKey.toLowerCase();
844
+ if (filter.familyId &&
845
+ key.indexOf(filter.familyId.toLowerCase()) === -1) {
846
+ return false;
847
+ }
848
+ // If familyId is used, clientId is not in the key
849
+ if (!filter.familyId &&
850
+ filter.clientId &&
851
+ key.indexOf(filter.clientId.toLowerCase()) === -1) {
852
+ return false;
853
+ }
854
+ if (filter.homeAccountId &&
855
+ key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {
856
+ return false;
857
+ }
858
+ return true;
859
+ }
860
+ /**
861
+ * Retrieve AppMetadataEntity from cache
862
+ */
863
+ readAppMetadataFromCache(environment, correlationId) {
864
+ const appMetadataFilter = {
865
+ environment,
866
+ clientId: this.clientId,
867
+ };
868
+ const appMetadata = this.getAppMetadataFilteredBy(appMetadataFilter, correlationId);
869
+ const appMetadataEntries = Object.keys(appMetadata).map((key) => appMetadata[key]);
870
+ const numAppMetadata = appMetadataEntries.length;
871
+ if (numAppMetadata < 1) {
872
+ return null;
873
+ }
874
+ else if (numAppMetadata > 1) {
875
+ throw createClientAuthError(multipleMatchingAppMetadata, correlationId);
876
+ }
877
+ return appMetadataEntries[0];
878
+ }
879
+ /**
880
+ * Return the family_id value associated with FOCI
881
+ * @param environment
882
+ * @param clientId
883
+ */
884
+ isAppMetadataFOCI(environment, correlationId) {
885
+ const appMetadata = this.readAppMetadataFromCache(environment, correlationId);
886
+ return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID);
887
+ }
888
+ /**
889
+ * helper to match account ids
890
+ * @param value
891
+ * @param homeAccountId
892
+ */
893
+ matchHomeAccountId(entity, homeAccountId) {
894
+ return !!(typeof entity.homeAccountId === "string" &&
895
+ homeAccountId === entity.homeAccountId);
896
+ }
897
+ /**
898
+ * helper to match account ids
899
+ * @param entity
900
+ * @param localAccountId
901
+ * @returns
902
+ */
903
+ matchLocalAccountIdFromTokenClaims(tokenClaims, localAccountId) {
904
+ const idTokenLocalAccountId = tokenClaims.oid || tokenClaims.sub;
905
+ return localAccountId === idTokenLocalAccountId;
906
+ }
907
+ matchLocalAccountIdFromTenantProfile(tenantProfile, localAccountId) {
908
+ return tenantProfile.localAccountId === localAccountId;
909
+ }
910
+ /**
911
+ * helper to match names
912
+ * @param entity
913
+ * @param name
914
+ * @returns true if the downcased name properties are present and match in the filter and the entity
915
+ */
916
+ matchName(claims, name) {
917
+ return !!(name.toLowerCase() === claims.name?.toLowerCase());
918
+ }
919
+ /**
920
+ * helper to match usernames
921
+ * @param entity
922
+ * @param username
923
+ * @returns
924
+ */
925
+ matchUsername(cachedUsername, filterUsername) {
926
+ return !!(cachedUsername &&
927
+ typeof cachedUsername === "string" &&
928
+ filterUsername?.toLowerCase() === cachedUsername.toLowerCase());
929
+ }
930
+ /**
931
+ * helper to match loginhints
932
+ * @param entity
933
+ * @param loginHint
934
+ * @returns
935
+ */
936
+ matchLoginHintWithTenantProfile(tenantProfile, loginHintFilter) {
937
+ return (tenantProfile.loginHint === loginHintFilter ||
938
+ tenantProfile.username === loginHintFilter ||
939
+ tenantProfile.upn === loginHintFilter);
940
+ }
941
+ /**
942
+ * helper to match assertion
943
+ * @param value
944
+ * @param oboAssertion
945
+ */
946
+ matchUserAssertionHash(entity, userAssertionHash) {
947
+ return !!(entity.userAssertionHash &&
948
+ userAssertionHash === entity.userAssertionHash);
949
+ }
950
+ /**
951
+ * helper to match environment
952
+ * @param value
953
+ * @param environment
954
+ */
955
+ matchEnvironment(entity, environment, correlationId) {
956
+ // Check static authority options first for cases where authority metadata has not been resolved and cached yet
957
+ if (this.staticAuthorityOptions) {
958
+ const staticAliases = getAliasesFromStaticSources(this.staticAuthorityOptions, this.commonLogger, correlationId);
959
+ if (staticAliases.includes(environment) &&
960
+ staticAliases.includes(entity.environment)) {
961
+ return true;
962
+ }
963
+ }
964
+ // Query metadata cache if no static authority configuration has aliases that match enviroment
965
+ const cloudMetadata = this.getAuthorityMetadataByAlias(environment, correlationId);
966
+ if (cloudMetadata &&
967
+ cloudMetadata.aliases.indexOf(entity.environment) > -1) {
968
+ return true;
969
+ }
970
+ return false;
971
+ }
972
+ /**
973
+ * helper to match credential type
974
+ * @param entity
975
+ * @param credentialType
976
+ */
977
+ matchCredentialType(entity, credentialType) {
978
+ return (entity.credentialType &&
979
+ credentialType.toLowerCase() === entity.credentialType.toLowerCase());
980
+ }
981
+ /**
982
+ * helper to match client ids
983
+ * @param entity
984
+ * @param clientId
985
+ */
986
+ matchClientId(entity, clientId) {
987
+ return !!(entity.clientId && clientId === entity.clientId);
988
+ }
989
+ /**
990
+ * helper to match family ids
991
+ * @param entity
992
+ * @param familyId
993
+ */
994
+ matchFamilyId(entity, familyId) {
995
+ return !!(entity.familyId && familyId === entity.familyId);
996
+ }
997
+ /**
998
+ * helper to match realm
999
+ * @param entity
1000
+ * @param realm
1001
+ */
1002
+ matchRealm(entity, realm) {
1003
+ return !!(entity.realm?.toLowerCase() === realm.toLowerCase());
1004
+ }
1005
+ /**
1006
+ * helper to match loginHint which can be either:
1007
+ * 1. login_hint ID token claim
1008
+ * 2. username in cached account object
1009
+ * 3. upn in ID token claims
1010
+ * @param entity
1011
+ * @param loginHint
1012
+ * @returns
1013
+ */
1014
+ matchLoginHintFromTokenClaims(tokenClaims, loginHint) {
1015
+ if (tokenClaims.login_hint === loginHint) {
1016
+ return true;
1017
+ }
1018
+ if (tokenClaims.preferred_username === loginHint) {
1019
+ return true;
1020
+ }
1021
+ if (tokenClaims.upn === loginHint) {
1022
+ return true;
1023
+ }
1024
+ // check login hint against list of emails in token claims
1025
+ if (tokenClaims.emails && tokenClaims.emails.includes(loginHint)) {
1026
+ return true;
1027
+ }
1028
+ return false;
1029
+ }
1030
+ /**
1031
+ * Helper to match sid
1032
+ * @param entity
1033
+ * @param sid
1034
+ * @returns true if the sid claim is present and matches the filter
1035
+ */
1036
+ matchSid(idTokenClaims, sid) {
1037
+ return idTokenClaims.sid === sid;
1038
+ }
1039
+ matchAuthorityType(entity, authorityType) {
1040
+ return !!(entity.authorityType &&
1041
+ authorityType.toLowerCase() === entity.authorityType.toLowerCase());
1042
+ }
1043
+ /**
1044
+ * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.
1045
+ * @param entity
1046
+ * @param target
1047
+ */
1048
+ matchTarget(entity, target, correlationId) {
1049
+ const isNotAccessTokenCredential = entity.credentialType !== CredentialType.ACCESS_TOKEN &&
1050
+ entity.credentialType !==
1051
+ CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
1052
+ if (isNotAccessTokenCredential || !entity.target) {
1053
+ return false;
1054
+ }
1055
+ const entityScopeSet = ScopeSet.fromString(entity.target, correlationId);
1056
+ return entityScopeSet.containsScopeSet(target);
1057
+ }
1058
+ /**
1059
+ * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise
1060
+ * @param entity
1061
+ * @param tokenType
1062
+ */
1063
+ matchTokenType(entity, tokenType) {
1064
+ return !!(entity.tokenType &&
1065
+ entity.tokenType.toLowerCase() === tokenType.toLowerCase());
1066
+ }
1067
+ matchAccessTokenWithAuthScheme(entity, filter) {
1068
+ const normalizedFilterTokenType = filter.tokenType?.toLowerCase();
1069
+ if (!!filter.tokenType &&
1070
+ !this.matchTokenType(entity, filter.tokenType)) {
1071
+ return false;
1072
+ }
1073
+ switch (normalizedFilterTokenType) {
1074
+ case "dpop":
1075
+ case AuthenticationScheme.SSH:
1076
+ return this.matchKeyBoundAccessToken(entity, filter);
1077
+ default:
1078
+ return true;
1079
+ }
1080
+ }
1081
+ matchKeyBoundAccessToken(entity, filter) {
1082
+ if (!filter.keyId) {
1083
+ return true;
1084
+ }
1085
+ return this.matchKeyId(entity, filter.keyId);
1086
+ }
1087
+ /**
1088
+ * Returns true if the credential's keyId matches the one in the request, false otherwise
1089
+ * @param entity
1090
+ * @param keyId
1091
+ */
1092
+ matchKeyId(entity, keyId) {
1093
+ return !!(entity.keyId && entity.keyId === keyId);
1094
+ }
1095
+ /**
1096
+ * returns if a given cache entity is of the type appmetadata
1097
+ * @param key
1098
+ */
1099
+ isAppMetadata(key) {
1100
+ return key.indexOf(APP_METADATA) !== -1;
1101
+ }
1102
+ /**
1103
+ * returns if a given cache entity is of the type authoritymetadata
1104
+ * @param key
1105
+ */
1106
+ isAuthorityMetadata(key) {
1107
+ return key.indexOf(AUTHORITY_METADATA_CACHE_KEY) !== -1;
1108
+ }
1109
+ /**
1110
+ * returns cache key used for cloud instance metadata
1111
+ */
1112
+ generateAuthorityMetadataCacheKey(authority) {
1113
+ return `${AUTHORITY_METADATA_CACHE_KEY}-${this.clientId}-${authority}`;
1114
+ }
1115
+ /**
1116
+ * Helper to convert serialized data to object
1117
+ * @param obj
1118
+ * @param json
1119
+ */
1120
+ static toObject(obj, json) {
1121
+ for (const propertyName in json) {
1122
+ obj[propertyName] = json[propertyName];
1123
+ }
1124
+ return obj;
1125
+ }
1126
+ }
1127
+ /** @internal */
1128
+ class DefaultStorageClass extends CacheManager {
1129
+ async setAccount() {
1130
+ throw createClientAuthError(methodNotImplemented, "");
1131
+ }
1132
+ getAccount() {
1133
+ throw createClientAuthError(methodNotImplemented, "");
1134
+ }
1135
+ async setIdTokenCredential() {
1136
+ throw createClientAuthError(methodNotImplemented, "");
1137
+ }
1138
+ getIdTokenCredential() {
1139
+ throw createClientAuthError(methodNotImplemented, "");
1140
+ }
1141
+ async setAccessTokenCredential() {
1142
+ throw createClientAuthError(methodNotImplemented, "");
1143
+ }
1144
+ getAccessTokenCredential() {
1145
+ throw createClientAuthError(methodNotImplemented, "");
1146
+ }
1147
+ async setRefreshTokenCredential() {
1148
+ throw createClientAuthError(methodNotImplemented, "");
1149
+ }
1150
+ getRefreshTokenCredential() {
1151
+ throw createClientAuthError(methodNotImplemented, "");
1152
+ }
1153
+ setAppMetadata() {
1154
+ throw createClientAuthError(methodNotImplemented, "");
1155
+ }
1156
+ getAppMetadata() {
1157
+ throw createClientAuthError(methodNotImplemented, "");
1158
+ }
1159
+ setServerTelemetry() {
1160
+ throw createClientAuthError(methodNotImplemented, "");
1161
+ }
1162
+ getServerTelemetry() {
1163
+ throw createClientAuthError(methodNotImplemented, "");
1164
+ }
1165
+ setAuthorityMetadata() {
1166
+ throw createClientAuthError(methodNotImplemented, "");
1167
+ }
1168
+ getAuthorityMetadata() {
1169
+ throw createClientAuthError(methodNotImplemented, "");
1170
+ }
1171
+ getAuthorityMetadataKeys() {
1172
+ throw createClientAuthError(methodNotImplemented, "");
1173
+ }
1174
+ setThrottlingCache() {
1175
+ throw createClientAuthError(methodNotImplemented, "");
1176
+ }
1177
+ getThrottlingCache() {
1178
+ throw createClientAuthError(methodNotImplemented, "");
1179
+ }
1180
+ removeItem() {
1181
+ throw createClientAuthError(methodNotImplemented, "");
1182
+ }
1183
+ getKeys() {
1184
+ throw createClientAuthError(methodNotImplemented, "");
1185
+ }
1186
+ getAccountKeys() {
1187
+ throw createClientAuthError(methodNotImplemented, "");
1188
+ }
1189
+ getTokenKeys() {
1190
+ throw createClientAuthError(methodNotImplemented, "");
1191
+ }
1192
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1193
+ generateCredentialKey(_credential, _hash) {
1194
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1195
+ throw createClientAuthError(methodNotImplemented, "");
1196
+ }
1197
+ generateAccountKey() {
1198
+ throw createClientAuthError(methodNotImplemented, "");
1199
+ }
1200
+ }
1201
+
1202
+ export { CacheManager, DefaultStorageClass };