@azure/msal-browser 3.23.0 → 3.25.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 (520) hide show
  1. package/README.md +1 -1
  2. package/dist/app/IPublicClientApplication.d.ts +16 -16
  3. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  4. package/dist/app/IPublicClientApplication.mjs +1 -1
  5. package/dist/app/PublicClientApplication.d.ts +18 -18
  6. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  7. package/dist/app/PublicClientApplication.mjs +1 -1
  8. package/dist/app/PublicClientApplication.mjs.map +1 -1
  9. package/dist/app/PublicClientNext.d.ts +16 -16
  10. package/dist/app/PublicClientNext.d.ts.map +1 -1
  11. package/dist/app/PublicClientNext.mjs +1 -1
  12. package/dist/app/PublicClientNext.mjs.map +1 -1
  13. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +3 -3
  14. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
  15. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +2 -2
  16. package/dist/broker/nativeBroker/NativeRequest.d.ts +2 -2
  17. package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
  18. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  19. package/dist/cache/AccountManager.d.ts +2 -2
  20. package/dist/cache/AccountManager.d.ts.map +1 -1
  21. package/dist/cache/AccountManager.mjs +1 -1
  22. package/dist/cache/AsyncMemoryStorage.d.ts +2 -2
  23. package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -1
  24. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  25. package/dist/cache/BrowserCacheManager.d.ts +11 -11
  26. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  27. package/dist/cache/BrowserCacheManager.mjs +2 -2
  28. package/dist/cache/BrowserStorage.d.ts +1 -1
  29. package/dist/cache/BrowserStorage.d.ts.map +1 -1
  30. package/dist/cache/BrowserStorage.mjs +1 -1
  31. package/dist/cache/DatabaseStorage.d.ts +1 -1
  32. package/dist/cache/DatabaseStorage.d.ts.map +1 -1
  33. package/dist/cache/DatabaseStorage.mjs +1 -1
  34. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  35. package/dist/cache/ITokenCache.d.ts +4 -4
  36. package/dist/cache/ITokenCache.d.ts.map +1 -1
  37. package/dist/cache/MemoryStorage.d.ts +1 -1
  38. package/dist/cache/MemoryStorage.d.ts.map +1 -1
  39. package/dist/cache/MemoryStorage.mjs +1 -1
  40. package/dist/cache/TokenCache.d.ts +6 -6
  41. package/dist/cache/TokenCache.d.ts.map +1 -1
  42. package/dist/cache/TokenCache.mjs +2 -2
  43. package/dist/config/Configuration.d.ts +7 -3
  44. package/dist/config/Configuration.d.ts.map +1 -1
  45. package/dist/config/Configuration.mjs +3 -2
  46. package/dist/config/Configuration.mjs.map +1 -1
  47. package/dist/controllers/ControllerFactory.d.ts +3 -3
  48. package/dist/controllers/ControllerFactory.d.ts.map +1 -1
  49. package/dist/controllers/ControllerFactory.mjs +1 -1
  50. package/dist/controllers/IController.d.ts +17 -17
  51. package/dist/controllers/IController.d.ts.map +1 -1
  52. package/dist/controllers/NestedAppAuthController.d.ts +21 -21
  53. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  54. package/dist/controllers/NestedAppAuthController.mjs +2 -2
  55. package/dist/controllers/StandardController.d.ts +28 -28
  56. package/dist/controllers/StandardController.d.ts.map +1 -1
  57. package/dist/controllers/StandardController.mjs +2 -2
  58. package/dist/controllers/UnknownOperatingContextController.d.ts +19 -19
  59. package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  60. package/dist/controllers/UnknownOperatingContextController.mjs +2 -2
  61. package/dist/crypto/BrowserCrypto.d.ts +1 -1
  62. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  63. package/dist/crypto/BrowserCrypto.mjs +2 -2
  64. package/dist/crypto/CryptoOps.d.ts +1 -1
  65. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  66. package/dist/crypto/CryptoOps.mjs +2 -2
  67. package/dist/crypto/CryptoOps.mjs.map +1 -1
  68. package/dist/crypto/PkceGenerator.d.ts +1 -1
  69. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  70. package/dist/crypto/PkceGenerator.mjs +2 -2
  71. package/dist/crypto/SignedHttpRequest.d.ts +1 -1
  72. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  73. package/dist/crypto/SignedHttpRequest.mjs +2 -2
  74. package/dist/encode/Base64Decode.mjs +1 -1
  75. package/dist/encode/Base64Encode.mjs +1 -1
  76. package/dist/error/BrowserAuthError.d.ts +2 -2
  77. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  78. package/dist/error/BrowserAuthError.mjs +2 -2
  79. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  80. package/dist/error/BrowserConfigurationAuthError.d.ts +2 -2
  81. package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
  82. package/dist/error/BrowserConfigurationAuthError.mjs +2 -2
  83. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  84. package/dist/error/NativeAuthError.d.ts +2 -2
  85. package/dist/error/NativeAuthError.d.ts.map +1 -1
  86. package/dist/error/NativeAuthError.mjs +2 -2
  87. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  88. package/dist/error/NestedAppAuthError.d.ts +1 -1
  89. package/dist/error/NestedAppAuthError.d.ts.map +1 -1
  90. package/dist/error/NestedAppAuthError.mjs +2 -2
  91. package/dist/event/EventHandler.d.ts +4 -4
  92. package/dist/event/EventHandler.d.ts.map +1 -1
  93. package/dist/event/EventHandler.mjs +2 -2
  94. package/dist/event/EventMessage.d.ts +9 -4
  95. package/dist/event/EventMessage.d.ts.map +1 -1
  96. package/dist/event/EventMessage.mjs +1 -1
  97. package/dist/event/EventMessage.mjs.map +1 -1
  98. package/dist/event/EventType.mjs +1 -1
  99. package/dist/index.d.ts +35 -35
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.mjs +2 -2
  102. package/dist/interaction_client/BaseInteractionClient.d.ts +24 -16
  103. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  104. package/dist/interaction_client/BaseInteractionClient.mjs +23 -10
  105. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  106. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +1 -1
  107. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -1
  108. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +2 -2
  109. package/dist/interaction_client/NativeInteractionClient.d.ts +16 -16
  110. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  111. package/dist/interaction_client/NativeInteractionClient.mjs +12 -6
  112. package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
  113. package/dist/interaction_client/PopupClient.d.ts +17 -16
  114. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  115. package/dist/interaction_client/PopupClient.mjs +59 -56
  116. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  117. package/dist/interaction_client/RedirectClient.d.ts +10 -10
  118. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  119. package/dist/interaction_client/RedirectClient.mjs +35 -7
  120. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  121. package/dist/interaction_client/SilentAuthCodeClient.d.ts +10 -10
  122. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  123. package/dist/interaction_client/SilentAuthCodeClient.mjs +9 -3
  124. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  125. package/dist/interaction_client/SilentCacheClient.d.ts +4 -4
  126. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  127. package/dist/interaction_client/SilentCacheClient.mjs +8 -3
  128. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  129. package/dist/interaction_client/SilentIframeClient.d.ts +11 -11
  130. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  131. package/dist/interaction_client/SilentIframeClient.mjs +9 -3
  132. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  133. package/dist/interaction_client/SilentRefreshClient.d.ts +17 -6
  134. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  135. package/dist/interaction_client/SilentRefreshClient.mjs +23 -7
  136. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  137. package/dist/interaction_client/StandardInteractionClient.d.ts +36 -15
  138. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  139. package/dist/interaction_client/StandardInteractionClient.mjs +26 -11
  140. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  141. package/dist/interaction_handler/InteractionHandler.d.ts +4 -4
  142. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  143. package/dist/interaction_handler/InteractionHandler.mjs +2 -2
  144. package/dist/interaction_handler/RedirectHandler.d.ts +4 -4
  145. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  146. package/dist/interaction_handler/RedirectHandler.mjs +2 -2
  147. package/dist/interaction_handler/SilentHandler.d.ts +1 -1
  148. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  149. package/dist/interaction_handler/SilentHandler.mjs +2 -2
  150. package/dist/naa/AuthResult.d.ts +2 -2
  151. package/dist/naa/AuthResult.d.ts.map +1 -1
  152. package/dist/naa/BridgeError.d.ts +1 -1
  153. package/dist/naa/BridgeError.d.ts.map +1 -1
  154. package/dist/naa/BridgeError.mjs +1 -1
  155. package/dist/naa/BridgeProxy.d.ts +9 -8
  156. package/dist/naa/BridgeProxy.d.ts.map +1 -1
  157. package/dist/naa/BridgeProxy.mjs +16 -14
  158. package/dist/naa/BridgeProxy.mjs.map +1 -1
  159. package/dist/naa/BridgeRequest.d.ts +1 -1
  160. package/dist/naa/BridgeRequest.d.ts.map +1 -1
  161. package/dist/naa/BridgeRequestEnvelope.d.ts +1 -1
  162. package/dist/naa/BridgeRequestEnvelope.d.ts.map +1 -1
  163. package/dist/naa/BridgeResponseEnvelope.d.ts +4 -4
  164. package/dist/naa/BridgeResponseEnvelope.d.ts.map +1 -1
  165. package/dist/naa/BridgeStatusCode.mjs +1 -1
  166. package/dist/naa/IBridgeProxy.d.ts +4 -4
  167. package/dist/naa/IBridgeProxy.d.ts.map +1 -1
  168. package/dist/naa/InitContext.d.ts +2 -2
  169. package/dist/naa/InitContext.d.ts.map +1 -1
  170. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +9 -9
  171. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
  172. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +2 -2
  173. package/dist/navigation/INavigationClient.d.ts +1 -1
  174. package/dist/navigation/INavigationClient.d.ts.map +1 -1
  175. package/dist/navigation/NavigationClient.d.ts +2 -2
  176. package/dist/navigation/NavigationClient.d.ts.map +1 -1
  177. package/dist/navigation/NavigationClient.mjs +1 -1
  178. package/dist/navigation/NavigationOptions.d.ts +1 -1
  179. package/dist/navigation/NavigationOptions.d.ts.map +1 -1
  180. package/dist/network/FetchClient.d.ts +1 -1
  181. package/dist/network/FetchClient.d.ts.map +1 -1
  182. package/dist/network/FetchClient.mjs +2 -2
  183. package/dist/operatingcontext/BaseOperatingContext.d.ts +2 -2
  184. package/dist/operatingcontext/BaseOperatingContext.d.ts.map +1 -1
  185. package/dist/operatingcontext/BaseOperatingContext.mjs +2 -2
  186. package/dist/operatingcontext/NestedAppOperatingContext.d.ts +8 -3
  187. package/dist/operatingcontext/NestedAppOperatingContext.d.ts.map +1 -1
  188. package/dist/operatingcontext/NestedAppOperatingContext.mjs +4 -5
  189. package/dist/operatingcontext/NestedAppOperatingContext.mjs.map +1 -1
  190. package/dist/operatingcontext/StandardOperatingContext.d.ts +1 -1
  191. package/dist/operatingcontext/StandardOperatingContext.d.ts.map +1 -1
  192. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  193. package/dist/operatingcontext/UnknownOperatingContext.d.ts +1 -1
  194. package/dist/operatingcontext/UnknownOperatingContext.d.ts.map +1 -1
  195. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  196. package/dist/packageMetadata.d.ts +1 -1
  197. package/dist/packageMetadata.mjs +2 -2
  198. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  199. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  200. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  201. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  202. package/dist/request/ClearCacheRequest.d.ts +1 -1
  203. package/dist/request/ClearCacheRequest.d.ts.map +1 -1
  204. package/dist/request/EndSessionPopupRequest.d.ts +4 -2
  205. package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
  206. package/dist/request/EndSessionRequest.d.ts +1 -1
  207. package/dist/request/EndSessionRequest.d.ts.map +1 -1
  208. package/dist/request/PopupRequest.d.ts +4 -2
  209. package/dist/request/PopupRequest.d.ts.map +1 -1
  210. package/dist/request/RedirectRequest.d.ts +1 -1
  211. package/dist/request/RedirectRequest.d.ts.map +1 -1
  212. package/dist/request/RequestHelpers.d.ts +3 -3
  213. package/dist/request/RequestHelpers.d.ts.map +1 -1
  214. package/dist/request/RequestHelpers.mjs +2 -2
  215. package/dist/request/SilentRequest.d.ts +2 -2
  216. package/dist/request/SilentRequest.d.ts.map +1 -1
  217. package/dist/request/SsoSilentRequest.d.ts +1 -1
  218. package/dist/request/SsoSilentRequest.d.ts.map +1 -1
  219. package/dist/response/AuthenticationResult.d.ts +1 -1
  220. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  221. package/dist/response/ResponseHandler.d.ts +2 -2
  222. package/dist/response/ResponseHandler.d.ts.map +1 -1
  223. package/dist/response/ResponseHandler.mjs +2 -2
  224. package/dist/telemetry/BrowserPerformanceClient.d.ts +2 -2
  225. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  226. package/dist/telemetry/BrowserPerformanceClient.mjs +2 -2
  227. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  228. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +1 -1
  229. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -1
  230. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  231. package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
  232. package/dist/utils/BrowserConstants.d.ts +2 -2
  233. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  234. package/dist/utils/BrowserConstants.mjs +2 -2
  235. package/dist/utils/BrowserProtocolUtils.d.ts +2 -2
  236. package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
  237. package/dist/utils/BrowserProtocolUtils.mjs +2 -2
  238. package/dist/utils/BrowserUtils.d.ts +2 -2
  239. package/dist/utils/BrowserUtils.d.ts.map +1 -1
  240. package/dist/utils/BrowserUtils.mjs +3 -3
  241. package/lib/msal-browser.cjs +5060 -4953
  242. package/lib/msal-browser.cjs.map +1 -1
  243. package/lib/msal-browser.js +5060 -4953
  244. package/lib/msal-browser.js.map +1 -1
  245. package/lib/msal-browser.min.js +65 -67
  246. package/lib/package.json +1 -0
  247. package/lib/types/app/IPublicClientApplication.d.ts +54 -0
  248. package/lib/types/app/IPublicClientApplication.d.ts.map +1 -0
  249. package/lib/types/app/PublicClientApplication.d.ts +294 -0
  250. package/lib/types/app/PublicClientApplication.d.ts.map +1 -0
  251. package/lib/types/app/PublicClientNext.d.ts +277 -0
  252. package/lib/types/app/PublicClientNext.d.ts.map +1 -0
  253. package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts +63 -0
  254. package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -0
  255. package/lib/types/broker/nativeBroker/NativeRequest.d.ts +46 -0
  256. package/lib/types/broker/nativeBroker/NativeRequest.d.ts.map +1 -0
  257. package/lib/types/broker/nativeBroker/NativeResponse.d.ts +49 -0
  258. package/lib/types/broker/nativeBroker/NativeResponse.d.ts.map +1 -0
  259. package/lib/types/broker/nativeBroker/NativeStatusCodes.d.ts +8 -0
  260. package/lib/types/broker/nativeBroker/NativeStatusCodes.d.ts.map +1 -0
  261. package/lib/types/cache/AccountManager.d.ts +49 -0
  262. package/lib/types/cache/AccountManager.d.ts.map +1 -0
  263. package/lib/types/cache/AsyncMemoryStorage.d.ts +51 -0
  264. package/lib/types/cache/AsyncMemoryStorage.d.ts.map +1 -0
  265. package/lib/types/cache/BrowserCacheManager.d.ts +386 -0
  266. package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -0
  267. package/lib/types/cache/BrowserStorage.d.ts +12 -0
  268. package/lib/types/cache/BrowserStorage.d.ts.map +1 -0
  269. package/lib/types/cache/DatabaseStorage.d.ts +57 -0
  270. package/lib/types/cache/DatabaseStorage.d.ts.map +1 -0
  271. package/lib/types/cache/IAsyncStorage.d.ts +28 -0
  272. package/lib/types/cache/IAsyncStorage.d.ts.map +1 -0
  273. package/lib/types/cache/ITokenCache.d.ts +12 -0
  274. package/lib/types/cache/ITokenCache.d.ts.map +1 -0
  275. package/lib/types/cache/IWindowStorage.d.ts +28 -0
  276. package/lib/types/cache/IWindowStorage.d.ts.map +1 -0
  277. package/lib/types/cache/MemoryStorage.d.ts +12 -0
  278. package/lib/types/cache/MemoryStorage.d.ts.map +1 -0
  279. package/lib/types/cache/TokenCache.d.ts +78 -0
  280. package/lib/types/cache/TokenCache.d.ts.map +1 -0
  281. package/lib/types/config/Configuration.d.ts +218 -0
  282. package/lib/types/config/Configuration.d.ts.map +1 -0
  283. package/lib/types/controllers/ControllerFactory.d.ts +6 -0
  284. package/lib/types/controllers/ControllerFactory.d.ts.map +1 -0
  285. package/lib/types/controllers/IController.d.ts +61 -0
  286. package/lib/types/controllers/IController.d.ts.map +1 -0
  287. package/lib/types/controllers/NestedAppAuthController.d.ts +203 -0
  288. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -0
  289. package/lib/types/controllers/StandardController.d.ts +406 -0
  290. package/lib/types/controllers/StandardController.d.ts.map +1 -0
  291. package/lib/types/controllers/UnknownOperatingContextController.d.ts +87 -0
  292. package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -0
  293. package/lib/types/crypto/BrowserCrypto.d.ts +53 -0
  294. package/lib/types/crypto/BrowserCrypto.d.ts.map +1 -0
  295. package/lib/types/crypto/CryptoOps.d.ts +75 -0
  296. package/lib/types/crypto/CryptoOps.d.ts.map +1 -0
  297. package/lib/types/crypto/PkceGenerator.d.ts +9 -0
  298. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
  299. package/lib/types/crypto/SignedHttpRequest.d.ts +31 -0
  300. package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
  301. package/lib/types/encode/Base64Decode.d.ts +10 -0
  302. package/lib/types/encode/Base64Decode.d.ts.map +1 -0
  303. package/lib/types/encode/Base64Encode.d.ts +20 -0
  304. package/lib/types/encode/Base64Encode.d.ts.map +1 -0
  305. package/lib/types/error/BrowserAuthError.d.ts +256 -0
  306. package/lib/types/error/BrowserAuthError.d.ts.map +1 -0
  307. package/lib/types/error/BrowserAuthErrorCodes.d.ts +47 -0
  308. package/lib/types/error/BrowserAuthErrorCodes.d.ts.map +1 -0
  309. package/lib/types/error/BrowserConfigurationAuthError.d.ts +34 -0
  310. package/lib/types/error/BrowserConfigurationAuthError.d.ts.map +1 -0
  311. package/lib/types/error/BrowserConfigurationAuthErrorCodes.d.ts +4 -0
  312. package/lib/types/error/BrowserConfigurationAuthErrorCodes.d.ts.map +1 -0
  313. package/lib/types/error/NativeAuthError.d.ts +30 -0
  314. package/lib/types/error/NativeAuthError.d.ts.map +1 -0
  315. package/lib/types/error/NativeAuthErrorCodes.d.ts +3 -0
  316. package/lib/types/error/NativeAuthErrorCodes.d.ts.map +1 -0
  317. package/lib/types/error/NestedAppAuthError.d.ts +15 -0
  318. package/lib/types/error/NestedAppAuthError.d.ts.map +1 -0
  319. package/lib/types/event/EventHandler.d.ts +42 -0
  320. package/lib/types/event/EventHandler.d.ts.map +1 -0
  321. package/lib/types/event/EventMessage.d.ts +31 -0
  322. package/lib/types/event/EventMessage.d.ts.map +1 -0
  323. package/lib/types/event/EventType.d.ts +30 -0
  324. package/lib/types/event/EventType.d.ts.map +1 -0
  325. package/lib/types/index.d.ts +41 -0
  326. package/lib/types/index.d.ts.map +1 -0
  327. package/lib/types/interaction_client/BaseInteractionClient.d.ts +59 -0
  328. package/lib/types/interaction_client/BaseInteractionClient.d.ts.map +1 -0
  329. package/lib/types/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +5 -0
  330. package/lib/types/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -0
  331. package/lib/types/interaction_client/NativeInteractionClient.d.ts +152 -0
  332. package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -0
  333. package/lib/types/interaction_client/PopupClient.d.ts +107 -0
  334. package/lib/types/interaction_client/PopupClient.d.ts.map +1 -0
  335. package/lib/types/interaction_client/RedirectClient.d.ts +51 -0
  336. package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -0
  337. package/lib/types/interaction_client/SilentAuthCodeClient.d.ts +24 -0
  338. package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -0
  339. package/lib/types/interaction_client/SilentCacheClient.d.ts +17 -0
  340. package/lib/types/interaction_client/SilentCacheClient.d.ts.map +1 -0
  341. package/lib/types/interaction_client/SilentIframeClient.d.ts +33 -0
  342. package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -0
  343. package/lib/types/interaction_client/SilentRefreshClient.d.ts +32 -0
  344. package/lib/types/interaction_client/SilentRefreshClient.d.ts.map +1 -0
  345. package/lib/types/interaction_client/StandardInteractionClient.d.ts +70 -0
  346. package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -0
  347. package/lib/types/interaction_handler/InteractionHandler.d.ts +34 -0
  348. package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -0
  349. package/lib/types/interaction_handler/RedirectHandler.d.ts +33 -0
  350. package/lib/types/interaction_handler/RedirectHandler.d.ts.map +1 -0
  351. package/lib/types/interaction_handler/SilentHandler.d.ts +14 -0
  352. package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -0
  353. package/lib/types/naa/AccountInfo.d.ts +12 -0
  354. package/lib/types/naa/AccountInfo.d.ts.map +1 -0
  355. package/lib/types/naa/AuthBridge.d.ts +9 -0
  356. package/lib/types/naa/AuthBridge.d.ts.map +1 -0
  357. package/lib/types/naa/AuthResult.d.ts +7 -0
  358. package/lib/types/naa/AuthResult.d.ts.map +1 -0
  359. package/lib/types/naa/BridgeAccountContext.d.ts +13 -0
  360. package/lib/types/naa/BridgeAccountContext.d.ts.map +1 -0
  361. package/lib/types/naa/BridgeCapabilities.d.ts +4 -0
  362. package/lib/types/naa/BridgeCapabilities.d.ts.map +1 -0
  363. package/lib/types/naa/BridgeError.d.ts +10 -0
  364. package/lib/types/naa/BridgeError.d.ts.map +1 -0
  365. package/lib/types/naa/BridgeProxy.d.ts +69 -0
  366. package/lib/types/naa/BridgeProxy.d.ts.map +1 -0
  367. package/lib/types/naa/BridgeRequest.d.ts +8 -0
  368. package/lib/types/naa/BridgeRequest.d.ts.map +1 -0
  369. package/lib/types/naa/BridgeRequestEnvelope.d.ts +13 -0
  370. package/lib/types/naa/BridgeRequestEnvelope.d.ts.map +1 -0
  371. package/lib/types/naa/BridgeResponseEnvelope.d.ts +14 -0
  372. package/lib/types/naa/BridgeResponseEnvelope.d.ts.map +1 -0
  373. package/lib/types/naa/BridgeStatusCode.d.ts +12 -0
  374. package/lib/types/naa/BridgeStatusCode.d.ts.map +1 -0
  375. package/lib/types/naa/IBridgeProxy.d.ts +11 -0
  376. package/lib/types/naa/IBridgeProxy.d.ts.map +1 -0
  377. package/lib/types/naa/InitContext.d.ts +9 -0
  378. package/lib/types/naa/InitContext.d.ts.map +1 -0
  379. package/lib/types/naa/TokenRequest.d.ts +19 -0
  380. package/lib/types/naa/TokenRequest.d.ts.map +1 -0
  381. package/lib/types/naa/TokenResponse.d.ts +14 -0
  382. package/lib/types/naa/TokenResponse.d.ts.map +1 -0
  383. package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts +36 -0
  384. package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -0
  385. package/lib/types/navigation/INavigationClient.d.ts +17 -0
  386. package/lib/types/navigation/INavigationClient.d.ts.map +1 -0
  387. package/lib/types/navigation/NavigationClient.d.ts +23 -0
  388. package/lib/types/navigation/NavigationClient.d.ts.map +1 -0
  389. package/lib/types/navigation/NavigationOptions.d.ts +13 -0
  390. package/lib/types/navigation/NavigationOptions.d.ts.map +1 -0
  391. package/lib/types/network/FetchClient.d.ts +27 -0
  392. package/lib/types/network/FetchClient.d.ts.map +1 -0
  393. package/lib/types/operatingcontext/BaseOperatingContext.d.ts +42 -0
  394. package/lib/types/operatingcontext/BaseOperatingContext.d.ts.map +1 -0
  395. package/lib/types/operatingcontext/NestedAppOperatingContext.d.ts +40 -0
  396. package/lib/types/operatingcontext/NestedAppOperatingContext.d.ts.map +1 -0
  397. package/lib/types/operatingcontext/StandardOperatingContext.d.ts +26 -0
  398. package/lib/types/operatingcontext/StandardOperatingContext.d.ts.map +1 -0
  399. package/lib/types/operatingcontext/UnknownOperatingContext.d.ts +26 -0
  400. package/lib/types/operatingcontext/UnknownOperatingContext.d.ts.map +1 -0
  401. package/lib/types/packageMetadata.d.ts +3 -0
  402. package/lib/types/packageMetadata.d.ts.map +1 -0
  403. package/lib/types/request/AuthorizationCodeRequest.d.ts +9 -0
  404. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
  405. package/lib/types/request/AuthorizationUrlRequest.d.ts +9 -0
  406. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
  407. package/lib/types/request/ClearCacheRequest.d.ts +11 -0
  408. package/lib/types/request/ClearCacheRequest.d.ts.map +1 -0
  409. package/lib/types/request/EndSessionPopupRequest.d.ts +21 -0
  410. package/lib/types/request/EndSessionPopupRequest.d.ts.map +1 -0
  411. package/lib/types/request/EndSessionRequest.d.ts +16 -0
  412. package/lib/types/request/EndSessionRequest.d.ts.map +1 -0
  413. package/lib/types/request/InitializeApplicationRequest.d.ts +9 -0
  414. package/lib/types/request/InitializeApplicationRequest.d.ts.map +1 -0
  415. package/lib/types/request/PopupRequest.d.ts +37 -0
  416. package/lib/types/request/PopupRequest.d.ts.map +1 -0
  417. package/lib/types/request/PopupWindowAttributes.d.ts +16 -0
  418. package/lib/types/request/PopupWindowAttributes.d.ts.map +1 -0
  419. package/lib/types/request/RedirectRequest.d.ts +41 -0
  420. package/lib/types/request/RedirectRequest.d.ts.map +1 -0
  421. package/lib/types/request/RequestHelpers.d.ts +14 -0
  422. package/lib/types/request/RequestHelpers.d.ts.map +1 -0
  423. package/lib/types/request/SilentRequest.d.ts +34 -0
  424. package/lib/types/request/SilentRequest.d.ts.map +1 -0
  425. package/lib/types/request/SsoSilentRequest.d.ts +30 -0
  426. package/lib/types/request/SsoSilentRequest.d.ts.map +1 -0
  427. package/lib/types/response/AuthenticationResult.d.ts +5 -0
  428. package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
  429. package/lib/types/response/ResponseHandler.d.ts +8 -0
  430. package/lib/types/response/ResponseHandler.d.ts.map +1 -0
  431. package/lib/types/telemetry/BrowserPerformanceClient.d.ts +35 -0
  432. package/lib/types/telemetry/BrowserPerformanceClient.d.ts.map +1 -0
  433. package/lib/types/telemetry/BrowserPerformanceMeasurement.d.ts +22 -0
  434. package/lib/types/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -0
  435. package/lib/types/utils/BrowserConstants.d.ts +181 -0
  436. package/lib/types/utils/BrowserConstants.d.ts.map +1 -0
  437. package/lib/types/utils/BrowserProtocolUtils.d.ts +12 -0
  438. package/lib/types/utils/BrowserProtocolUtils.d.ts.map +1 -0
  439. package/lib/types/utils/BrowserUtils.d.ts +76 -0
  440. package/lib/types/utils/BrowserUtils.d.ts.map +1 -0
  441. package/package.json +15 -16
  442. package/src/app/IPublicClientApplication.ts +17 -17
  443. package/src/app/PublicClientApplication.ts +26 -23
  444. package/src/app/PublicClientNext.ts +22 -19
  445. package/src/broker/nativeBroker/NativeMessageHandler.ts +7 -7
  446. package/src/broker/nativeBroker/NativeRequest.ts +2 -2
  447. package/src/cache/AccountManager.ts +2 -2
  448. package/src/cache/AsyncMemoryStorage.ts +5 -5
  449. package/src/cache/BrowserCacheManager.ts +16 -16
  450. package/src/cache/BrowserStorage.ts +3 -3
  451. package/src/cache/DatabaseStorage.ts +7 -3
  452. package/src/cache/ITokenCache.ts +4 -4
  453. package/src/cache/MemoryStorage.ts +1 -1
  454. package/src/cache/TokenCache.ts +9 -9
  455. package/src/config/Configuration.ts +10 -5
  456. package/src/controllers/ControllerFactory.ts +7 -7
  457. package/src/controllers/IController.ts +17 -17
  458. package/src/controllers/NestedAppAuthController.ts +25 -25
  459. package/src/controllers/StandardController.ts +39 -39
  460. package/src/controllers/UnknownOperatingContextController.ts +21 -21
  461. package/src/crypto/BrowserCrypto.ts +4 -4
  462. package/src/crypto/CryptoOps.ts +10 -6
  463. package/src/crypto/PkceGenerator.ts +4 -4
  464. package/src/crypto/SignedHttpRequest.ts +3 -3
  465. package/src/encode/Base64Decode.ts +1 -1
  466. package/src/error/BrowserAuthError.ts +2 -2
  467. package/src/error/BrowserConfigurationAuthError.ts +2 -2
  468. package/src/error/NativeAuthError.ts +4 -4
  469. package/src/error/NestedAppAuthError.ts +1 -1
  470. package/src/event/EventHandler.ts +5 -5
  471. package/src/event/EventMessage.ts +11 -10
  472. package/src/index.ts +35 -35
  473. package/src/interaction_client/BaseInteractionClient.ts +51 -28
  474. package/src/interaction_client/HybridSpaAuthorizationCodeClient.ts +1 -1
  475. package/src/interaction_client/NativeInteractionClient.ts +32 -29
  476. package/src/interaction_client/PopupClient.ts +95 -109
  477. package/src/interaction_client/RedirectClient.ts +57 -31
  478. package/src/interaction_client/SilentAuthCodeClient.ts +20 -19
  479. package/src/interaction_client/SilentCacheClient.ts +11 -11
  480. package/src/interaction_client/SilentIframeClient.ts +23 -22
  481. package/src/interaction_client/SilentRefreshClient.ts +33 -20
  482. package/src/interaction_client/StandardInteractionClient.ts +62 -38
  483. package/src/interaction_handler/InteractionHandler.ts +5 -5
  484. package/src/interaction_handler/RedirectHandler.ts +7 -7
  485. package/src/interaction_handler/SilentHandler.ts +3 -3
  486. package/src/naa/AuthResult.ts +2 -2
  487. package/src/naa/BridgeError.ts +1 -1
  488. package/src/naa/BridgeProxy.ts +36 -26
  489. package/src/naa/BridgeRequest.ts +1 -1
  490. package/src/naa/BridgeRequestEnvelope.ts +1 -1
  491. package/src/naa/BridgeResponseEnvelope.ts +4 -4
  492. package/src/naa/IBridgeProxy.ts +4 -4
  493. package/src/naa/InitContext.ts +2 -2
  494. package/src/naa/mapping/NestedAppAuthAdapter.ts +12 -12
  495. package/src/navigation/INavigationClient.ts +1 -1
  496. package/src/navigation/NavigationClient.ts +2 -2
  497. package/src/navigation/NavigationOptions.ts +1 -1
  498. package/src/network/FetchClient.ts +3 -3
  499. package/src/operatingcontext/BaseOperatingContext.ts +4 -4
  500. package/src/operatingcontext/NestedAppOperatingContext.ts +14 -9
  501. package/src/operatingcontext/StandardOperatingContext.ts +1 -1
  502. package/src/operatingcontext/UnknownOperatingContext.ts +1 -1
  503. package/src/packageMetadata.ts +1 -1
  504. package/src/request/AuthorizationCodeRequest.ts +1 -1
  505. package/src/request/AuthorizationUrlRequest.ts +1 -1
  506. package/src/request/ClearCacheRequest.ts +1 -1
  507. package/src/request/EndSessionPopupRequest.ts +4 -2
  508. package/src/request/EndSessionRequest.ts +1 -1
  509. package/src/request/PopupRequest.ts +7 -2
  510. package/src/request/RedirectRequest.ts +4 -1
  511. package/src/request/RequestHelpers.ts +4 -4
  512. package/src/request/SilentRequest.ts +2 -2
  513. package/src/request/SsoSilentRequest.ts +4 -1
  514. package/src/response/AuthenticationResult.ts +1 -1
  515. package/src/response/ResponseHandler.ts +4 -4
  516. package/src/telemetry/BrowserPerformanceClient.ts +6 -6
  517. package/src/telemetry/BrowserPerformanceMeasurement.ts +4 -1
  518. package/src/utils/BrowserConstants.ts +3 -3
  519. package/src/utils/BrowserProtocolUtils.ts +2 -2
  520. package/src/utils/BrowserUtils.ts +6 -6
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,54 @@
1
+ import { AccountFilter, AccountInfo, Logger, PerformanceCallbackFunction } from "@azure/msal-common/browser";
2
+ import { RedirectRequest } from "../request/RedirectRequest.js";
3
+ import { PopupRequest } from "../request/PopupRequest.js";
4
+ import { SilentRequest } from "../request/SilentRequest.js";
5
+ import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
6
+ import { EndSessionRequest } from "../request/EndSessionRequest.js";
7
+ import { WrapperSKU } from "../utils/BrowserConstants.js";
8
+ import { INavigationClient } from "../navigation/INavigationClient.js";
9
+ import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
10
+ import { ITokenCache } from "../cache/ITokenCache.js";
11
+ import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
12
+ import { BrowserConfiguration } from "../config/Configuration.js";
13
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
14
+ import { EventCallbackFunction } from "../event/EventMessage.js";
15
+ import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
16
+ import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
17
+ export interface IPublicClientApplication {
18
+ initialize(request?: InitializeApplicationRequest): Promise<void>;
19
+ acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
20
+ acquireTokenRedirect(request: RedirectRequest): Promise<void>;
21
+ acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
22
+ acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
23
+ addEventCallback(callback: EventCallbackFunction): string | null;
24
+ removeEventCallback(callbackId: string): void;
25
+ addPerformanceCallback(callback: PerformanceCallbackFunction): string;
26
+ removePerformanceCallback(callbackId: string): boolean;
27
+ enableAccountStorageEvents(): void;
28
+ disableAccountStorageEvents(): void;
29
+ getAccount(accountFilter: AccountFilter): AccountInfo | null;
30
+ getAccountByHomeId(homeAccountId: string): AccountInfo | null;
31
+ getAccountByLocalId(localId: string): AccountInfo | null;
32
+ getAccountByUsername(userName: string): AccountInfo | null;
33
+ getAllAccounts(): AccountInfo[];
34
+ handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;
35
+ loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
36
+ loginRedirect(request?: RedirectRequest): Promise<void>;
37
+ logout(logoutRequest?: EndSessionRequest): Promise<void>;
38
+ logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
39
+ logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
40
+ ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
41
+ getTokenCache(): ITokenCache;
42
+ getLogger(): Logger;
43
+ setLogger(logger: Logger): void;
44
+ setActiveAccount(account: AccountInfo | null): void;
45
+ getActiveAccount(): AccountInfo | null;
46
+ initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
47
+ setNavigationClient(navigationClient: INavigationClient): void;
48
+ /** @internal */
49
+ getConfiguration(): BrowserConfiguration;
50
+ hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
51
+ clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
52
+ }
53
+ export declare const stubbedPublicClientApplication: IPublicClientApplication;
54
+ //# sourceMappingURL=IPublicClientApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/app/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,WAAW,EACX,MAAM,EACN,2BAA2B,EAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BA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AW,GAAG,IAAI,GAAG,IAAI,CAAC;IACpD,gBAAgB,IAAI,WAAW,GAAG,IAAI,CAAC;IACvC,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACjE,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/D,gBAAgB;IAChB,gBAAgB,IAAI,oBAAoB,CAAC;IACzC,YAAY,CACR,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,eAAO,MAAM,8BAA8B,EAAE,wBAkK5C,CAAC"}
@@ -0,0 +1,294 @@
1
+ import { ITokenCache } from "../cache/ITokenCache.js";
2
+ import { INavigationClient } from "../navigation/INavigationClient.js";
3
+ import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
4
+ import { PopupRequest } from "../request/PopupRequest.js";
5
+ import { RedirectRequest } from "../request/RedirectRequest.js";
6
+ import { SilentRequest } from "../request/SilentRequest.js";
7
+ import { WrapperSKU } from "../utils/BrowserConstants.js";
8
+ import { IPublicClientApplication } from "./IPublicClientApplication.js";
9
+ import { IController } from "../controllers/IController.js";
10
+ import { PerformanceCallbackFunction, AccountInfo, AccountFilter, Logger } from "@azure/msal-common/browser";
11
+ import { EndSessionRequest } from "../request/EndSessionRequest.js";
12
+ import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
13
+ import { BrowserConfiguration, Configuration } from "../config/Configuration.js";
14
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
15
+ import { EventCallbackFunction } from "../event/EventMessage.js";
16
+ import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
17
+ import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
18
+ import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
19
+ /**
20
+ * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications
21
+ * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.
22
+ */
23
+ export declare class PublicClientApplication implements IPublicClientApplication {
24
+ protected controller: IController;
25
+ /**
26
+ * Creates StandardController and passes it to the PublicClientApplication
27
+ *
28
+ * @param configuration {Configuration}
29
+ */
30
+ static createPublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
31
+ /**
32
+ * @constructor
33
+ * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object
34
+ *
35
+ * Important attributes in the Configuration object for auth are:
36
+ * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview
37
+ * - authority: the authority URL for your application.
38
+ * - redirect_uri: the uri of your application registered in the portal.
39
+ *
40
+ * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.
41
+ * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}
42
+ * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
43
+ * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
44
+ * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
45
+ * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
46
+ *
47
+ * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/
48
+ * Full B2C functionality will be available in this library in future versions.
49
+ *
50
+ * @param configuration Object for the MSAL PublicClientApplication instance
51
+ * @param IController Optional parameter to explictly set the controller. (Will be removed when we remove public constructor)
52
+ */
53
+ constructor(configuration: Configuration, controller?: IController);
54
+ /**
55
+ * Initializer function to perform async startup tasks such as connecting to WAM extension
56
+ * @param request {?InitializeApplicationRequest}
57
+ */
58
+ initialize(request?: InitializeApplicationRequest): Promise<void>;
59
+ /**
60
+ * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser
61
+ *
62
+ * @param request
63
+ *
64
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
65
+ */
66
+ acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
67
+ /**
68
+ * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects
69
+ * the page, so any code that follows this function will not execute.
70
+ *
71
+ * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
72
+ * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
73
+ *
74
+ * @param request
75
+ */
76
+ acquireTokenRedirect(request: RedirectRequest): Promise<void>;
77
+ /**
78
+ * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.
79
+ *
80
+ * @param {@link (SilentRequest:type)}
81
+ * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthenticationResult} object
82
+ */
83
+ acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
84
+ /**
85
+ * This function redeems an authorization code (passed as code) from the eSTS token endpoint.
86
+ * This authorization code should be acquired server-side using a confidential client to acquire a spa_code.
87
+ * This API is not indended for normal authorization code acquisition and redemption.
88
+ *
89
+ * Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.
90
+ *
91
+ * @param request {@link AuthorizationCodeRequest}
92
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
93
+ */
94
+ acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
95
+ /**
96
+ * Adds event callbacks to array
97
+ * @param callback
98
+ */
99
+ addEventCallback(callback: EventCallbackFunction): string | null;
100
+ /**
101
+ * Removes callback with provided id from callback array
102
+ * @param callbackId
103
+ */
104
+ removeEventCallback(callbackId: string): void;
105
+ /**
106
+ * Registers a callback to receive performance events.
107
+ *
108
+ * @param {PerformanceCallbackFunction} callback
109
+ * @returns {string}
110
+ */
111
+ addPerformanceCallback(callback: PerformanceCallbackFunction): string;
112
+ /**
113
+ * Removes a callback registered with addPerformanceCallback.
114
+ *
115
+ * @param {string} callbackId
116
+ * @returns {boolean}
117
+ */
118
+ removePerformanceCallback(callbackId: string): boolean;
119
+ /**
120
+ * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
121
+ */
122
+ enableAccountStorageEvents(): void;
123
+ /**
124
+ * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
125
+ */
126
+ disableAccountStorageEvents(): void;
127
+ /**
128
+ * Returns the first account found in the cache that matches the account filter passed in.
129
+ * @param accountFilter
130
+ * @returns The first account found in the cache matching the provided filter or null if no account could be found.
131
+ */
132
+ getAccount(accountFilter: AccountFilter): AccountInfo | null;
133
+ /**
134
+ * Returns the signed in account matching homeAccountId.
135
+ * (the account object is created at the time of successful login)
136
+ * or null when no matching account is found
137
+ * @param homeAccountId
138
+ * @returns The account object stored in MSAL
139
+ * @deprecated - Use getAccount instead
140
+ */
141
+ getAccountByHomeId(homeAccountId: string): AccountInfo | null;
142
+ /**
143
+ * Returns the signed in account matching localAccountId.
144
+ * (the account object is created at the time of successful login)
145
+ * or null when no matching account is found
146
+ * @param localAccountId
147
+ * @returns The account object stored in MSAL
148
+ * @deprecated - Use getAccount instead
149
+ */
150
+ getAccountByLocalId(localId: string): AccountInfo | null;
151
+ /**
152
+ * Returns the signed in account matching username.
153
+ * (the account object is created at the time of successful login)
154
+ * or null when no matching account is found.
155
+ * This API is provided for convenience but getAccountById should be used for best reliability
156
+ * @param userName
157
+ * @returns The account object stored in MSAL
158
+ * @deprecated - Use getAccount instead
159
+ */
160
+ getAccountByUsername(userName: string): AccountInfo | null;
161
+ /**
162
+ * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
163
+ * @param accountFilter - (Optional) filter to narrow down the accounts returned
164
+ * @returns Array of AccountInfo objects in cache
165
+ */
166
+ getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
167
+ /**
168
+ * Event handler function which allows users to fire events after the PublicClientApplication object
169
+ * has loaded during redirect flows. This should be invoked on all page loads involved in redirect
170
+ * auth flows.
171
+ * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.
172
+ * @returns Token response or null. If the return value is null, then no auth redirect was detected.
173
+ */
174
+ handleRedirectPromise(hash?: string | undefined): Promise<AuthenticationResult | null>;
175
+ /**
176
+ * Use when initiating the login process via opening a popup window in the user's browser
177
+ *
178
+ * @param request
179
+ *
180
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
181
+ */
182
+ loginPopup(request?: PopupRequest | undefined): Promise<AuthenticationResult>;
183
+ /**
184
+ * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so
185
+ * any code that follows this function will not execute.
186
+ *
187
+ * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
188
+ * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
189
+ *
190
+ * @param request
191
+ */
192
+ loginRedirect(request?: RedirectRequest | undefined): Promise<void>;
193
+ /**
194
+ * Deprecated logout function. Use logoutRedirect or logoutPopup instead
195
+ * @param logoutRequest
196
+ * @deprecated
197
+ */
198
+ logout(logoutRequest?: EndSessionRequest): Promise<void>;
199
+ /**
200
+ * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.
201
+ * Default behaviour is to redirect the user to `window.location.href`.
202
+ * @param logoutRequest
203
+ */
204
+ logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
205
+ /**
206
+ * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server
207
+ * @param logoutRequest
208
+ */
209
+ logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
210
+ /**
211
+ * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:
212
+ * - Any browser using a form of Intelligent Tracking Prevention
213
+ * - If there is not an established session with the service
214
+ *
215
+ * In these cases, the request must be done inside a popup or full frame redirect.
216
+ *
217
+ * For the cases where interaction is required, you cannot send a request with prompt=none.
218
+ *
219
+ * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as
220
+ * you session on the server still exists.
221
+ * @param request {@link SsoSilentRequest}
222
+ *
223
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
224
+ */
225
+ ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
226
+ /**
227
+ * Gets the token cache for the application.
228
+ */
229
+ getTokenCache(): ITokenCache;
230
+ /**
231
+ * Returns the logger instance
232
+ */
233
+ getLogger(): Logger;
234
+ /**
235
+ * Replaces the default logger set in configurations with new Logger with new configurations
236
+ * @param logger Logger instance
237
+ */
238
+ setLogger(logger: Logger): void;
239
+ /**
240
+ * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
241
+ * @param account
242
+ */
243
+ setActiveAccount(account: AccountInfo | null): void;
244
+ /**
245
+ * Gets the currently active account
246
+ */
247
+ getActiveAccount(): AccountInfo | null;
248
+ /**
249
+ * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
250
+ * @param sku
251
+ * @param version
252
+ */
253
+ initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
254
+ /**
255
+ * Sets navigation client
256
+ * @param navigationClient
257
+ */
258
+ setNavigationClient(navigationClient: INavigationClient): void;
259
+ /**
260
+ * Returns the configuration object
261
+ * @internal
262
+ */
263
+ getConfiguration(): BrowserConfiguration;
264
+ /**
265
+ * Hydrates cache with the tokens and account in the AuthenticationResult object
266
+ * @param result
267
+ * @param request - The request object that was used to obtain the AuthenticationResult
268
+ * @returns
269
+ */
270
+ hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
271
+ /**
272
+ * Clears tokens and account from the browser cache.
273
+ * @param logoutRequest
274
+ */
275
+ clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
276
+ }
277
+ /**
278
+ * creates NestedAppAuthController and passes it to the PublicClientApplication,
279
+ * falls back to StandardController if NestedAppAuthController is not available
280
+ *
281
+ * @param configuration
282
+ * @returns IPublicClientApplication
283
+ *
284
+ */
285
+ export declare function createNestablePublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
286
+ /**
287
+ * creates PublicClientApplication using StandardController
288
+ *
289
+ * @param configuration
290
+ * @returns IPublicClientApplication
291
+ *
292
+ */
293
+ export declare function createStandardPublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
294
+ //# sourceMappingURL=PublicClientApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACH,2BAA2B,EAC3B,WAAW,EACX,aAAa,EACb,MAAM,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAA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AAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAInE;;OAEG;IACH,aAAa,IAAI,WAAW;IAI5B;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI;IAInD;;OAEG;IACH,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAItC;;;;OAIG;IACH,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIhE;;;OAGG;IACH,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI;IAI9D;;;OAGG;IACH,gBAAgB,IAAI,oBAAoB;IAIxC;;;;;OAKG;IACG,YAAY,CACd,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAIhB;;;OAGG;IACH,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/D;AAED;;;;;;;GAOG;AACH,wBAAsB,qCAAqC,CACvD,aAAa,EAAE,aAAa,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAUnC;AAED;;;;;;GAMG;AACH,wBAAsB,qCAAqC,CACvD,aAAa,EAAE,aAAa,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAInC"}
@@ -0,0 +1,277 @@
1
+ import { ITokenCache } from "../cache/ITokenCache.js";
2
+ import { INavigationClient } from "../navigation/INavigationClient.js";
3
+ import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
4
+ import { PopupRequest } from "../request/PopupRequest.js";
5
+ import { RedirectRequest } from "../request/RedirectRequest.js";
6
+ import { SilentRequest } from "../request/SilentRequest.js";
7
+ import { WrapperSKU } from "../utils/BrowserConstants.js";
8
+ import { IPublicClientApplication } from "./IPublicClientApplication.js";
9
+ import { IController } from "../controllers/IController.js";
10
+ import { PerformanceCallbackFunction, AccountInfo, AccountFilter, Logger } from "@azure/msal-common/browser";
11
+ import { EndSessionRequest } from "../request/EndSessionRequest.js";
12
+ import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
13
+ import { BrowserConfiguration, Configuration } from "../config/Configuration.js";
14
+ import { EventCallbackFunction } from "../event/EventMessage.js";
15
+ import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
16
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
17
+ /**
18
+ * PublicClientNext is an early look at the planned implementation of PublicClientApplication in the next major version of MSAL.js.
19
+ * It contains support for multiple API implementations based on the runtime environment that it is running in.
20
+ *
21
+ * The goals of these changes are to provide a clean separation of behavior between different operating contexts (Nested App Auth, Platform Brokers, Plain old Browser, etc.)
22
+ * while still providing a consistent API surface for developers.
23
+ *
24
+ * Please use PublicClientApplication for any prod/real-world scenarios.
25
+ * Note: PublicClientNext is experimental and subject to breaking changes without following semver
26
+ *
27
+ */
28
+ export declare class PublicClientNext implements IPublicClientApplication {
29
+ protected controller: IController;
30
+ protected configuration: Configuration;
31
+ static createPublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
32
+ /**
33
+ * @constructor
34
+ * Constructor for the PublicClientNext used to instantiate the PublicClientNext object
35
+ *
36
+ * Important attributes in the Configuration object for auth are:
37
+ * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview
38
+ * - authority: the authority URL for your application.
39
+ * - redirect_uri: the uri of your application registered in the portal.
40
+ *
41
+ * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.
42
+ * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}
43
+ * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
44
+ * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
45
+ * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
46
+ * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
47
+ *
48
+ * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/
49
+ * Full B2C functionality will be available in this library in future versions.
50
+ *
51
+ * @param configuration Object for the MSAL PublicClientApplication instance
52
+ * @param IController Optional parameter to explictly set the controller. (Will be removed when we remove public constructor)
53
+ */
54
+ private constructor();
55
+ /**
56
+ * Initializer function to perform async startup tasks such as connecting to WAM extension
57
+ */
58
+ initialize(): Promise<void>;
59
+ /**
60
+ * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser
61
+ *
62
+ * @param request
63
+ *
64
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
65
+ */
66
+ acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
67
+ /**
68
+ * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects
69
+ * the page, so any code that follows this function will not execute.
70
+ *
71
+ * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
72
+ * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
73
+ *
74
+ * @param request
75
+ */
76
+ acquireTokenRedirect(request: RedirectRequest): Promise<void>;
77
+ /**
78
+ * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.
79
+ *
80
+ * @param {@link (SilentRequest:type)}
81
+ * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthenticationResult} object
82
+ */
83
+ acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
84
+ /**
85
+ * This function redeems an authorization code (passed as code) from the eSTS token endpoint.
86
+ * This authorization code should be acquired server-side using a confidential client to acquire a spa_code.
87
+ * This API is not indended for normal authorization code acquisition and redemption.
88
+ *
89
+ * Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.
90
+ *
91
+ * @param request {@link AuthorizationCodeRequest}
92
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
93
+ */
94
+ acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
95
+ /**
96
+ * Adds event callbacks to array
97
+ * @param callback
98
+ */
99
+ addEventCallback(callback: EventCallbackFunction): string | null;
100
+ /**
101
+ * Removes callback with provided id from callback array
102
+ * @param callbackId
103
+ */
104
+ removeEventCallback(callbackId: string): void;
105
+ /**
106
+ * Registers a callback to receive performance events.
107
+ *
108
+ * @param {PerformanceCallbackFunction} callback
109
+ * @returns {string}
110
+ */
111
+ addPerformanceCallback(callback: PerformanceCallbackFunction): string;
112
+ /**
113
+ * Removes a callback registered with addPerformanceCallback.
114
+ *
115
+ * @param {string} callbackId
116
+ * @returns {boolean}
117
+ */
118
+ removePerformanceCallback(callbackId: string): boolean;
119
+ /**
120
+ * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
121
+ */
122
+ enableAccountStorageEvents(): void;
123
+ /**
124
+ * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
125
+ */
126
+ disableAccountStorageEvents(): void;
127
+ /**
128
+ * Returns the first account found in the cache that matches the account filter passed in.
129
+ * @param accountFilter
130
+ * @returns The first account found in the cache matching the provided filter or null if no account could be found.
131
+ */
132
+ getAccount(accountFilter: AccountFilter): AccountInfo | null;
133
+ /**
134
+ * Returns the signed in account matching homeAccountId.
135
+ * (the account object is created at the time of successful login)
136
+ * or null when no matching account is found
137
+ * @param homeAccountId
138
+ * @returns The account object stored in MSAL
139
+ * @deprecated - Use getAccount instead
140
+ */
141
+ getAccountByHomeId(homeAccountId: string): AccountInfo | null;
142
+ /**
143
+ * Returns the signed in account matching localAccountId.
144
+ * (the account object is created at the time of successful login)
145
+ * or null when no matching account is found
146
+ * @param localAccountId
147
+ * @returns The account object stored in MSAL
148
+ * @deprecated - Use getAccount instead
149
+ */
150
+ getAccountByLocalId(localId: string): AccountInfo | null;
151
+ /**
152
+ * Returns the signed in account matching username.
153
+ * (the account object is created at the time of successful login)
154
+ * or null when no matching account is found.
155
+ * This API is provided for convenience but getAccountById should be used for best reliability
156
+ * @param userName
157
+ * @returns The account object stored in MSAL
158
+ * @deprecated - Use getAccount instead
159
+ */
160
+ getAccountByUsername(userName: string): AccountInfo | null;
161
+ /**
162
+ * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
163
+ * @param accountFilter - (Optional) filter to narrow down the accounts returned
164
+ * @returns Array of AccountInfo objects in cache
165
+ */
166
+ getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
167
+ /**
168
+ * Event handler function which allows users to fire events after the PublicClientApplication object
169
+ * has loaded during redirect flows. This should be invoked on all page loads involved in redirect
170
+ * auth flows.
171
+ * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.
172
+ * @returns Token response or null. If the return value is null, then no auth redirect was detected.
173
+ */
174
+ handleRedirectPromise(hash?: string | undefined): Promise<AuthenticationResult | null>;
175
+ /**
176
+ * Use when initiating the login process via opening a popup window in the user's browser
177
+ *
178
+ * @param request
179
+ *
180
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
181
+ */
182
+ loginPopup(request?: PopupRequest | undefined): Promise<AuthenticationResult>;
183
+ /**
184
+ * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so
185
+ * any code that follows this function will not execute.
186
+ *
187
+ * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
188
+ * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
189
+ *
190
+ * @param request
191
+ */
192
+ loginRedirect(request?: RedirectRequest | undefined): Promise<void>;
193
+ /**
194
+ * Deprecated logout function. Use logoutRedirect or logoutPopup instead
195
+ * @param logoutRequest
196
+ * @deprecated
197
+ */
198
+ logout(logoutRequest?: EndSessionRequest): Promise<void>;
199
+ /**
200
+ * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.
201
+ * Default behaviour is to redirect the user to `window.location.href`.
202
+ * @param logoutRequest
203
+ */
204
+ logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
205
+ /**
206
+ * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server
207
+ * @param logoutRequest
208
+ */
209
+ logoutPopup(logoutRequest?: EndSessionRequest): Promise<void>;
210
+ /**
211
+ * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:
212
+ * - Any browser using a form of Intelligent Tracking Prevention
213
+ * - If there is not an established session with the service
214
+ *
215
+ * In these cases, the request must be done inside a popup or full frame redirect.
216
+ *
217
+ * For the cases where interaction is required, you cannot send a request with prompt=none.
218
+ *
219
+ * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as
220
+ * you session on the server still exists.
221
+ * @param request {@link SsoSilentRequest}
222
+ *
223
+ * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
224
+ */
225
+ ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
226
+ /**
227
+ * Gets the token cache for the application.
228
+ */
229
+ getTokenCache(): ITokenCache;
230
+ /**
231
+ * Returns the logger instance
232
+ */
233
+ getLogger(): Logger;
234
+ /**
235
+ * Replaces the default logger set in configurations with new Logger with new configurations
236
+ * @param logger Logger instance
237
+ */
238
+ setLogger(logger: Logger): void;
239
+ /**
240
+ * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
241
+ * @param account
242
+ */
243
+ setActiveAccount(account: AccountInfo | null): void;
244
+ /**
245
+ * Gets the currently active account
246
+ */
247
+ getActiveAccount(): AccountInfo | null;
248
+ /**
249
+ * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
250
+ * @param sku
251
+ * @param version
252
+ */
253
+ initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
254
+ /**
255
+ * Sets navigation client
256
+ * @param navigationClient
257
+ */
258
+ setNavigationClient(navigationClient: INavigationClient): void;
259
+ /**
260
+ * Returns the configuration object
261
+ * @internal
262
+ */
263
+ getConfiguration(): BrowserConfiguration;
264
+ /**
265
+ * Hydrates cache with the tokens and account in the AuthenticationResult object
266
+ * @param result
267
+ * @param request - The request object that was used to obtain the AuthenticationResult
268
+ * @returns
269
+ */
270
+ hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
271
+ /**
272
+ * Clears tokens and account from the browser cache.
273
+ * @param logoutRequest
274
+ */
275
+ clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
276
+ }
277
+ //# sourceMappingURL=PublicClientNext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicClientNext.d.ts","sourceRoot":"","sources":["../../../src/app/PublicClientNext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACH,2BAA2B,EAC3B,WAAW,EACX,aAAa,EACb,MAAM,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,E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