@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
@@ -1,9 +1,8 @@
1
- /*! @azure/msal-browser v2.37.0 2023-05-01 */
1
+ /*! @azure/msal-browser v3.0.0-alpha.0 2023-05-03 */
2
2
  'use strict';
3
- import { __extends, __awaiter, __generator, __rest, __assign } from '../_virtual/_tslib.js';
4
- import { ScopeSet, AuthToken, Constants, AccountEntity, AuthorityType, IdTokenEntity, AccessTokenEntity, PerformanceEvents, TimeUtils, ClientAuthError, AuthenticationScheme, PopTokenGenerator, UrlString, OIDC_DEFAULT_SCOPES, PromptValue } from '@azure/msal-common';
3
+ import { PerformanceEvents, TimeUtils, ScopeSet, ClientAuthError, AuthToken, Constants, AccountEntity, AuthorityType, AuthenticationScheme, PopTokenGenerator, IdTokenEntity, AccessTokenEntity, UrlString, OIDC_DEFAULT_SCOPES, PromptValue } from '@azure/msal-common';
5
4
  import { BaseInteractionClient } from './BaseInteractionClient.js';
6
- import { TemporaryCacheKeys, NativeExtensionMethod, NativeConstants, ApiId } from '../utils/BrowserConstants.js';
5
+ import { TemporaryCacheKeys, NativeConstants, NativeExtensionMethod, ApiId } from '../utils/BrowserConstants.js';
7
6
  import { NativeAuthError } from '../error/NativeAuthError.js';
8
7
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
9
8
  import { SilentCacheClient } from './SilentCacheClient.js';
@@ -12,88 +11,73 @@ import { SilentCacheClient } from './SilentCacheClient.js';
12
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
13
12
  * Licensed under the MIT License.
14
13
  */
