@azure/msal-browser 2.37.0 → 3.0.0-alpha.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 (556) hide show
  1. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  2. package/dist/app/IPublicClientApplication.js +33 -33
  3. package/dist/app/IPublicClientApplication.js.map +1 -1
  4. package/dist/app/PublicClientApplication.d.ts +198 -24
  5. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  6. package/dist/app/PublicClientApplication.js +263 -220
  7. package/dist/app/PublicClientApplication.js.map +1 -1
  8. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +5 -4
  9. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
  10. package/dist/broker/nativeBroker/NativeMessageHandler.js +118 -124
  11. package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
  12. package/dist/broker/nativeBroker/NativeRequest.d.ts +4 -4
  13. package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
  14. package/dist/broker/nativeBroker/NativeResponse.d.ts +4 -4
  15. package/dist/broker/nativeBroker/NativeResponse.d.ts.map +1 -1
  16. package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -1
  17. package/dist/cache/AsyncMemoryStorage.js +83 -152
  18. package/dist/cache/AsyncMemoryStorage.js.map +1 -1
  19. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  20. package/dist/cache/BrowserCacheManager.js +420 -412
  21. package/dist/cache/BrowserCacheManager.js.map +1 -1
  22. package/dist/cache/BrowserStorage.d.ts.map +1 -1
  23. package/dist/cache/BrowserStorage.js +19 -19
  24. package/dist/cache/BrowserStorage.js.map +1 -1
  25. package/dist/cache/CryptoKeyStore.d.ts.map +1 -1
  26. package/dist/cache/CryptoKeyStore.js +26 -36
  27. package/dist/cache/CryptoKeyStore.js.map +1 -1
  28. package/dist/cache/DatabaseStorage.d.ts.map +1 -1
  29. package/dist/cache/DatabaseStorage.js +127 -191
  30. package/dist/cache/DatabaseStorage.js.map +1 -1
  31. package/dist/cache/ITokenCache.d.ts.map +1 -1
  32. package/dist/cache/MemoryStorage.d.ts.map +1 -1
  33. package/dist/cache/MemoryStorage.js +18 -19
  34. package/dist/cache/MemoryStorage.js.map +1 -1
  35. package/dist/cache/TokenCache.d.ts +1 -1
  36. package/dist/cache/TokenCache.d.ts.map +1 -1
  37. package/dist/cache/TokenCache.js +55 -49
  38. package/dist/cache/TokenCache.js.map +1 -1
  39. package/dist/config/Configuration.d.ts +8 -8
  40. package/dist/config/Configuration.d.ts.map +1 -1
  41. package/dist/config/Configuration.js +53 -31
  42. package/dist/config/Configuration.js.map +1 -1
  43. package/dist/controllers/ControllerFactory.d.ts +10 -0
  44. package/dist/controllers/ControllerFactory.d.ts.map +1 -0
  45. package/dist/controllers/ControllerFactory.js +47 -0
  46. package/dist/controllers/ControllerFactory.js.map +1 -0
  47. package/dist/controllers/IController.d.ts +67 -0
  48. package/dist/controllers/IController.d.ts.map +1 -0
  49. package/dist/{app/ClientApplication.d.ts → controllers/StandardController.d.ts} +96 -15
  50. package/dist/controllers/StandardController.d.ts.map +1 -0
  51. package/dist/controllers/StandardController.js +1299 -0
  52. package/dist/controllers/StandardController.js.map +1 -0
  53. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  54. package/dist/crypto/BrowserCrypto.js +36 -60
  55. package/dist/crypto/BrowserCrypto.js.map +1 -1
  56. package/dist/crypto/CryptoOps.d.ts +1 -1
  57. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  58. package/dist/crypto/CryptoOps.js +93 -151
  59. package/dist/crypto/CryptoOps.js.map +1 -1
  60. package/dist/crypto/GuidGenerator.d.ts.map +1 -1
  61. package/dist/crypto/GuidGenerator.js +36 -25
  62. package/dist/crypto/GuidGenerator.js.map +1 -1
  63. package/dist/crypto/ISubtleCrypto.d.ts.map +1 -1
  64. package/dist/crypto/ModernBrowserCrypto.d.ts.map +1 -1
  65. package/dist/crypto/ModernBrowserCrypto.js +20 -44
  66. package/dist/crypto/ModernBrowserCrypto.js.map +1 -1
  67. package/dist/crypto/MsBrowserCrypto.d.ts.map +1 -1
  68. package/dist/crypto/MsBrowserCrypto.js +65 -89
  69. package/dist/crypto/MsBrowserCrypto.js.map +1 -1
  70. package/dist/crypto/MsrBrowserCrypto.d.ts.map +1 -1
  71. package/dist/crypto/MsrBrowserCrypto.js +23 -47
  72. package/dist/crypto/MsrBrowserCrypto.js.map +1 -1
  73. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  74. package/dist/crypto/PkceGenerator.js +28 -49
  75. package/dist/crypto/PkceGenerator.js.map +1 -1
  76. package/dist/crypto/SignedHttpRequest.d.ts +1 -1
  77. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  78. package/dist/crypto/SignedHttpRequest.js +15 -37
  79. package/dist/crypto/SignedHttpRequest.js.map +1 -1
  80. package/dist/encode/Base64Decode.d.ts.map +1 -1
  81. package/dist/encode/Base64Decode.js +32 -33
  82. package/dist/encode/Base64Decode.js.map +1 -1
  83. package/dist/encode/Base64Encode.d.ts.map +1 -1
  84. package/dist/encode/Base64Encode.js +34 -35
  85. package/dist/encode/Base64Encode.js.map +1 -1
  86. package/dist/error/BrowserAuthError.d.ts +1 -1
  87. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  88. package/dist/error/BrowserAuthError.js +161 -163
  89. package/dist/error/BrowserAuthError.js.map +1 -1
  90. package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
  91. package/dist/error/BrowserConfigurationAuthError.js +32 -36
  92. package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
  93. package/dist/error/NativeAuthError.d.ts +1 -1
  94. package/dist/error/NativeAuthError.d.ts.map +1 -1
  95. package/dist/error/NativeAuthError.js +26 -27
  96. package/dist/error/NativeAuthError.js.map +1 -1
  97. package/dist/event/EventHandler.d.ts.map +1 -1
  98. package/dist/event/EventHandler.js +33 -33
  99. package/dist/event/EventHandler.js.map +1 -1
  100. package/dist/event/EventMessage.d.ts +5 -5
  101. package/dist/event/EventMessage.d.ts.map +1 -1
  102. package/dist/event/EventMessage.js +18 -14
  103. package/dist/event/EventMessage.js.map +1 -1
  104. package/dist/event/EventType.js +1 -1
  105. package/dist/event/EventType.js.map +1 -1
  106. package/dist/index.d.ts +8 -8
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +1 -1
  109. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  110. package/dist/interaction_client/BaseInteractionClient.js +92 -123
  111. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  112. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -1
  113. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +6 -10
  114. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -1
  115. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  116. package/dist/interaction_client/NativeInteractionClient.js +336 -393
  117. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  118. package/dist/interaction_client/PopupClient.d.ts +1 -1
  119. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  120. package/dist/interaction_client/PopupClient.js +224 -246
  121. package/dist/interaction_client/PopupClient.js.map +1 -1
  122. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  123. package/dist/interaction_client/RedirectClient.js +244 -292
  124. package/dist/interaction_client/RedirectClient.js.map +1 -1
  125. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  126. package/dist/interaction_client/SilentAuthCodeClient.js +50 -63
  127. package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
  128. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  129. package/dist/interaction_client/SilentCacheClient.js +50 -81
  130. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  131. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  132. package/dist/interaction_client/SilentIframeClient.js +107 -125
  133. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  134. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  135. package/dist/interaction_client/SilentRefreshClient.js +44 -72
  136. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  137. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  138. package/dist/interaction_client/StandardInteractionClient.js +144 -180
  139. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  140. package/dist/interaction_handler/InteractionHandler.d.ts +1 -1
  141. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  142. package/dist/interaction_handler/InteractionHandler.js +84 -110
  143. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  144. package/dist/interaction_handler/RedirectHandler.d.ts +1 -1
  145. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  146. package/dist/interaction_handler/RedirectHandler.js +105 -122
  147. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  148. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  149. package/dist/interaction_handler/SilentHandler.js +76 -65
  150. package/dist/interaction_handler/SilentHandler.js.map +1 -1
  151. package/dist/internals.js +1 -1
  152. package/dist/internals.js.map +1 -1
  153. package/dist/navigation/NavigationClient.d.ts.map +1 -1
  154. package/dist/navigation/NavigationClient.js +11 -14
  155. package/dist/navigation/NavigationClient.js.map +1 -1
  156. package/dist/navigation/NavigationOptions.d.ts +1 -1
  157. package/dist/navigation/NavigationOptions.d.ts.map +1 -1
  158. package/dist/network/FetchClient.d.ts.map +1 -1
  159. package/dist/network/FetchClient.js +66 -96
  160. package/dist/network/FetchClient.js.map +1 -1
  161. package/dist/network/XhrClient.d.ts.map +1 -1
  162. package/dist/network/XhrClient.js +38 -51
  163. package/dist/network/XhrClient.js.map +1 -1
  164. package/dist/operatingcontext/BaseOperatingContext.d.ts +41 -0
  165. package/dist/operatingcontext/BaseOperatingContext.d.ts.map +1 -0
  166. package/dist/operatingcontext/BaseOperatingContext.js +53 -0
  167. package/dist/operatingcontext/BaseOperatingContext.js.map +1 -0
  168. package/dist/operatingcontext/StandardOperatingContext.d.ts +26 -0
  169. package/dist/operatingcontext/StandardOperatingContext.d.ts.map +1 -0
  170. package/dist/operatingcontext/StandardOperatingContext.js +50 -0
  171. package/dist/operatingcontext/StandardOperatingContext.js.map +1 -0
  172. package/dist/operatingcontext/TeamsAppOperatingContext.d.ts +26 -0
  173. package/dist/operatingcontext/TeamsAppOperatingContext.d.ts.map +1 -0
  174. package/dist/operatingcontext/TeamsAppOperatingContext.js +49 -0
  175. package/dist/operatingcontext/TeamsAppOperatingContext.js.map +1 -0
  176. package/dist/packageMetadata.d.ts +1 -1
  177. package/dist/packageMetadata.d.ts.map +1 -1
  178. package/dist/packageMetadata.js +3 -3
  179. package/dist/packageMetadata.js.map +1 -1
  180. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  181. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  182. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  183. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  184. package/dist/request/EndSessionPopupRequest.d.ts +1 -1
  185. package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
  186. package/dist/request/EndSessionRequest.d.ts +1 -1
  187. package/dist/request/EndSessionRequest.d.ts.map +1 -1
  188. package/dist/request/PopupRequest.d.ts +1 -1
  189. package/dist/request/PopupRequest.d.ts.map +1 -1
  190. package/dist/request/PopupWindowAttributes.d.ts +3 -3
  191. package/dist/request/PopupWindowAttributes.d.ts.map +1 -1
  192. package/dist/request/RedirectRequest.d.ts +1 -1
  193. package/dist/request/RedirectRequest.d.ts.map +1 -1
  194. package/dist/request/SilentRequest.d.ts +1 -1
  195. package/dist/request/SilentRequest.d.ts.map +1 -1
  196. package/dist/request/SsoSilentRequest.d.ts +1 -1
  197. package/dist/request/SsoSilentRequest.d.ts.map +1 -1
  198. package/dist/telemetry/BrowserPerformanceClient.d.ts +1 -1
  199. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  200. package/dist/telemetry/BrowserPerformanceClient.js +62 -57
  201. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  202. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -1
  203. package/dist/telemetry/BrowserPerformanceMeasurement.js +30 -31
  204. package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
  205. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  206. package/dist/utils/BrowserConstants.js +10 -10
  207. package/dist/utils/BrowserConstants.js.map +1 -1
  208. package/dist/utils/BrowserProtocolUtils.d.ts +1 -1
  209. package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
  210. package/dist/utils/BrowserProtocolUtils.js +9 -12
  211. package/dist/utils/BrowserProtocolUtils.js.map +1 -1
  212. package/dist/utils/BrowserStringUtils.d.ts.map +1 -1
  213. package/dist/utils/BrowserStringUtils.js +83 -49
  214. package/dist/utils/BrowserStringUtils.js.map +1 -1
  215. package/dist/utils/BrowserUtils.d.ts.map +1 -1
  216. package/dist/utils/BrowserUtils.js +51 -49
  217. package/dist/utils/BrowserUtils.js.map +1 -1
  218. package/dist/utils/MathUtils.d.ts.map +1 -1
  219. package/dist/utils/MathUtils.js +6 -9
  220. package/dist/utils/MathUtils.js.map +1 -1
  221. package/node_modules/@azure/msal-common/LICENSE +21 -0
  222. package/node_modules/@azure/msal-common/README.md +62 -0
  223. package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts +32 -0
  224. package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map +1 -0
  225. package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts +21 -0
  226. package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map +1 -0
  227. package/node_modules/@azure/msal-common/dist/account/AuthToken.js +56 -0
  228. package/node_modules/@azure/msal-common/dist/account/AuthToken.js.map +1 -0
  229. package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts +9 -0
  230. package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map +1 -0
  231. package/node_modules/@azure/msal-common/dist/account/CcsCredential.js +14 -0
  232. package/node_modules/@azure/msal-common/dist/account/CcsCredential.js.map +1 -0
  233. package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts +15 -0
  234. package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map +1 -0
  235. package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts +20 -0
  236. package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map +1 -0
  237. package/node_modules/@azure/msal-common/dist/account/ClientInfo.js +46 -0
  238. package/node_modules/@azure/msal-common/dist/account/ClientInfo.js.map +1 -0
  239. package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts +9 -0
  240. package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts.map +1 -0
  241. package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts +66 -0
  242. package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map +1 -0
  243. package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts +216 -0
  244. package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map +1 -0
  245. package/node_modules/@azure/msal-common/dist/authority/Authority.js +688 -0
  246. package/node_modules/@azure/msal-common/dist/authority/Authority.js.map +1 -0
  247. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts +31 -0
  248. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map +1 -0
  249. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js +58 -0
  250. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js.map +1 -0
  251. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts +623 -0
  252. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map +1 -0
  253. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js +881 -0
  254. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js.map +1 -0
  255. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts +19 -0
  256. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map +1 -0
  257. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js +24 -0
  258. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js.map +1 -0
  259. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts +10 -0
  260. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map +1 -0
  261. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js +19 -0
  262. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js.map +1 -0
  263. package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts +2 -0
  264. package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map +1 -0
  265. package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts +6 -0
  266. package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map +1 -0
  267. package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts +6 -0
  268. package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
  269. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
  270. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
  271. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js +13 -0
  272. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +1 -0
  273. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
  274. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
  275. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js +13 -0
  276. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -0
  277. package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts +6 -0
  278. package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map +1 -0
  279. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts +12 -0
  280. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map +1 -0
  281. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js +15 -0
  282. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js.map +1 -0
  283. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts +8 -0
  284. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map +1 -0
  285. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js +17 -0
  286. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js.map +1 -0
  287. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts +31 -0
  288. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map +1 -0
  289. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js +116 -0
  290. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js.map +1 -0
  291. package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts +7 -0
  292. package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  293. package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
  294. package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
  295. package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts +444 -0
  296. package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map +1 -0
  297. package/node_modules/@azure/msal-common/dist/cache/CacheManager.js +1024 -0
  298. package/node_modules/@azure/msal-common/dist/cache/CacheManager.js.map +1 -0
  299. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts +57 -0
  300. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -0
  301. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js +123 -0
  302. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js.map +1 -0
  303. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts +100 -0
  304. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map +1 -0
  305. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js +259 -0
  306. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js.map +1 -0
  307. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts +40 -0
  308. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -0
  309. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js +73 -0
  310. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js.map +1 -0
  311. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -0
  312. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
  313. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js +85 -0
  314. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -0
  315. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts +14 -0
  316. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map +1 -0
  317. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js +18 -0
  318. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js.map +1 -0
  319. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts +89 -0
  320. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map +1 -0
  321. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js +144 -0
  322. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js.map +1 -0
  323. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts +35 -0
  324. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map +1 -0
  325. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js +64 -0
  326. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js.map +1 -0
  327. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts +37 -0
  328. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
  329. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js +67 -0
  330. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js.map +1 -0
  331. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts +13 -0
  332. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
  333. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js +34 -0
  334. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js.map +1 -0
  335. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts +14 -0
  336. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map +1 -0
  337. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js +30 -0
  338. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js.map +1 -0
  339. package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts +166 -0
  340. package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map +1 -0
  341. package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts +6 -0
  342. package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map +1 -0
  343. package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts +5 -0
  344. package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
  345. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts +24 -0
  346. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -0
  347. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js +30 -0
  348. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js.map +1 -0
  349. package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts +63 -0
  350. package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map +1 -0
  351. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts +72 -0
  352. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map +1 -0
  353. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js +453 -0
  354. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js.map +1 -0
  355. package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts +51 -0
  356. package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map +1 -0
  357. package/node_modules/@azure/msal-common/dist/client/BaseClient.js +107 -0
  358. package/node_modules/@azure/msal-common/dist/client/BaseClient.js.map +1 -0
  359. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts +35 -0
  360. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map +1 -0
  361. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js +260 -0
  362. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js.map +1 -0
  363. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts +25 -0
  364. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map +1 -0
  365. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js +108 -0
  366. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js.map +1 -0
  367. package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts +39 -0
  368. package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map +1 -0
  369. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts +134 -0
  370. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map +1 -0
  371. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js +101 -0
  372. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js.map +1 -0
  373. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts +63 -0
  374. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map +1 -0
  375. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js +49 -0
  376. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js.map +1 -0
  377. package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts +5 -0
  378. package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map +1 -0
  379. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts +22 -0
  380. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map +1 -0
  381. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js +44 -0
  382. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js.map +1 -0
  383. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts +58 -0
  384. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map +1 -0
  385. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js +92 -0
  386. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js.map +1 -0
  387. package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts +12 -0
  388. package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map +1 -0
  389. package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts +48 -0
  390. package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map +1 -0
  391. package/node_modules/@azure/msal-common/dist/error/AuthError.js +58 -0
  392. package/node_modules/@azure/msal-common/dist/error/AuthError.js.map +1 -0
  393. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts +413 -0
  394. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map +1 -0
  395. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js +526 -0
  396. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js.map +1 -0
  397. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts +199 -0
  398. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map +1 -0
  399. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js +256 -0
  400. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js.map +1 -0
  401. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts +60 -0
  402. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map +1 -0
  403. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js +86 -0
  404. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js.map +1 -0
  405. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts +29 -0
  406. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map +1 -0
  407. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js +46 -0
  408. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js.map +1 -0
  409. package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts +8 -0
  410. package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map +1 -0
  411. package/node_modules/@azure/msal-common/dist/error/ServerError.js +21 -0
  412. package/node_modules/@azure/msal-common/dist/error/ServerError.js.map +1 -0
  413. package/node_modules/@azure/msal-common/dist/index.cjs.js +8975 -0
  414. package/node_modules/@azure/msal-common/dist/index.cjs.js.map +1 -0
  415. package/node_modules/@azure/msal-common/dist/index.d.ts +94 -0
  416. package/node_modules/@azure/msal-common/dist/index.d.ts.map +1 -0
  417. package/node_modules/@azure/msal-common/dist/index.js +54 -0
  418. package/node_modules/@azure/msal-common/dist/index.js.map +1 -0
  419. package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts +96 -0
  420. package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map +1 -0
  421. package/node_modules/@azure/msal-common/dist/logger/Logger.js +205 -0
  422. package/node_modules/@azure/msal-common/dist/logger/Logger.js.map +1 -0
  423. package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts +30 -0
  424. package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map +1 -0
  425. package/node_modules/@azure/msal-common/dist/network/INetworkModule.js +21 -0
  426. package/node_modules/@azure/msal-common/dist/network/INetworkModule.js.map +1 -0
  427. package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts +33 -0
  428. package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts.map +1 -0
  429. package/node_modules/@azure/msal-common/dist/network/NetworkManager.js +42 -0
  430. package/node_modules/@azure/msal-common/dist/network/NetworkManager.js.map +1 -0
  431. package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts +17 -0
  432. package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map +1 -0
  433. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts +42 -0
  434. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map +1 -0
  435. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js +102 -0
  436. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js.map +1 -0
  437. package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts +3 -0
  438. package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map +1 -0
  439. package/node_modules/@azure/msal-common/dist/packageMetadata.js +8 -0
  440. package/node_modules/@azure/msal-common/dist/packageMetadata.js.map +1 -0
  441. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts +20 -0
  442. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map +1 -0
  443. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js +63 -0
  444. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js.map +1 -0
  445. package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts +38 -0
  446. package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map +1 -0
  447. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts +28 -0
  448. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
  449. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts +51 -0
  450. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
  451. package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts +18 -0
  452. package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map +1 -0
  453. package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts +22 -0
  454. package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  455. package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts +22 -0
  456. package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map +1 -0
  457. package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts +14 -0
  458. package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  459. package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts +20 -0
  460. package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -0
  461. package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts +19 -0
  462. package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map +1 -0
  463. package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts +18 -0
  464. package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  465. package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts +20 -0
  466. package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map +1 -0
  467. package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts +6 -0
  468. package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map +1 -0
  469. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts +217 -0
  470. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map +1 -0
  471. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js +385 -0
  472. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js.map +1 -0
  473. package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts +34 -0
  474. package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map +1 -0
  475. package/node_modules/@azure/msal-common/dist/request/RequestValidator.js +92 -0
  476. package/node_modules/@azure/msal-common/dist/request/RequestValidator.js.map +1 -0
  477. package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts +89 -0
  478. package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map +1 -0
  479. package/node_modules/@azure/msal-common/dist/request/ScopeSet.js +207 -0
  480. package/node_modules/@azure/msal-common/dist/request/ScopeSet.js.map +1 -0
  481. package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts +40 -0
  482. package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map +1 -0
  483. package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts +14 -0
  484. package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map +1 -0
  485. package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts +26 -0
  486. package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map +1 -0
  487. package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts +16 -0
  488. package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map +1 -0
  489. package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts +5 -0
  490. package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map +1 -0
  491. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts +73 -0
  492. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map +1 -0
  493. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js +325 -0
  494. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js.map +1 -0
  495. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts +26 -0
  496. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
  497. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts +45 -0
  498. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
  499. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts +43 -0
  500. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  501. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  502. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  503. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts +190 -0
  504. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  505. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js +413 -0
  506. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js.map +1 -0
  507. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts +440 -0
  508. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  509. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js +232 -0
  510. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
  511. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts +20 -0
  512. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  513. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js +43 -0
  514. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
  515. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts +66 -0
  516. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
  517. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js +206 -0
  518. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js.map +1 -0
  519. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
  520. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
  521. package/node_modules/@azure/msal-common/dist/url/IUri.d.ts +13 -0
  522. package/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map +1 -0
  523. package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts +71 -0
  524. package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map +1 -0
  525. package/node_modules/@azure/msal-common/dist/url/UrlString.js +252 -0
  526. package/node_modules/@azure/msal-common/dist/url/UrlString.js.map +1 -0
  527. package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts +332 -0
  528. package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map +1 -0
  529. package/node_modules/@azure/msal-common/dist/utils/Constants.js +378 -0
  530. package/node_modules/@azure/msal-common/dist/utils/Constants.js.map +1 -0
  531. package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts +7 -0
  532. package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map +1 -0
  533. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts +43 -0
  534. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map +1 -0
  535. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js +80 -0
  536. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js.map +1 -0
  537. package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts +54 -0
  538. package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map +1 -0
  539. package/node_modules/@azure/msal-common/dist/utils/StringUtils.js +131 -0
  540. package/node_modules/@azure/msal-common/dist/utils/StringUtils.js.map +1 -0
  541. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts +28 -0
  542. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map +1 -0
  543. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js +50 -0
  544. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js.map +1 -0
  545. package/node_modules/@azure/msal-common/package.json +79 -0
  546. package/package.json +22 -18
  547. package/dist/_virtual/_tslib.js +0 -117
  548. package/dist/_virtual/_tslib.js.map +0 -1
  549. package/dist/app/ClientApplication.d.ts.map +0 -1
  550. package/dist/app/ClientApplication.js +0 -1053
  551. package/dist/app/ClientApplication.js.map +0 -1
  552. package/dist/index.cjs.js +0 -18080
  553. package/dist/index.cjs.js.map +0 -1
  554. package/lib/msal-browser.js +0 -18086
  555. package/lib/msal-browser.js.map +0 -1
  556. package/lib/msal-browser.min.js +0 -70