15
- var NativeInteractionClient = /** @class */ (function (_super) {
16
- __extends(NativeInteractionClient, _super);
17
- function NativeInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, apiId, performanceClient, provider, accountId, nativeStorageImpl, correlationId) {
18
- var _this = _super.call(this, config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId) || this;
19
- _this.apiId = apiId;
20
- _this.accountId = accountId;
21
- _this.nativeMessageHandler = provider;
22
- _this.nativeStorageManager = nativeStorageImpl;
23
- _this.silentCacheClient = new SilentCacheClient(config, _this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);
24
- return _this;
14
+ class NativeInteractionClient extends BaseInteractionClient {
15
+ constructor(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, apiId, performanceClient, provider, accountId, nativeStorageImpl, correlationId) {
16
+ super(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);
17
+ this.apiId = apiId;
18
+ this.accountId = accountId;
19
+ this.nativeMessageHandler = provider;
20
+ this.nativeStorageManager = nativeStorageImpl;
21
+ this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);
25
22
  }
26
23
  /**
27
24
  * Acquire token from native platform via browser extension
28
25
  * @param request
29
26
  */
30
- NativeInteractionClient.prototype.acquireToken = function (request) {
31
- return __awaiter(this, void 0, void 0, function () {
32
- var nativeATMeasurement, reqTimestamp, nativeRequest, result, messageBody, response, validatedResponse;
33
- return __generator(this, function (_a) {
34
- switch (_a.label) {
35
- case 0:
36
- this.logger.trace("NativeInteractionClient - acquireToken called.");
37
- nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
38
- reqTimestamp = TimeUtils.nowSeconds();
39
- return [4 /*yield*/, this.initializeNativeRequest(request)];
40
- case 1:
41
- nativeRequest = _a.sent();
42
- _a.label = 2;
43
- case 2:
44
- _a.trys.push([2, 4, , 5]);
45
- return [4 /*yield*/, this.acquireTokensFromCache(this.accountId, nativeRequest)];
46
- case 3:
47
- result = _a.sent();
48
- nativeATMeasurement.endMeasurement({
49
- success: true,
50
- isNativeBroker: false,
51
- fromCache: true
52
- });
53
- return [2 /*return*/, result];
54
- case 4:
55
- _a.sent();
56
- // continue with a native call for any and all errors
57
- this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
58
- return [3 /*break*/, 5];
59
- case 5:
60
- messageBody = {
61
- method: NativeExtensionMethod.GetToken,
62
- request: nativeRequest
63
- };
64
- return [4 /*yield*/, this.nativeMessageHandler.sendMessage(messageBody)];
65
- case 6:
66
- response = _a.sent();
67
- validatedResponse = this.validateNativeResponse(response);
68
- return [2 /*return*/, this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
69
- .then(function (result) {
70
- nativeATMeasurement.endMeasurement({
71
- success: true,
72
- isNativeBroker: true,
73
- requestId: result.requestId
74
- });
75
- return result;
76
- })
77
- .catch(function (error) {
78
- nativeATMeasurement.endMeasurement({
79
- success: false,
80
- errorCode: error.errorCode,
81
- subErrorCode: error.subError,
82
- isNativeBroker: true
83
- });
84
- throw error;
85
- })];
86
- }
27
+ async acquireToken(request) {
28
+ this.logger.trace("NativeInteractionClient - acquireToken called.");
29
+ // start the perf measurement
30
+ const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
31
+ const reqTimestamp = TimeUtils.nowSeconds();
32
+ // initialize native request
33
+ const nativeRequest = await this.initializeNativeRequest(request);
34
+ // check if the tokens can be retrieved from internal cache
35
+ try {
36
+ const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
37
+ nativeATMeasurement.endMeasurement({
38
+ success: true,
39
+ isNativeBroker: false,
40
+ fromCache: true,
87
41
  });
42
+ return result;
43
+ }
44
+ catch (e) {
45
+ // continue with a native call for any and all errors
46
+ this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
47
+ }
48
+ // fall back to native calls
49
+ const messageBody = {
50
+ method: NativeExtensionMethod.GetToken,
51
+ request: nativeRequest,
52
+ };
53
+ const response = await this.nativeMessageHandler.sendMessage(messageBody);
54
+ const validatedResponse = this.validateNativeResponse(response);
55
+ return this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
56
+ .then((result) => {
57
+ nativeATMeasurement.endMeasurement({
58
+ success: true,
59
+ isNativeBroker: true,
60
+ requestId: result.requestId,
61
+ });
62
+ return result;
63
+ })
64
+ .catch((error) => {
65
+ nativeATMeasurement.endMeasurement({
66
+ success: false,
67
+ errorCode: error.errorCode,
68
+ subErrorCode: error.subError,
69
+ isNativeBroker: true,
70
+ });
71
+ throw error;
88
72
  });
89
- };
73
+ }
90
74
  /**
91
75
  * Creates silent flow request
92
76
  * @param request
93
77
  * @param cachedAccount
94
78
  * @returns CommonSilentFlowRequest
95
79
  */
96
- NativeInteractionClient.prototype.createSilentCacheRequest = function (request, cachedAccount) {
80
+ createSilentCacheRequest(request, cachedAccount) {
97
81
  return {
98
82
  authority: request.authority,
99
83
  correlationId: this.correlationId,
@@ -101,203 +85,158 @@ var NativeInteractionClient = /** @class */ (function (_super) {
101
85
  account: cachedAccount,
102
86
  forceRefresh: false,
103
87
  };
104
- };
88
+ }
105
89
  /**
106
90
  * Fetches the tokens from the cache if un-expired
107
91
  * @param nativeAccountId
108
92
  * @param request
109
93
  * @returns authenticationResult
110
94
  */
111
- NativeInteractionClient.prototype.acquireTokensFromCache = function (nativeAccountId, request) {
112
- return __awaiter(this, void 0, void 0, function () {
113
- var account, silentRequest, result, e_2;
114
- return __generator(this, function (_a) {
115
- switch (_a.label) {
116
- case 0:
117
- if (!nativeAccountId) {
118
- this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided");
119
- throw ClientAuthError.createNoAccountFoundError();
120
- }
121
- account = this.browserStorage.getAccountInfoFilteredBy({ nativeAccountId: nativeAccountId });
122
- if (!account) {
123
- throw ClientAuthError.createNoAccountFoundError();
124
- }
125
- _a.label = 1;
126
- case 1:
127
- _a.trys.push([1, 3, , 4]);
128
- silentRequest = this.createSilentCacheRequest(request, account);
129
- return [4 /*yield*/, this.silentCacheClient.acquireToken(silentRequest)];
130
- case 2:
131
- result = _a.sent();
132
- return [2 /*return*/, result];
133
- case 3:
134
- e_2 = _a.sent();
135
- throw e_2;
136
- case 4: return [2 /*return*/];
137
- }
138
- });
95
+ async acquireTokensFromCache(nativeAccountId, request) {
96
+ if (!nativeAccountId) {
97
+ this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided");
98
+ throw ClientAuthError.createNoAccountFoundError();
99
+ }
100
+ // fetch the account from in-memory cache
101
+ const account = this.browserStorage.getAccountInfoFilteredBy({
102
+ nativeAccountId,
139
103
  });
140
- };
104
+ if (!account) {
105
+ throw ClientAuthError.createNoAccountFoundError();
106
+ }
107
+ // leverage silent flow for cached tokens retrieval
108
+ try {
109
+ const silentRequest = this.createSilentCacheRequest(request, account);
110
+ const result = await this.silentCacheClient.acquireToken(silentRequest);
111
+ return result;
112
+ }
113
+ catch (e) {
114
+ throw e;
115
+ }
116
+ }
141
117
  /**
142
118
  * Acquires a token from native platform then redirects to the redirectUri instead of returning the response
143
119
  * @param request
144
120
  */
145
- NativeInteractionClient.prototype.acquireTokenRedirect = function (request) {
146
- return __awaiter(this, void 0, void 0, function () {
147
- var nativeRequest, messageBody, response, e_3, navigationOptions, redirectUri;
148
- return __generator(this, function (_a) {
149
- switch (_a.label) {
150
- case 0:
151
- this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");
152
- return [4 /*yield*/, this.initializeNativeRequest(request)];
153
- case 1:
154
- nativeRequest = _a.sent();
155
- messageBody = {
156
- method: NativeExtensionMethod.GetToken,
157
- request: nativeRequest
158
- };
159
- _a.label = 2;
160
- case 2:
161
- _a.trys.push([2, 4, , 5]);
162
- return [4 /*yield*/, this.nativeMessageHandler.sendMessage(messageBody)];
163
- case 3:
164
- response = _a.sent();
165
- this.validateNativeResponse(response);
166
- return [3 /*break*/, 5];
167
- case 4:
168
- e_3 = _a.sent();
169
- // Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
170
- if (e_3 instanceof NativeAuthError && e_3.isFatal()) {
171
- throw e_3;
172
- }
173
- return [3 /*break*/, 5];
174
- case 5:
175
- this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);
176
- navigationOptions = {
177
- apiId: ApiId.acquireTokenRedirect,
178
- timeout: this.config.system.redirectNavigationTimeout,
179
- noHistory: false
180
- };
181
- redirectUri = this.config.auth.navigateToLoginRequestUrl ? window.location.href : this.getRedirectUri(request.redirectUri);
182
- return [4 /*yield*/, this.navigationClient.navigateExternal(redirectUri, navigationOptions)];
183
- case 6:
184
- _a.sent(); // Need to treat this as external to ensure handleRedirectPromise is run again
185
- return [2 /*return*/];
186
- }
187
- });
188
- });
189
- };
121
+ async acquireTokenRedirect(request) {
122
+ this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");
123
+ const nativeRequest = await this.initializeNativeRequest(request);
124
+ const messageBody = {
125
+ method: NativeExtensionMethod.GetToken,
126
+ request: nativeRequest,
127
+ };
128
+ try {
129
+ const response = await this.nativeMessageHandler.sendMessage(messageBody);
130
+ this.validateNativeResponse(response);
131
+ }
132
+ catch (e) {
133
+ // Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
134
+ if (e instanceof NativeAuthError && e.isFatal()) {
135
+ throw e;
136
+ }
137
+ }
138
+ this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);
139
+ const navigationOptions = {
140
+ apiId: ApiId.acquireTokenRedirect,
141
+ timeout: this.config.system.redirectNavigationTimeout,
142
+ noHistory: false,
143
+ };
144
+ const redirectUri = this.config.auth.navigateToLoginRequestUrl
145
+ ? window.location.href
146
+ : this.getRedirectUri(request.redirectUri);
147
+ await this.navigationClient.navigateExternal(redirectUri, navigationOptions); // Need to treat this as external to ensure handleRedirectPromise is run again
148
+ }
190
149
  /**
191
150
  * If the previous page called native platform for a token using redirect APIs, send the same request again and return the response
192
151
  */
193
- NativeInteractionClient.prototype.handleRedirectPromise = function () {
194
- return __awaiter(this, void 0, void 0, function () {
195
- var cachedRequest, prompt, request, messageBody, reqTimestamp, response, result, e_4;
196
- return __generator(this, function (_a) {
197
- switch (_a.label) {
198
- case 0:
199
- this.logger.trace("NativeInteractionClient - handleRedirectPromise called.");
200
- if (!this.browserStorage.isInteractionInProgress(true)) {
201
- this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null.");
202
- return [2 /*return*/, null];
203
- }
204
- cachedRequest = this.browserStorage.getCachedNativeRequest();
205
- if (!cachedRequest) {
206
- this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null.");
207
- return [2 /*return*/, null];
208
- }
209
- prompt = cachedRequest.prompt, request = __rest(cachedRequest, ["prompt"]);
210
- if (prompt) {
211
- this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window.");
212
- }
213
- this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
214
- messageBody = {
215
- method: NativeExtensionMethod.GetToken,
216
- request: request
217
- };
218
- reqTimestamp = TimeUtils.nowSeconds();
219
- _a.label = 1;
220
- case 1:
221
- _a.trys.push([1, 3, , 4]);
222
- this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");
223
- return [4 /*yield*/, this.nativeMessageHandler.sendMessage(messageBody)];
224
- case 2:
225
- response = _a.sent();
226
- this.validateNativeResponse(response);
227
- result = this.handleNativeResponse(response, request, reqTimestamp);
228
- this.browserStorage.setInteractionInProgress(false);
229
- return [2 /*return*/, result];
230
- case 3:
231
- e_4 = _a.sent();
232
- this.browserStorage.setInteractionInProgress(false);
233
- throw e_4;
234
- case 4: return [2 /*return*/];
235
- }
236
- });
237
- });
238
- };
152
+ async handleRedirectPromise() {
153
+ this.logger.trace("NativeInteractionClient - handleRedirectPromise called.");
154
+ if (!this.browserStorage.isInteractionInProgress(true)) {
155
+ this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null.");
156
+ return null;
157
+ }
158
+ // remove prompt from the request to prevent WAM from prompting twice
159
+ const cachedRequest = this.browserStorage.getCachedNativeRequest();
160
+ if (!cachedRequest) {
161
+ this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null.");
162
+ return null;
163
+ }
164
+ const { prompt, ...request } = cachedRequest;
165
+ if (prompt) {
166
+ this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window.");
167
+ }
168
+ this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
169
+ const messageBody = {
170
+ method: NativeExtensionMethod.GetToken,
171
+ request: request,
172
+ };
173
+ const reqTimestamp = TimeUtils.nowSeconds();
174
+ try {
175
+ this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");
176
+ const response = await this.nativeMessageHandler.sendMessage(messageBody);
177
+ this.validateNativeResponse(response);
178
+ const result = this.handleNativeResponse(response, request, reqTimestamp);
179
+ this.browserStorage.setInteractionInProgress(false);
180
+ return result;
181
+ }
182
+ catch (e) {
183
+ this.browserStorage.setInteractionInProgress(false);
184
+ throw e;
185
+ }
186
+ }
239
187
  /**
240
188
  * Logout from native platform via browser extension
241
189
  * @param request
242
190
  */
243
- NativeInteractionClient.prototype.logout = function () {
191
+ logout() {
244
192
  this.logger.trace("NativeInteractionClient - logout called.");
245
193
  return Promise.reject("Logout not implemented yet");
246
- };
194
+ }
247
195
  /**
248
196
  * Transform response from native platform into AuthenticationResult object which will be returned to the end user
249
197
  * @param response
250
198
  * @param request
251
199
  * @param reqTimestamp
252
200
  */
253
- NativeInteractionClient.prototype.handleNativeResponse = function (response, request, reqTimestamp) {
254
- return __awaiter(this, void 0, void 0, function () {
255
- var authority, authorityPreferredCache, idTokenObj, homeAccountIdentifier, accountEntity, result;
256
- return __generator(this, function (_a) {
257
- switch (_a.label) {
258
- case 0:
259
- this.logger.trace("NativeInteractionClient - handleNativeResponse called.");
260
- if (response.account.id !== request.accountId) {
261
- // User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync
262
- throw NativeAuthError.createUserSwitchError();
263
- }
264
- return [4 /*yield*/, this.getDiscoveredAuthority(request.authority)];
265
- case 1:
266
- authority = _a.sent();
267
- authorityPreferredCache = authority.getPreferredCache();
268
- idTokenObj = this.createIdTokenObj(response);
269
- homeAccountIdentifier = this.createHomeAccountIdentifier(response, idTokenObj);
270
- accountEntity = this.createAccountEntity(response, homeAccountIdentifier, idTokenObj, authorityPreferredCache);
271
- return [4 /*yield*/, this.generateAuthenticationResult(response, request, idTokenObj, accountEntity, authority.canonicalAuthority, reqTimestamp)];
272
- case 2:
273
- result = _a.sent();
274
- // cache accounts and tokens in the appropriate storage
275
- this.cacheAccount(accountEntity);
276
- this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenObj, result.accessToken, result.tenantId, reqTimestamp);
277
- return [2 /*return*/, result];
278
- }
279
- });
280
- });
281
- };
201
+ async handleNativeResponse(response, request, reqTimestamp) {
202
+ this.logger.trace("NativeInteractionClient - handleNativeResponse called.");
203
+ if (response.account.id !== request.accountId) {
204
+ // User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync
205
+ throw NativeAuthError.createUserSwitchError();
206
+ }
207
+ // Get the preferred_cache domain for the given authority
208
+ const authority = await this.getDiscoveredAuthority(request.authority);
209
+ const authorityPreferredCache = authority.getPreferredCache();
210
+ // generate identifiers
211
+ const idTokenObj = this.createIdTokenObj(response);
212
+ const homeAccountIdentifier = this.createHomeAccountIdentifier(response, idTokenObj);
213
+ const accountEntity = this.createAccountEntity(response, homeAccountIdentifier, idTokenObj, authorityPreferredCache);
214
+ // generate authenticationResult
215
+ const result = await this.generateAuthenticationResult(response, request, idTokenObj, accountEntity, authority.canonicalAuthority, reqTimestamp);
216
+ // cache accounts and tokens in the appropriate storage
217
+ this.cacheAccount(accountEntity);
218
+ this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenObj, result.accessToken, result.tenantId, reqTimestamp);
219
+ return result;
220
+ }
282
221
  /**
283
222
  * Create an idToken Object (not entity)
284
223
  * @param response
285
224
  * @returns
286
225
  */
287
- NativeInteractionClient.prototype.createIdTokenObj = function (response) {
226
+ createIdTokenObj(response) {
288
227
  return new AuthToken(response.id_token || Constants.EMPTY_STRING, this.browserCrypto);
289
- };
228
+ }
290
229
  /**
291
230
  * creates an homeAccountIdentifier for the account
292
231
  * @param response
293
232
  * @param idTokenObj
294
233
  * @returns
295
234
  */
296
- NativeInteractionClient.prototype.createHomeAccountIdentifier = function (response, idTokenObj) {
235
+ createHomeAccountIdentifier(response, idTokenObj) {
297
236
  // Save account in browser storage
298
- var homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);
237
+ const homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);
299
238
  return homeAccountIdentifier;
300
- };
239
+ }
301
240
  /**
302
241
  * Creates account entity
303
242
  * @param response
@@ -306,60 +245,57 @@ var NativeInteractionClient = /** @class */ (function (_super) {
306
245
  * @param authority
307
246
  * @returns
308
247
  */
309
- NativeInteractionClient.prototype.createAccountEntity = function (response, homeAccountIdentifier, idTokenObj, authority) {
248
+ createAccountEntity(response, homeAccountIdentifier, idTokenObj, authority) {
310
249
  return AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, authority, response.account.id);
311
- };
250
+ }
312
251
  /**
313
252
  * Helper to generate scopes
314
253
  * @param response
315
254
  * @param request
316
255
  * @returns
317
256
  */
318
- NativeInteractionClient.prototype.generateScopes = function (response, request) {
319
- return response.scope ? ScopeSet.fromString(response.scope) : ScopeSet.fromString(request.scope);
320
- };
257
+ generateScopes(response, request) {
258
+ return response.scope
259
+ ? ScopeSet.fromString(response.scope)
260
+ : ScopeSet.fromString(request.scope);
261
+ }
321
262
  /**
322
263
  * If PoP token is requesred, records the PoP token if returned from the WAM, else generates one in the browser
323
264
  * @param request
324
265
  * @param response
325
266
  */
326
- NativeInteractionClient.prototype.generatePopAccessToken = function (response, request) {
327
- return __awaiter(this, void 0, void 0, function () {
328
- var popTokenGenerator, shrParameters;
329
- return __generator(this, function (_a) {
330
- switch (_a.label) {
331
- case 0:
332
- if (!(request.tokenType === AuthenticationScheme.POP)) return [3 /*break*/, 2];
333
- /**
334
- * This code prioritizes SHR returned from the native layer. In case of error/SHR not calculated from WAM and the AT
335
- * is still received, SHR is calculated locally
336
- */
337
- // Check if native layer returned an SHR token
338
- if (response.shr) {
339
- this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer");
340
- return [2 /*return*/, response.shr];
341
- }
342
- popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
343
- shrParameters = {
344
- resourceRequestMethod: request.resourceRequestMethod,
345
- resourceRequestUri: request.resourceRequestUri,
346
- shrClaims: request.shrClaims,
347
- shrNonce: request.shrNonce
348
- };
349
- /**
350
- * KeyID must be present in the native request from when the PoP key was generated in order for
351
- * PopTokenGenerator to query the full key for signing
352
- */
353
- if (!request.keyId) {
354
- throw ClientAuthError.createKeyIdMissingError();
355
- }
356
- return [4 /*yield*/, popTokenGenerator.signPopToken(response.access_token, request.keyId, shrParameters)];
357
- case 1: return [2 /*return*/, _a.sent()];
358
- case 2: return [2 /*return*/, response.access_token];
359
- }
360
- });
361
- });
362
- };
267
+ async generatePopAccessToken(response, request) {
268
+ if (request.tokenType === AuthenticationScheme.POP) {
269
+ /**
270
+ * This code prioritizes SHR returned from the native layer. In case of error/SHR not calculated from WAM and the AT
271
+ * is still received, SHR is calculated locally
272
+ */
273
+ // Check if native layer returned an SHR token
274
+ if (response.shr) {
275
+ this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer");
276
+ return response.shr;
277
+ }
278
+ // Generate SHR in msal js if WAM does not compute it when POP is enabled
279
+ const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
280
+ const shrParameters = {
281
+ resourceRequestMethod: request.resourceRequestMethod,
282
+ resourceRequestUri: request.resourceRequestUri,
283
+ shrClaims: request.shrClaims,
284
+ shrNonce: request.shrNonce,
285
+ };
286
+ /**
287
+ * KeyID must be present in the native request from when the PoP key was generated in order for
288
+ * PopTokenGenerator to query the full key for signing
289
+ */
290
+ if (!request.keyId) {
291
+ throw ClientAuthError.createKeyIdMissingError();
292
+ }
293
+ return await popTokenGenerator.signPopToken(response.access_token, request.keyId, shrParameters);
294
+ }
295
+ else {
296
+ return response.access_token;
297
+ }
298
+ }
363
299
  /**
364
300
  * Generates authentication result
365
301
  * @param response
@@ -370,55 +306,56 @@ var NativeInteractionClient = /** @class */ (function (_super) {
370
306
  * @param reqTimestamp
371
307
  * @returns
372
308
  */
373
- NativeInteractionClient.prototype.generateAuthenticationResult = function (response, request, idTokenObj, accountEntity, authority, reqTimestamp) {
374
- return __awaiter(this, void 0, void 0, function () {
375
- var mats, responseScopes, accountProperties, uid, tid, responseAccessToken, tokenType, result;
376
- return __generator(this, function (_a) {
377
- switch (_a.label) {
378
- case 0:
379
- mats = this.addTelemetryFromNativeResponse(response);
380
- responseScopes = response.scope ? ScopeSet.fromString(response.scope) : ScopeSet.fromString(request.scope);
381
- accountProperties = response.account.properties || {};
382
- uid = accountProperties["UID"] || idTokenObj.claims.oid || idTokenObj.claims.sub || Constants.EMPTY_STRING;
383
- tid = accountProperties["TenantId"] || idTokenObj.claims.tid || Constants.EMPTY_STRING;
384
- return [4 /*yield*/, this.generatePopAccessToken(response, request)];
385
- case 1:
386
- responseAccessToken = _a.sent();
387
- tokenType = (request.tokenType === AuthenticationScheme.POP) ? AuthenticationScheme.POP : AuthenticationScheme.BEARER;
388
- result = {
389
- authority: authority,
390
- uniqueId: uid,
391
- tenantId: tid,
392
- scopes: responseScopes.asArray(),
393
- account: accountEntity.getAccountInfo(),
394
- idToken: response.id_token,
395
- idTokenClaims: idTokenObj.claims,
396
- accessToken: responseAccessToken,
397
- fromCache: mats ? this.isResponseFromCache(mats) : false,
398
- expiresOn: new Date(Number(reqTimestamp + response.expires_in) * 1000),
399
- tokenType: tokenType,
400
- correlationId: this.correlationId,
401
- state: response.state,
402
- fromNativeBroker: true
403
- };
404
- return [2 /*return*/, result];
405
- }
406
- });
407
- });
408
- };
309
+ async generateAuthenticationResult(response, request, idTokenObj, accountEntity, authority, reqTimestamp) {
310
+ // Add Native Broker fields to Telemetry
311
+ const mats = this.addTelemetryFromNativeResponse(response);
312
+ // If scopes not returned in server response, use request scopes
313
+ const responseScopes = response.scope
314
+ ? ScopeSet.fromString(response.scope)
315
+ : ScopeSet.fromString(request.scope);
316
+ const accountProperties = response.account.properties || {};
317
+ const uid = accountProperties["UID"] ||
318
+ idTokenObj.claims.oid ||
319
+ idTokenObj.claims.sub ||
320
+ Constants.EMPTY_STRING;
321
+ const tid = accountProperties["TenantId"] ||
322
+ idTokenObj.claims.tid ||
323
+ Constants.EMPTY_STRING;
324
+ // generate PoP token as needed
325
+ const responseAccessToken = await this.generatePopAccessToken(response, request);
326
+ const tokenType = request.tokenType === AuthenticationScheme.POP
327
+ ? AuthenticationScheme.POP
328
+ : AuthenticationScheme.BEARER;
329
+ const result = {
330
+ authority: authority,
331
+ uniqueId: uid,
332
+ tenantId: tid,
333
+ scopes: responseScopes.asArray(),
334
+ account: accountEntity.getAccountInfo(),
335
+ idToken: response.id_token,
336
+ idTokenClaims: idTokenObj.claims,
337
+ accessToken: responseAccessToken,
338
+ fromCache: mats ? this.isResponseFromCache(mats) : false,
339
+ expiresOn: new Date(Number(reqTimestamp + response.expires_in) * 1000),
340
+ tokenType: tokenType,
341
+ correlationId: this.correlationId,
342
+ state: response.state,
343
+ fromNativeBroker: true,
344
+ };
345
+ return result;
346
+ }
409
347
  /**
410
348
  * cache the account entity in browser storage
411
349
  * @param accountEntity
412
350
  */
413
- NativeInteractionClient.prototype.cacheAccount = function (accountEntity) {
414
- var _this = this;
351
+ cacheAccount(accountEntity) {
415
352
  // Store the account info and hence `nativeAccountId` in browser cache
416
353
  this.browserStorage.setAccount(accountEntity);
417
354
  // Remove any existing cached tokens for this account in browser storage
418
- this.browserStorage.removeAccountContext(accountEntity).catch(function (e) {
419
- _this.logger.error("Error occurred while removing account context from browser storage. " + e);
355
+ this.browserStorage.removeAccountContext(accountEntity).catch((e) => {
356
+ this.logger.error(`Error occurred while removing account context from browser storage. ${e}`);
420
357
  });
421
- };
358
+ }
422
359
  /**
423
360
  * Stores the access_token and id_token in inmemory storage
424
361
  * @param response
@@ -429,23 +366,23 @@ var NativeInteractionClient = /** @class */ (function (_super) {
429
366
  * @param tenantId
430
367
  * @param reqTimestamp
431
368
  */
432
- NativeInteractionClient.prototype.cacheNativeTokens = function (response, request, homeAccountIdentifier, idTokenObj, responseAccessToken, tenantId, reqTimestamp) {
369
+ cacheNativeTokens(response, request, homeAccountIdentifier, idTokenObj, responseAccessToken, tenantId, reqTimestamp) {
433
370
  // cache idToken in inmemory storage
434
- var idTokenEntity = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token || Constants.EMPTY_STRING, request.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING);
371
+ const idTokenEntity = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token || Constants.EMPTY_STRING, request.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING);
435
372
  this.nativeStorageManager.setIdTokenCredential(idTokenEntity);
436
373
  // cache accessToken in inmemory storage
437
- var expiresIn = (request.tokenType === AuthenticationScheme.POP)
374
+ const expiresIn = request.tokenType === AuthenticationScheme.POP
438
375
  ? Constants.SHR_NONCE_VALIDITY
439
376
  : (typeof response.expires_in === "string"
440
377
  ? parseInt(response.expires_in, 10)
441
378
  : response.expires_in) || 0;
442
- var tokenExpirationSeconds = reqTimestamp + expiresIn;
443
- var responseScopes = this.generateScopes(response, request);
444
- var accessTokenEntity = AccessTokenEntity.createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, this.browserCrypto);
379
+ const tokenExpirationSeconds = reqTimestamp + expiresIn;
380
+ const responseScopes = this.generateScopes(response, request);
381
+ const accessTokenEntity = AccessTokenEntity.createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, this.browserCrypto);
445
382
  this.nativeStorageManager.setAccessTokenCredential(accessTokenEntity);
446
- };
447
- NativeInteractionClient.prototype.addTelemetryFromNativeResponse = function (response) {
448
- var mats = this.getMATSFromResponse(response);
383
+ }
384
+ addTelemetryFromNativeResponse(response) {
385
+ const mats = this.getMATSFromResponse(response);
449
386
  if (!mats) {
450
387
  return null;
451
388
  }
@@ -464,15 +401,15 @@ var NativeInteractionClient = /** @class */ (function (_super) {
464
401
  matsSilentMessage: mats.silent_message,
465
402
  matsSilentStatus: mats.silent_status,
466
403
  matsHttpStatus: mats.http_status,
467
- matsHttpEventCount: mats.http_event_count
404
+ matsHttpEventCount: mats.http_event_count,
468
405
  }, this.correlationId);
469
406
  return mats;
470
- };
407
+ }
471
408
  /**
472
409
  * Validates native platform response before processing
473
410
  * @param response
474
411
  */
475
- NativeInteractionClient.prototype.validateNativeResponse = function (response) {
412
+ validateNativeResponse(response) {
476
413
  if (response.hasOwnProperty("access_token") &&
477
414
  response.hasOwnProperty("id_token") &&
478
415
  response.hasOwnProperty("client_info") &&
@@ -484,13 +421,13 @@ var NativeInteractionClient = /** @class */ (function (_super) {
484
421
  else {
485
422
  throw NativeAuthError.createUnexpectedError("Response missing expected properties.");
486
423
  }
487
- };
424
+ }
488
425
  /**
489
426
  * Gets MATS telemetry from native response
490
427
  * @param response
491
428
  * @returns
492
429
  */
493
- NativeInteractionClient.prototype.getMATSFromResponse = function (response) {
430
+ getMATSFromResponse(response) {
494
431
  if (response.properties.MATS) {
495
432
  try {
496
433
  return JSON.parse(response.properties.MATS);
@@ -500,86 +437,92 @@ var NativeInteractionClient = /** @class */ (function (_super) {
500
437
  }
501
438
  }
502
439
  return null;
503
- };
440
+ }
504
441
  /**
505
442
  * Returns whether or not response came from native cache
506
443
  * @param response
507
444
  * @returns
508
445
  */
509
- NativeInteractionClient.prototype.isResponseFromCache = function (mats) {
446
+ isResponseFromCache(mats) {
510
447
  if (typeof mats.is_cached === "undefined") {
511
448
  this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false.");
512
449
  return false;
513
450
  }
514
451
  return !!mats.is_cached;
515
- };
452
+ }
516
453
  /**
517
454
  * Translates developer provided request object into NativeRequest object
518
455
  * @param request
519
456
  */
520
- NativeInteractionClient.prototype.initializeNativeRequest = function (request) {
521
- return __awaiter(this, void 0, void 0, function () {
522
- var authority, canonicalAuthority, scopes, remainingProperties, scopeSet, getPrompt, validatedRequest, shrParameters, popTokenGenerator, reqCnfData;
523
- var _this = this;
524
- return __generator(this, function (_a) {
525
- switch (_a.label) {
526
- case 0:
527
- this.logger.trace("NativeInteractionClient - initializeNativeRequest called");
528
- authority = request.authority || this.config.auth.authority;
529
- canonicalAuthority = new UrlString(authority);
530
- canonicalAuthority.validateAsUri();
531
- scopes = request.scopes, remainingProperties = __rest(request, ["scopes"]);
532
- scopeSet = new ScopeSet(scopes || []);
533
- scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
534
- getPrompt = function () {
535
- // If request is silent, prompt is always none
536
- switch (_this.apiId) {
537
- case ApiId.ssoSilent:
538
- case ApiId.acquireTokenSilent_silentFlow:
539
- _this.logger.trace("initializeNativeRequest: silent request sets prompt to none");
540
- return PromptValue.NONE;
541
- }
542
- // Prompt not provided, request may proceed and native broker decides if it needs to prompt
543
- if (!request.prompt) {
544
- _this.logger.trace("initializeNativeRequest: prompt was not provided");
545
- return undefined;
546
- }
547
- // If request is interactive, check if prompt provided is allowed to go directly to native broker
548
- switch (request.prompt) {
549
- case PromptValue.NONE:
550
- case PromptValue.CONSENT:
551
- case PromptValue.LOGIN:
552
- _this.logger.trace("initializeNativeRequest: prompt is compatible with native flow");
553
- return request.prompt;
554
- default:
555
- _this.logger.trace("initializeNativeRequest: prompt = " + request.prompt + " is not compatible with native flow");
556
- throw BrowserAuthError.createNativePromptParameterNotSupportedError();
557
- }
558
- };
559
- validatedRequest = __assign(__assign({}, remainingProperties), { accountId: this.accountId, clientId: this.config.auth.clientId, authority: canonicalAuthority.urlString, scope: scopeSet.printScopes(), redirectUri: this.getRedirectUri(request.redirectUri), prompt: getPrompt(), correlationId: this.correlationId, tokenType: request.authenticationScheme, windowTitleSubstring: document.title, extraParameters: __assign(__assign(__assign({}, request.extraQueryParameters), request.tokenQueryParameters), { telemetry: NativeConstants.MATS_TELEMETRY }), extendedExpiryToken: false // Make this configurable?
560
- });
561
- if (!(request.authenticationScheme === AuthenticationScheme.POP)) return [3 /*break*/, 2];
562
- shrParameters = {
563
- resourceRequestUri: request.resourceRequestUri,
564
- resourceRequestMethod: request.resourceRequestMethod,
565
- shrClaims: request.shrClaims,
566
- shrNonce: request.shrNonce
567
- };
568
- popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
569
- return [4 /*yield*/, popTokenGenerator.generateCnf(shrParameters)];
570
- case 1:
571
- reqCnfData = _a.sent();
572
- // to reduce the URL length, it is recommended to send the hash of the req_cnf instead of the whole string
573
- validatedRequest.reqCnf = reqCnfData.reqCnfHash;
574
- validatedRequest.keyId = reqCnfData.kid;
575
- _a.label = 2;
576
- case 2: return [2 /*return*/, validatedRequest];
577
- }
578
- });
579
- });
580
- };
581
- return NativeInteractionClient;
582
- }(BaseInteractionClient));
457
+ async initializeNativeRequest(request) {
458
+ this.logger.trace("NativeInteractionClient - initializeNativeRequest called");
459
+ const authority = request.authority || this.config.auth.authority;
460
+ const canonicalAuthority = new UrlString(authority);
461
+ canonicalAuthority.validateAsUri();
462
+ // scopes are expected to be received by the native broker as "scope" and will be added to the request below. Other properties that should be dropped from the request to the native broker can be included in the object destructuring here.
463
+ const { scopes, ...remainingProperties } = request;
464
+ const scopeSet = new ScopeSet(scopes || []);
465
+ scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
466
+ const getPrompt = () => {
467
+ // If request is silent, prompt is always none
468
+ switch (this.apiId) {
469
+ case ApiId.ssoSilent:
470
+ case ApiId.acquireTokenSilent_silentFlow:
471
+ this.logger.trace("initializeNativeRequest: silent request sets prompt to none");
472
+ return PromptValue.NONE;
473
+ }
474
+ // Prompt not provided, request may proceed and native broker decides if it needs to prompt
475
+ if (!request.prompt) {
476
+ this.logger.trace("initializeNativeRequest: prompt was not provided");
477
+ return undefined;
478
+ }
479
+ // If request is interactive, check if prompt provided is allowed to go directly to native broker
480
+ switch (request.prompt) {
481
+ case PromptValue.NONE:
482
+ case PromptValue.CONSENT:
483
+ case PromptValue.LOGIN:
484
+ this.logger.trace("initializeNativeRequest: prompt is compatible with native flow");
485
+ return request.prompt;
486
+ default:
487
+ this.logger.trace(`initializeNativeRequest: prompt = ${request.prompt} is not compatible with native flow`);
488
+ throw BrowserAuthError.createNativePromptParameterNotSupportedError();
489
+ }
490
+ };
491
+ const validatedRequest = {
492
+ ...remainingProperties,
493
+ accountId: this.accountId,
494
+ clientId: this.config.auth.clientId,
495
+ authority: canonicalAuthority.urlString,
496
+ scope: scopeSet.printScopes(),
497
+ redirectUri: this.getRedirectUri(request.redirectUri),
498
+ prompt: getPrompt(),
499
+ correlationId: this.correlationId,
500
+ tokenType: request.authenticationScheme,
501
+ windowTitleSubstring: document.title,
502
+ extraParameters: {
503
+ ...request.extraQueryParameters,
504
+ ...request.tokenQueryParameters,
505
+ telemetry: NativeConstants.MATS_TELEMETRY,
506
+ },
507
+ extendedExpiryToken: false, // Make this configurable?
508
+ };
509
+ if (request.authenticationScheme === AuthenticationScheme.POP) {
510
+ // add POP request type
511
+ const shrParameters = {
512
+ resourceRequestUri: request.resourceRequestUri,
513
+ resourceRequestMethod: request.resourceRequestMethod,
514
+ shrClaims: request.shrClaims,
515
+ shrNonce: request.shrNonce,
516
+ };
517
+ const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
518
+ const reqCnfData = await popTokenGenerator.generateCnf(shrParameters);
519
+ // to reduce the URL length, it is recommended to send the hash of the req_cnf instead of the whole string
520
+ validatedRequest.reqCnf = reqCnfData.reqCnfHash;
521
+ validatedRequest.keyId = reqCnfData.kid;
522
+ }
523
+ return validatedRequest;
524
+ }
525
+ }
583
526
 
584
527
  export { NativeInteractionClient };
585
528
  //# sourceMappingURL=NativeInteractionClient.js.map