@@ -0,0 +1,1024 @@
1
+ /*! @azure/msal-common v14.0.0 2023-05-03 */
2
+ 'use strict';
3
+ import { Separators, CredentialType, AuthenticationScheme, THE_FAMILY_ID, APP_METADATA, AUTHORITY_METADATA_CONSTANTS } from '../utils/Constants.js';
4
+ import { ScopeSet } from '../request/ScopeSet.js';
5
+ import { AccountEntity } from './entities/AccountEntity.js';
6
+ import { AuthError } from '../error/AuthError.js';
7
+ import { ClientAuthError } from '../error/ClientAuthError.js';
8
+ import { AuthToken } from '../account/AuthToken.js';
9
+ import { name, version } from '../packageMetadata.js';
10
+
11
+ /*
12
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13
+ * Licensed under the MIT License.
14
+ */
15
+ /**
16
+ * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.
17
+ */
18
+ class CacheManager {
19
+ constructor(clientId, cryptoImpl, logger) {
20
+ this.clientId = clientId;
21
+ this.cryptoImpl = cryptoImpl;
22
+ this.commonLogger = logger.clone(name, version);
23
+ }
24
+ /**
25
+ * Returns all accounts in cache
26
+ */
27
+ getAllAccounts() {
28
+ const allAccountKeys = this.getAccountKeys();
29
+ if (allAccountKeys.length < 1) {
30
+ return [];
31
+ }
32
+ const accountEntities = allAccountKeys.reduce((accounts, key) => {
33
+ const entity = this.getAccount(key);
34
+ if (!entity) {
35
+ return accounts;
36
+ }
37
+ accounts.push(entity);
38
+ return accounts;
39
+ }, []);
40
+ if (accountEntities.length < 1) {
41
+ return [];
42
+ }
43
+ else {
44
+ const allAccounts = accountEntities.map((accountEntity) => {
45
+ return this.getAccountInfoFromEntity(accountEntity);
46
+ });
47
+ return allAccounts;
48
+ }
49
+ }
50
+ /**
51
+ * Gets accountInfo object based on provided filters
52
+ */
53
+ getAccountInfoFilteredBy(accountFilter) {
54
+ const allAccounts = this.getAccountsFilteredBy(accountFilter);
55
+ if (allAccounts.length > 0) {
56
+ return this.getAccountInfoFromEntity(allAccounts[0]);
57
+ }
58
+ else {
59
+ return null;
60
+ }
61
+ }
62
+ getAccountInfoFromEntity(accountEntity) {
63
+ const accountInfo = accountEntity.getAccountInfo();
64
+ const idToken = this.getIdToken(accountInfo);
65
+ if (idToken) {
66
+ accountInfo.idToken = idToken.secret;
67
+ accountInfo.idTokenClaims = new AuthToken(idToken.secret, this.cryptoImpl).claims;
68
+ }
69
+ return accountInfo;
70
+ }
71
+ /**
72
+ * saves a cache record
73
+ * @param cacheRecord
74
+ */
75
+ async saveCacheRecord(cacheRecord) {
76
+ if (!cacheRecord) {
77
+ throw ClientAuthError.createNullOrUndefinedCacheRecord();
78
+ }
79
+ if (!!cacheRecord.account) {
80
+ this.setAccount(cacheRecord.account);
81
+ }
82
+ if (!!cacheRecord.idToken) {
83
+ this.setIdTokenCredential(cacheRecord.idToken);
84
+ }
85
+ if (!!cacheRecord.accessToken) {
86
+ await this.saveAccessToken(cacheRecord.accessToken);
87
+ }
88
+ if (!!cacheRecord.refreshToken) {
89
+ this.setRefreshTokenCredential(cacheRecord.refreshToken);
90
+ }
91
+ if (!!cacheRecord.appMetadata) {
92
+ this.setAppMetadata(cacheRecord.appMetadata);
93
+ }
94
+ }
95
+ /**
96
+ * saves access token credential
97
+ * @param credential
98
+ */
99
+ async saveAccessToken(credential) {
100
+ const accessTokenFilter = {
101
+ clientId: credential.clientId,
102
+ credentialType: credential.credentialType,
103
+ environment: credential.environment,
104
+ homeAccountId: credential.homeAccountId,
105
+ realm: credential.realm,
106
+ tokenType: credential.tokenType,
107
+ requestedClaimsHash: credential.requestedClaimsHash,
108
+ };
109
+ const tokenKeys = this.getTokenKeys();
110
+ const currentScopes = ScopeSet.fromString(credential.target);
111
+ const removedAccessTokens = [];
112
+ tokenKeys.accessToken.forEach((key) => {
113
+ if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) {
114
+ return;
115
+ }
116
+ const tokenEntity = this.getAccessTokenCredential(key);
117
+ if (tokenEntity &&
118
+ this.credentialMatchesFilter(tokenEntity, accessTokenFilter)) {
119
+ const tokenScopeSet = ScopeSet.fromString(tokenEntity.target);
120
+ if (tokenScopeSet.intersectingScopeSets(currentScopes)) {
121
+ removedAccessTokens.push(this.removeAccessToken(key));
122
+ }
123
+ }
124
+ });
125
+ await Promise.all(removedAccessTokens);
126
+ this.setAccessTokenCredential(credential);
127
+ }
128
+ /**
129
+ * retrieve accounts matching all provided filters; if no filter is set, get all accounts
130
+ * not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared
131
+ * @param homeAccountId
132
+ * @param environment
133
+ * @param realm
134
+ */
135
+ getAccountsFilteredBy(accountFilter) {
136
+ const allAccountKeys = this.getAccountKeys();
137
+ const matchingAccounts = [];
138
+ allAccountKeys.forEach((cacheKey) => {
139
+ if (!this.isAccountKey(cacheKey, accountFilter.homeAccountId, accountFilter.realm)) {
140
+ // Don't parse value if the key doesn't match the account filters
141
+ return;
142
+ }
143
+ const entity = this.getAccount(cacheKey);
144
+ if (!entity) {
145
+ return;
146
+ }
147
+ if (!!accountFilter.homeAccountId &&
148
+ !this.matchHomeAccountId(entity, accountFilter.homeAccountId)) {
149
+ return;
150
+ }
151
+ if (!!accountFilter.localAccountId &&
152
+ !this.matchLocalAccountId(entity, accountFilter.localAccountId)) {
153
+ return;
154
+ }
155
+ if (!!accountFilter.username &&
156
+ !this.matchUsername(entity, accountFilter.username)) {
157
+ return;
158
+ }
159
+ if (!!accountFilter.environment &&
160
+ !this.matchEnvironment(entity, accountFilter.environment)) {
161
+ return;
162
+ }
163
+ if (!!accountFilter.realm &&
164
+ !this.matchRealm(entity, accountFilter.realm)) {
165
+ return;
166
+ }
167
+ if (!!accountFilter.nativeAccountId &&
168
+ !this.matchNativeAccountId(entity, accountFilter.nativeAccountId)) {
169
+ return;
170
+ }
171
+ matchingAccounts.push(entity);
172
+ });
173
+ return matchingAccounts;
174
+ }
175
+ /**
176
+ * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided
177
+ * @param key
178
+ * @param homeAccountId
179
+ * @param tenantId
180
+ * @returns
181
+ */
182
+ isAccountKey(key, homeAccountId, tenantId) {
183
+ if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 3) {
184
+ // Account cache keys contain 3 items separated by '-' (each item may also contain '-')
185
+ return false;
186
+ }
187
+ if (homeAccountId &&
188
+ !key.toLowerCase().includes(homeAccountId.toLowerCase())) {
189
+ return false;
190
+ }
191
+ if (tenantId && !key.toLowerCase().includes(tenantId.toLowerCase())) {
192
+ return false;
193
+ }
194
+ // Do not check environment as aliasing can cause false negatives
195
+ return true;
196
+ }
197
+ /**
198
+ * Returns true if the given key matches our credential key schema.
199
+ * @param key
200
+ */
201
+ isCredentialKey(key) {
202
+ if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 6) {
203
+ // Credential cache keys contain 6 items separated by '-' (each item may also contain '-')
204
+ return false;
205
+ }
206
+ const lowerCaseKey = key.toLowerCase();
207
+ // Credential keys must indicate what credential type they represent
208
+ if (lowerCaseKey.indexOf(CredentialType.ID_TOKEN.toLowerCase()) ===
209
+ -1 &&
210
+ lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) ===
211
+ -1 &&
212
+ lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) === -1 &&
213
+ lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) ===
214
+ -1) {
215
+ return false;
216
+ }
217
+ if (lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) >
218
+ -1) {
219
+ // Refresh tokens must contain the client id or family id
220
+ const clientIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`;
221
+ const familyIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`;
222
+ if (lowerCaseKey.indexOf(clientIdValidation.toLowerCase()) === -1 &&
223
+ lowerCaseKey.indexOf(familyIdValidation.toLowerCase()) === -1) {
224
+ return false;
225
+ }
226
+ }
227
+ else if (lowerCaseKey.indexOf(this.clientId.toLowerCase()) === -1) {
228
+ // Tokens must contain the clientId
229
+ return false;
230
+ }
231
+ return true;
232
+ }
233
+ /**
234
+ * Returns whether or not the given credential entity matches the filter
235
+ * @param entity
236
+ * @param filter
237
+ * @returns
238
+ */
239
+ credentialMatchesFilter(entity, filter) {
240
+ if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) {
241
+ return false;
242
+ }
243
+ if (!!filter.userAssertionHash &&
244
+ !this.matchUserAssertionHash(entity, filter.userAssertionHash)) {
245
+ return false;
246
+ }
247
+ /*
248
+ * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of ""
249
+ * because we don't want a client_credential request to return a cached token that has a homeAccountId
250
+ */
251
+ if (typeof filter.homeAccountId === "string" &&
252
+ !this.matchHomeAccountId(entity, filter.homeAccountId)) {
253
+ return false;
254
+ }
255
+ if (!!filter.environment &&
256
+ !this.matchEnvironment(entity, filter.environment)) {
257
+ return false;
258
+ }
259
+ if (!!filter.realm && !this.matchRealm(entity, filter.realm)) {
260
+ return false;
261
+ }
262
+ if (!!filter.credentialType &&
263
+ !this.matchCredentialType(entity, filter.credentialType)) {
264
+ return false;
265
+ }
266
+ if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) {
267
+ return false;
268
+ }
269
+ /*
270
+ * idTokens do not have "target", target specific refreshTokens do exist for some types of authentication
271
+ * Resource specific refresh tokens case will be added when the support is deemed necessary
272
+ */
273
+ if (!!filter.target && !this.matchTarget(entity, filter.target)) {
274
+ return false;
275
+ }
276
+ // If request OR cached entity has requested Claims Hash, check if they match
277
+ if (filter.requestedClaimsHash || entity.requestedClaimsHash) {
278
+ // Don't match if either is undefined or they are different
279
+ if (entity.requestedClaimsHash !== filter.requestedClaimsHash) {
280
+ return false;
281
+ }
282
+ }
283
+ // Access Token with Auth Scheme specific matching
284
+ if (entity.credentialType ===
285
+ CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) {
286
+ if (!!filter.tokenType &&
287
+ !this.matchTokenType(entity, filter.tokenType)) {
288
+ return false;
289
+ }
290
+ // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key
291
+ if (filter.tokenType === AuthenticationScheme.SSH) {
292
+ if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) {
293
+ return false;
294
+ }
295
+ }
296
+ }
297
+ return true;
298
+ }
299
+ /**
300
+ * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata
301
+ * @param filter
302
+ */
303
+ getAppMetadataFilteredBy(filter) {
304
+ return this.getAppMetadataFilteredByInternal(filter.environment, filter.clientId);
305
+ }
306
+ /**
307
+ * Support function to help match appMetadata
308
+ * @param environment
309
+ * @param clientId
310
+ */
311
+ getAppMetadataFilteredByInternal(environment, clientId) {
312
+ const allCacheKeys = this.getKeys();
313
+ const matchingAppMetadata = {};
314
+ allCacheKeys.forEach((cacheKey) => {
315
+ // don't parse any non-appMetadata type cache entities
316
+ if (!this.isAppMetadata(cacheKey)) {
317
+ return;
318
+ }
319
+ // Attempt retrieval
320
+ const entity = this.getAppMetadata(cacheKey);
321
+ if (!entity) {
322
+ return;
323
+ }
324
+ if (!!environment && !this.matchEnvironment(entity, environment)) {
325
+ return;
326
+ }
327
+ if (!!clientId && !this.matchClientId(entity, clientId)) {
328
+ return;
329
+ }
330
+ matchingAppMetadata[cacheKey] = entity;
331
+ });
332
+ return matchingAppMetadata;
333
+ }
334
+ /**
335
+ * retrieve authorityMetadata that contains a matching alias
336
+ * @param filter
337
+ */
338
+ getAuthorityMetadataByAlias(host) {
339
+ const allCacheKeys = this.getAuthorityMetadataKeys();
340
+ let matchedEntity = null;
341
+ allCacheKeys.forEach((cacheKey) => {
342
+ // don't parse any non-authorityMetadata type cache entities
343
+ if (!this.isAuthorityMetadata(cacheKey) ||
344
+ cacheKey.indexOf(this.clientId) === -1) {
345
+ return;
346
+ }
347
+ // Attempt retrieval
348
+ const entity = this.getAuthorityMetadata(cacheKey);
349
+ if (!entity) {
350
+ return;
351
+ }
352
+ if (entity.aliases.indexOf(host) === -1) {
353
+ return;
354
+ }
355
+ matchedEntity = entity;
356
+ });
357
+ return matchedEntity;
358
+ }
359
+ /**
360
+ * Removes all accounts and related tokens from cache.
361
+ */
362
+ async removeAllAccounts() {
363
+ const allAccountKeys = this.getAccountKeys();
364
+ const removedAccounts = [];
365
+ allAccountKeys.forEach((cacheKey) => {
366
+ removedAccounts.push(this.removeAccount(cacheKey));
367
+ });
368
+ await Promise.all(removedAccounts);
369
+ }
370
+ /**
371
+ * Removes the account and related tokens for a given account key
372
+ * @param account
373
+ */
374
+ async removeAccount(accountKey) {
375
+ const account = this.getAccount(accountKey);
376
+ if (!account) {
377
+ return;
378
+ }
379
+ await this.removeAccountContext(account);
380
+ this.removeItem(accountKey);
381
+ }
382
+ /**
383
+ * Removes credentials associated with the provided account
384
+ * @param account
385
+ */
386
+ async removeAccountContext(account) {
387
+ const allTokenKeys = this.getTokenKeys();
388
+ const accountId = account.generateAccountId();
389
+ const removedCredentials = [];
390
+ allTokenKeys.idToken.forEach((key) => {
391
+ if (key.indexOf(accountId) === 0) {
392
+ this.removeIdToken(key);
393
+ }
394
+ });
395
+ allTokenKeys.accessToken.forEach((key) => {
396
+ if (key.indexOf(accountId) === 0) {
397
+ removedCredentials.push(this.removeAccessToken(key));
398
+ }
399
+ });
400
+ allTokenKeys.refreshToken.forEach((key) => {
401
+ if (key.indexOf(accountId) === 0) {
402
+ this.removeRefreshToken(key);
403
+ }
404
+ });
405
+ await Promise.all(removedCredentials);
406
+ }
407
+ /**
408
+ * returns a boolean if the given credential is removed
409
+ * @param credential
410
+ */
411
+ async removeAccessToken(key) {
412
+ const credential = this.getAccessTokenCredential(key);
413
+ if (!credential) {
414
+ return;
415
+ }
416
+ // Remove Token Binding Key from key store for PoP Tokens Credentials
417
+ if (credential.credentialType.toLowerCase() ===
418
+ CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
419
+ if (credential.tokenType === AuthenticationScheme.POP) {
420
+ const accessTokenWithAuthSchemeEntity = credential;
421
+ const kid = accessTokenWithAuthSchemeEntity.keyId;
422
+ if (kid) {
423
+ try {
424
+ await this.cryptoImpl.removeTokenBindingKey(kid);
425
+ }
426
+ catch (error) {
427
+ throw ClientAuthError.createBindingKeyNotRemovedError();
428
+ }
429
+ }
430
+ }
431
+ }
432
+ return this.removeItem(key);
433
+ }
434
+ /**
435
+ * Removes all app metadata objects from cache.
436
+ */
437
+ removeAppMetadata() {
438
+ const allCacheKeys = this.getKeys();
439
+ allCacheKeys.forEach((cacheKey) => {
440
+ if (this.isAppMetadata(cacheKey)) {
441
+ this.removeItem(cacheKey);
442
+ }
443
+ });
444
+ return true;
445
+ }
446
+ /**
447
+ * Retrieve the cached credentials into a cacherecord
448
+ * @param account
449
+ * @param clientId
450
+ * @param scopes
451
+ * @param environment
452
+ * @param authScheme
453
+ */
454
+ readCacheRecord(account, request, environment) {
455
+ const tokenKeys = this.getTokenKeys();
456
+ const cachedAccount = this.readAccountFromCache(account);
457
+ const cachedIdToken = this.getIdToken(account, tokenKeys);
458
+ const cachedAccessToken = this.getAccessToken(account, request, tokenKeys);
459
+ const cachedRefreshToken = this.getRefreshToken(account, false, tokenKeys);
460
+ const cachedAppMetadata = this.readAppMetadataFromCache(environment);
461
+ if (cachedAccount && cachedIdToken) {
462
+ cachedAccount.idTokenClaims = new AuthToken(cachedIdToken.secret, this.cryptoImpl).claims;
463
+ }
464
+ return {
465
+ account: cachedAccount,
466
+ idToken: cachedIdToken,
467
+ accessToken: cachedAccessToken,
468
+ refreshToken: cachedRefreshToken,
469
+ appMetadata: cachedAppMetadata,
470
+ };
471
+ }
472
+ /**
473
+ * Retrieve AccountEntity from cache
474
+ * @param account
475
+ */
476
+ readAccountFromCache(account) {
477
+ const accountKey = AccountEntity.generateAccountCacheKey(account);
478
+ return this.getAccount(accountKey);
479
+ }
480
+ /**
481
+ * Retrieve IdTokenEntity from cache
482
+ * @param clientId
483
+ * @param account
484
+ * @param inputRealm
485
+ */
486
+ getIdToken(account, tokenKeys) {
487
+ this.commonLogger.trace("CacheManager - getIdToken called");
488
+ const idTokenFilter = {
489
+ homeAccountId: account.homeAccountId,
490
+ environment: account.environment,
491
+ credentialType: CredentialType.ID_TOKEN,
492
+ clientId: this.clientId,
493
+ realm: account.tenantId,
494
+ };
495
+ const idTokens = this.getIdTokensByFilter(idTokenFilter, tokenKeys);
496
+ const numIdTokens = idTokens.length;
497
+ if (numIdTokens < 1) {
498
+ this.commonLogger.info("CacheManager:getIdToken - No token found");
499
+ return null;
500
+ }
501
+ else if (numIdTokens > 1) {
502
+ throw ClientAuthError.createMultipleMatchingTokensInCacheError();
503
+ }
504
+ this.commonLogger.info("CacheManager:getIdToken - Returning id token");
505
+ return idTokens[0];
506
+ }
507
+ /**
508
+ * Gets all idTokens matching the given filter
509
+ * @param filter
510
+ * @returns
511
+ */
512
+ getIdTokensByFilter(filter, tokenKeys) {
513
+ const idTokenKeys = (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken;
514
+ const idTokens = [];
515
+ idTokenKeys.forEach((key) => {
516
+ if (!this.idTokenKeyMatchesFilter(key, {
517
+ clientId: this.clientId,
518
+ ...filter,
519
+ })) {
520
+ return;
521
+ }
522
+ const idToken = this.getIdTokenCredential(key);
523
+ if (idToken && this.credentialMatchesFilter(idToken, filter)) {
524
+ idTokens.push(idToken);
525
+ }
526
+ });
527
+ return idTokens;
528
+ }
529
+ /**
530
+ * Validate the cache key against filter before retrieving and parsing cache value
531
+ * @param key
532
+ * @param filter
533
+ * @returns
534
+ */
535
+ idTokenKeyMatchesFilter(inputKey, filter) {
536
+ const key = inputKey.toLowerCase();
537
+ if (filter.clientId &&
538
+ key.indexOf(filter.clientId.toLowerCase()) === -1) {
539
+ return false;
540
+ }
541
+ if (filter.homeAccountId &&
542
+ key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {
543
+ return false;
544
+ }
545
+ return true;
546
+ }
547
+ /**
548
+ * Removes idToken from the cache
549
+ * @param key
550
+ */
551
+ removeIdToken(key) {
552
+ this.removeItem(key);
553
+ }
554
+ /**
555
+ * Removes refresh token from the cache
556
+ * @param key
557
+ */
558
+ removeRefreshToken(key) {
559
+ this.removeItem(key);
560
+ }
561
+ /**
562
+ * Retrieve AccessTokenEntity from cache
563
+ * @param clientId
564
+ * @param account
565
+ * @param scopes
566
+ * @param authScheme
567
+ */
568
+ getAccessToken(account, request, tokenKeys) {
569
+ this.commonLogger.trace("CacheManager - getAccessToken called");
570
+ const scopes = ScopeSet.createSearchScopes(request.scopes);
571
+ const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER;
572
+ /*
573
+ * Distinguish between Bearer and PoP/SSH token cache types
574
+ * Cast to lowercase to handle "bearer" from ADFS
575
+ */
576
+ const credentialType = authScheme &&
577
+ authScheme.toLowerCase() !==
578
+ AuthenticationScheme.BEARER.toLowerCase()
579
+ ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME
580
+ : CredentialType.ACCESS_TOKEN;
581
+ const accessTokenFilter = {
582
+ homeAccountId: account.homeAccountId,
583
+ environment: account.environment,
584
+ credentialType: credentialType,
585
+ clientId: this.clientId,
586
+ realm: account.tenantId,
587
+ target: scopes,
588
+ tokenType: authScheme,
589
+ keyId: request.sshKid,
590
+ requestedClaimsHash: request.requestedClaimsHash,
591
+ };
592
+ const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) ||
593
+ this.getTokenKeys().accessToken;
594
+ const accessTokens = [];
595
+ accessTokenKeys.forEach((key) => {
596
+ // Validate key
597
+ if (this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true)) {
598
+ const accessToken = this.getAccessTokenCredential(key);
599
+ // Validate value
600
+ if (accessToken &&
601
+ this.credentialMatchesFilter(accessToken, accessTokenFilter)) {
602
+ accessTokens.push(accessToken);
603
+ }
604
+ }
605
+ });
606
+ const numAccessTokens = accessTokens.length;
607
+ if (numAccessTokens < 1) {
608
+ this.commonLogger.info("CacheManager:getAccessToken - No token found");
609
+ return null;
610
+ }
611
+ else if (numAccessTokens > 1) {
612
+ throw ClientAuthError.createMultipleMatchingTokensInCacheError();
613
+ }
614
+ this.commonLogger.info("CacheManager:getAccessToken - Returning access token");
615
+ return accessTokens[0];
616
+ }
617
+ /**
618
+ * Validate the cache key against filter before retrieving and parsing cache value
619
+ * @param key
620
+ * @param filter
621
+ * @param keyMustContainAllScopes
622
+ * @returns
623
+ */
624
+ accessTokenKeyMatchesFilter(inputKey, filter, keyMustContainAllScopes) {
625
+ const key = inputKey.toLowerCase();
626
+ if (filter.clientId &&
627
+ key.indexOf(filter.clientId.toLowerCase()) === -1) {
628
+ return false;
629
+ }
630
+ if (filter.homeAccountId &&
631
+ key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {
632
+ return false;
633
+ }
634
+ if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) {
635
+ return false;
636
+ }
637
+ if (filter.requestedClaimsHash &&
638
+ key.indexOf(filter.requestedClaimsHash.toLowerCase()) === -1) {
639
+ return false;
640
+ }
641
+ if (filter.target) {
642
+ const scopes = filter.target.asArray();
643
+ for (let i = 0; i < scopes.length; i++) {
644
+ if (keyMustContainAllScopes &&
645
+ !key.includes(scopes[i].toLowerCase())) {
646
+ // When performing a cache lookup a missing scope would be a cache miss
647
+ return false;
648
+ }
649
+ else if (!keyMustContainAllScopes &&
650
+ key.includes(scopes[i].toLowerCase())) {
651
+ // When performing a cache write, any token with a subset of requested scopes should be replaced
652
+ return true;
653
+ }
654
+ }
655
+ }
656
+ return true;
657
+ }
658
+ /**
659
+ * Gets all access tokens matching the filter
660
+ * @param filter
661
+ * @returns
662
+ */
663
+ getAccessTokensByFilter(filter) {
664
+ const tokenKeys = this.getTokenKeys();
665
+ const accessTokens = [];
666
+ tokenKeys.accessToken.forEach((key) => {
667
+ if (!this.accessTokenKeyMatchesFilter(key, filter, true)) {
668
+ return;
669
+ }
670
+ const accessToken = this.getAccessTokenCredential(key);
671
+ if (accessToken &&
672
+ this.credentialMatchesFilter(accessToken, filter)) {
673
+ accessTokens.push(accessToken);
674
+ }
675
+ });
676
+ return accessTokens;
677
+ }
678
+ /**
679
+ * Helper to retrieve the appropriate refresh token from cache
680
+ * @param clientId
681
+ * @param account
682
+ * @param familyRT
683
+ */
684
+ getRefreshToken(account, familyRT, tokenKeys) {
685
+ this.commonLogger.trace("CacheManager - getRefreshToken called");
686
+ const id = familyRT ? THE_FAMILY_ID : undefined;
687
+ const refreshTokenFilter = {
688
+ homeAccountId: account.homeAccountId,
689
+ environment: account.environment,
690
+ credentialType: CredentialType.REFRESH_TOKEN,
691
+ clientId: this.clientId,
692
+ familyId: id,
693
+ };
694
+ const refreshTokenKeys = (tokenKeys && tokenKeys.refreshToken) ||
695
+ this.getTokenKeys().refreshToken;
696
+ const refreshTokens = [];
697
+ refreshTokenKeys.forEach((key) => {
698
+ // Validate key
699
+ if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) {
700
+ const refreshToken = this.getRefreshTokenCredential(key);
701
+ // Validate value
702
+ if (refreshToken &&
703
+ this.credentialMatchesFilter(refreshToken, refreshTokenFilter)) {
704
+ refreshTokens.push(refreshToken);
705
+ }
706
+ }
707
+ });
708
+ const numRefreshTokens = refreshTokens.length;
709
+ if (numRefreshTokens < 1) {
710
+ this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found.");
711
+ return null;
712
+ }
713
+ // address the else case after remove functions address environment aliases
714
+ this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token");
715
+ return refreshTokens[0];
716
+ }
717
+ /**
718
+ * Validate the cache key against filter before retrieving and parsing cache value
719
+ * @param key
720
+ * @param filter
721
+ */
722
+ refreshTokenKeyMatchesFilter(inputKey, filter) {
723
+ const key = inputKey.toLowerCase();
724
+ if (filter.familyId &&
725
+ key.indexOf(filter.familyId.toLowerCase()) === -1) {
726
+ return false;
727
+ }
728
+ // If familyId is used, clientId is not in the key
729
+ if (!filter.familyId &&
730
+ filter.clientId &&
731
+ key.indexOf(filter.clientId.toLowerCase()) === -1) {
732
+ return false;
733
+ }
734
+ if (filter.homeAccountId &&
735
+ key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {
736
+ return false;
737
+ }
738
+ return true;
739
+ }
740
+ /**
741
+ * Retrieve AppMetadataEntity from cache
742
+ */
743
+ readAppMetadataFromCache(environment) {
744
+ const appMetadataFilter = {
745
+ environment,
746
+ clientId: this.clientId,
747
+ };
748
+ const appMetadata = this.getAppMetadataFilteredBy(appMetadataFilter);
749
+ const appMetadataEntries = Object.keys(appMetadata).map((key) => appMetadata[key]);
750
+ const numAppMetadata = appMetadataEntries.length;
751
+ if (numAppMetadata < 1) {
752
+ return null;
753
+ }
754
+ else if (numAppMetadata > 1) {
755
+ throw ClientAuthError.createMultipleMatchingAppMetadataInCacheError();
756
+ }
757
+ return appMetadataEntries[0];
758
+ }
759
+ /**
760
+ * Return the family_id value associated with FOCI
761
+ * @param environment
762
+ * @param clientId
763
+ */
764
+ isAppMetadataFOCI(environment) {
765
+ const appMetadata = this.readAppMetadataFromCache(environment);
766
+ return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID);
767
+ }
768
+ /**
769
+ * helper to match account ids
770
+ * @param value
771
+ * @param homeAccountId
772
+ */
773
+ matchHomeAccountId(entity, homeAccountId) {
774
+ return !!(typeof entity.homeAccountId === "string" &&
775
+ homeAccountId === entity.homeAccountId);
776
+ }
777
+ /**
778
+ * helper to match account ids
779
+ * @param entity
780
+ * @param localAccountId
781
+ * @returns
782
+ */
783
+ matchLocalAccountId(entity, localAccountId) {
784
+ return !!(typeof entity.localAccountId === "string" &&
785
+ localAccountId === entity.localAccountId);
786
+ }
787
+ /**
788
+ * helper to match usernames
789
+ * @param entity
790
+ * @param username
791
+ * @returns
792
+ */
793
+ matchUsername(entity, username) {
794
+ return !!(typeof entity.username === "string" &&
795
+ username.toLowerCase() === entity.username.toLowerCase());
796
+ }
797
+ /**
798
+ * helper to match assertion
799
+ * @param value
800
+ * @param oboAssertion
801
+ */
802
+ matchUserAssertionHash(entity, userAssertionHash) {
803
+ return !!(entity.userAssertionHash &&
804
+ userAssertionHash === entity.userAssertionHash);
805
+ }
806
+ /**
807
+ * helper to match environment
808
+ * @param value
809
+ * @param environment
810
+ */
811
+ matchEnvironment(entity, environment) {
812
+ const cloudMetadata = this.getAuthorityMetadataByAlias(environment);
813
+ if (cloudMetadata &&
814
+ cloudMetadata.aliases.indexOf(entity.environment) > -1) {
815
+ return true;
816
+ }
817
+ return false;
818
+ }
819
+ /**
820
+ * helper to match credential type
821
+ * @param entity
822
+ * @param credentialType
823
+ */
824
+ matchCredentialType(entity, credentialType) {
825
+ return (entity.credentialType &&
826
+ credentialType.toLowerCase() === entity.credentialType.toLowerCase());
827
+ }
828
+ /**
829
+ * helper to match client ids
830
+ * @param entity
831
+ * @param clientId
832
+ */
833
+ matchClientId(entity, clientId) {
834
+ return !!(entity.clientId && clientId === entity.clientId);
835
+ }
836
+ /**
837
+ * helper to match family ids
838
+ * @param entity
839
+ * @param familyId
840
+ */
841
+ matchFamilyId(entity, familyId) {
842
+ return !!(entity.familyId && familyId === entity.familyId);
843
+ }
844
+ /**
845
+ * helper to match realm
846
+ * @param entity
847
+ * @param realm
848
+ */
849
+ matchRealm(entity, realm) {
850
+ return !!(entity.realm && realm === entity.realm);
851
+ }
852
+ /**
853
+ * helper to match nativeAccountId
854
+ * @param entity
855
+ * @param nativeAccountId
856
+ * @returns boolean indicating the match result
857
+ */
858
+ matchNativeAccountId(entity, nativeAccountId) {
859
+ return !!(entity.nativeAccountId && nativeAccountId === entity.nativeAccountId);
860
+ }
861
+ /**
862
+ * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.
863
+ * @param entity
864
+ * @param target
865
+ */
866
+ matchTarget(entity, target) {
867
+ const isNotAccessTokenCredential = entity.credentialType !== CredentialType.ACCESS_TOKEN &&
868
+ entity.credentialType !==
869
+ CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
870
+ if (isNotAccessTokenCredential || !entity.target) {
871
+ return false;
872
+ }
873
+ const entityScopeSet = ScopeSet.fromString(entity.target);
874
+ return entityScopeSet.containsScopeSet(target);
875
+ }
876
+ /**
877
+ * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise
878
+ * @param entity
879
+ * @param tokenType
880
+ */
881
+ matchTokenType(entity, tokenType) {
882
+ return !!(entity.tokenType && entity.tokenType === tokenType);
883
+ }
884
+ /**
885
+ * Returns true if the credential's keyId matches the one in the request, false otherwise
886
+ * @param entity
887
+ * @param tokenType
888
+ */
889
+ matchKeyId(entity, keyId) {
890
+ return !!(entity.keyId && entity.keyId === keyId);
891
+ }
892
+ /**
893
+ * returns if a given cache entity is of the type appmetadata
894
+ * @param key
895
+ */
896
+ isAppMetadata(key) {
897
+ return key.indexOf(APP_METADATA) !== -1;
898
+ }
899
+ /**
900
+ * returns if a given cache entity is of the type authoritymetadata
901
+ * @param key
902
+ */
903
+ isAuthorityMetadata(key) {
904
+ return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1;
905
+ }
906
+ /**
907
+ * returns cache key used for cloud instance metadata
908
+ */
909
+ generateAuthorityMetadataCacheKey(authority) {
910
+ return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`;
911
+ }
912
+ /**
913
+ * Helper to convert serialized data to object
914
+ * @param obj
915
+ * @param json
916
+ */
917
+ static toObject(obj, json) {
918
+ for (const propertyName in json) {
919
+ obj[propertyName] = json[propertyName];
920
+ }
921
+ return obj;
922
+ }
923
+ }
924
+ class DefaultStorageClass extends CacheManager {
925
+ setAccount() {
926
+ const notImplErr = "Storage interface - setAccount() has not been implemented for the cacheStorage interface.";
927
+ throw AuthError.createUnexpectedError(notImplErr);
928
+ }
929
+ getAccount() {
930
+ const notImplErr = "Storage interface - getAccount() has not been implemented for the cacheStorage interface.";
931
+ throw AuthError.createUnexpectedError(notImplErr);
932
+ }
933
+ setIdTokenCredential() {
934
+ const notImplErr = "Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";
935
+ throw AuthError.createUnexpectedError(notImplErr);
936
+ }
937
+ getIdTokenCredential() {
938
+ const notImplErr = "Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";
939
+ throw AuthError.createUnexpectedError(notImplErr);
940
+ }
941
+ setAccessTokenCredential() {
942
+ const notImplErr = "Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";
943
+ throw AuthError.createUnexpectedError(notImplErr);
944
+ }
945
+ getAccessTokenCredential() {
946
+ const notImplErr = "Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";
947
+ throw AuthError.createUnexpectedError(notImplErr);
948
+ }
949
+ setRefreshTokenCredential() {
950
+ const notImplErr = "Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";
951
+ throw AuthError.createUnexpectedError(notImplErr);
952
+ }
953
+ getRefreshTokenCredential() {
954
+ const notImplErr = "Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";
955
+ throw AuthError.createUnexpectedError(notImplErr);
956
+ }
957
+ setAppMetadata() {
958
+ const notImplErr = "Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";
959
+ throw AuthError.createUnexpectedError(notImplErr);
960
+ }
961
+ getAppMetadata() {
962
+ const notImplErr = "Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";
963
+ throw AuthError.createUnexpectedError(notImplErr);
964
+ }
965
+ setServerTelemetry() {
966
+ const notImplErr = "Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";
967
+ throw AuthError.createUnexpectedError(notImplErr);
968
+ }
969
+ getServerTelemetry() {
970
+ const notImplErr = "Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";
971
+ throw AuthError.createUnexpectedError(notImplErr);
972
+ }
973
+ setAuthorityMetadata() {
974
+ const notImplErr = "Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";
975
+ throw AuthError.createUnexpectedError(notImplErr);
976
+ }
977
+ getAuthorityMetadata() {
978
+ const notImplErr = "Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";
979
+ throw AuthError.createUnexpectedError(notImplErr);
980
+ }
981
+ getAuthorityMetadataKeys() {
982
+ const notImplErr = "Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";
983
+ throw AuthError.createUnexpectedError(notImplErr);
984
+ }
985
+ setThrottlingCache() {
986
+ const notImplErr = "Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";
987
+ throw AuthError.createUnexpectedError(notImplErr);
988
+ }
989
+ getThrottlingCache() {
990
+ const notImplErr = "Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";
991
+ throw AuthError.createUnexpectedError(notImplErr);
992
+ }
993
+ removeItem() {
994
+ const notImplErr = "Storage interface - removeItem() has not been implemented for the cacheStorage interface.";
995
+ throw AuthError.createUnexpectedError(notImplErr);
996
+ }
997
+ containsKey() {
998
+ const notImplErr = "Storage interface - containsKey() has not been implemented for the cacheStorage interface.";
999
+ throw AuthError.createUnexpectedError(notImplErr);
1000
+ }
1001
+ getKeys() {
1002
+ const notImplErr = "Storage interface - getKeys() has not been implemented for the cacheStorage interface.";
1003
+ throw AuthError.createUnexpectedError(notImplErr);
1004
+ }
1005
+ getAccountKeys() {
1006
+ const notImplErr = "Storage interface - getAccountKeys() has not been implemented for the cacheStorage interface.";
1007
+ throw AuthError.createUnexpectedError(notImplErr);
1008
+ }
1009
+ getTokenKeys() {
1010
+ const notImplErr = "Storage interface - getTokenKeys() has not been implemented for the cacheStorage interface.";
1011
+ throw AuthError.createUnexpectedError(notImplErr);
1012
+ }
1013
+ async clear() {
1014
+ const notImplErr = "Storage interface - clear() has not been implemented for the cacheStorage interface.";
1015
+ throw AuthError.createUnexpectedError(notImplErr);
1016
+ }
1017
+ updateCredentialCacheKey() {
1018
+ const notImplErr = "Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";
1019
+ throw AuthError.createUnexpectedError(notImplErr);
1020
+ }
1021
+ }
1022
+
1023
+ export { CacheManager, DefaultStorageClass };
1024
+ //# sourceMappingURL=CacheManager.js.map