@azure/msal-browser 3.22.1 → 3.24.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.
- package/dist/app/IPublicClientApplication.d.ts +16 -16
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.d.ts +18 -18
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientNext.d.ts +16 -16
- package/dist/app/PublicClientNext.d.ts.map +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/app/PublicClientNext.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +3 -3
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +2 -2
- package/dist/broker/nativeBroker/NativeRequest.d.ts +2 -2
- package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.d.ts +2 -2
- package/dist/cache/AccountManager.d.ts.map +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.d.ts +2 -2
- package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +11 -11
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +2 -2
- package/dist/cache/BrowserStorage.d.ts +1 -1
- package/dist/cache/BrowserStorage.d.ts.map +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.d.ts +1 -1
- package/dist/cache/DatabaseStorage.d.ts.map +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs.map +1 -1
- package/dist/cache/ITokenCache.d.ts +4 -4
- package/dist/cache/ITokenCache.d.ts.map +1 -1
- package/dist/cache/MemoryStorage.d.ts +1 -1
- package/dist/cache/MemoryStorage.d.ts.map +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.d.ts +6 -6
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +2 -2
- package/dist/config/Configuration.d.ts +7 -3
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +3 -2
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.d.ts +3 -3
- package/dist/controllers/ControllerFactory.d.ts.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/IController.d.ts +17 -17
- package/dist/controllers/IController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts +21 -21
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +2 -2
- package/dist/controllers/StandardController.d.ts +28 -28
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +2 -2
- package/dist/controllers/UnknownOperatingContextController.d.ts +19 -19
- package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +2 -2
- package/dist/crypto/BrowserCrypto.d.ts +1 -1
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +2 -2
- package/dist/crypto/CryptoOps.d.ts +1 -1
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.mjs +2 -2
- package/dist/crypto/CryptoOps.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts +1 -1
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +2 -2
- package/dist/crypto/SignedHttpRequest.d.ts +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +2 -2
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.d.ts +2 -2
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +2 -2
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.d.ts +2 -2
- package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +2 -2
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.d.ts +2 -2
- package/dist/error/NativeAuthError.d.ts.map +1 -1
- package/dist/error/NativeAuthError.mjs +2 -2
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.d.ts +1 -1
- package/dist/error/NestedAppAuthError.d.ts.map +1 -1
- package/dist/error/NestedAppAuthError.mjs +2 -2
- package/dist/event/EventHandler.d.ts +4 -4
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +2 -2
- package/dist/event/EventMessage.d.ts +9 -4
- package/dist/event/EventMessage.d.ts.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventMessage.mjs.map +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.d.ts +35 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/interaction_client/BaseInteractionClient.d.ts +24 -16
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +23 -10
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +2 -2
- package/dist/interaction_client/NativeInteractionClient.d.ts +16 -16
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +12 -6
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts +17 -16
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +59 -56
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +10 -10
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +16 -6
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts +10 -10
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +9 -3
- package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts +4 -4
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +8 -3
- package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +11 -11
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +9 -3
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts +17 -6
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +23 -7
- package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts +36 -15
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +26 -11
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +4 -4
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +2 -2
- package/dist/interaction_handler/RedirectHandler.d.ts +4 -4
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +2 -2
- package/dist/interaction_handler/SilentHandler.d.ts +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +2 -2
- package/dist/naa/AuthResult.d.ts +2 -2
- package/dist/naa/AuthResult.d.ts.map +1 -1
- package/dist/naa/BridgeError.d.ts +1 -1
- package/dist/naa/BridgeError.d.ts.map +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.d.ts +9 -8
- package/dist/naa/BridgeProxy.d.ts.map +1 -1
- package/dist/naa/BridgeProxy.mjs +16 -14
- package/dist/naa/BridgeProxy.mjs.map +1 -1
- package/dist/naa/BridgeRequest.d.ts +1 -1
- package/dist/naa/BridgeRequest.d.ts.map +1 -1
- package/dist/naa/BridgeRequestEnvelope.d.ts +1 -1
- package/dist/naa/BridgeRequestEnvelope.d.ts.map +1 -1
- package/dist/naa/BridgeResponseEnvelope.d.ts +4 -4
- package/dist/naa/BridgeResponseEnvelope.d.ts.map +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/IBridgeProxy.d.ts +4 -4
- package/dist/naa/IBridgeProxy.d.ts.map +1 -1
- package/dist/naa/InitContext.d.ts +2 -2
- package/dist/naa/InitContext.d.ts.map +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +9 -9
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +2 -2
- package/dist/navigation/INavigationClient.d.ts +1 -1
- package/dist/navigation/INavigationClient.d.ts.map +1 -1
- package/dist/navigation/NavigationClient.d.ts +2 -2
- package/dist/navigation/NavigationClient.d.ts.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/navigation/NavigationOptions.d.ts +1 -1
- package/dist/navigation/NavigationOptions.d.ts.map +1 -1
- package/dist/network/FetchClient.d.ts +1 -1
- package/dist/network/FetchClient.d.ts.map +1 -1
- package/dist/network/FetchClient.mjs +2 -2
- package/dist/operatingcontext/BaseOperatingContext.d.ts +2 -2
- package/dist/operatingcontext/BaseOperatingContext.d.ts.map +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +2 -2
- package/dist/operatingcontext/NestedAppOperatingContext.d.ts +8 -3
- package/dist/operatingcontext/NestedAppOperatingContext.d.ts.map +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +4 -5
- package/dist/operatingcontext/NestedAppOperatingContext.mjs.map +1 -1
- package/dist/operatingcontext/StandardOperatingContext.d.ts +1 -1
- package/dist/operatingcontext/StandardOperatingContext.d.ts.map +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.d.ts +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.d.ts.map +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/ClearCacheRequest.d.ts +1 -1
- package/dist/request/ClearCacheRequest.d.ts.map +1 -1
- package/dist/request/EndSessionPopupRequest.d.ts +4 -2
- package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/dist/request/EndSessionRequest.d.ts +1 -1
- package/dist/request/EndSessionRequest.d.ts.map +1 -1
- package/dist/request/PopupRequest.d.ts +4 -2
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/RedirectRequest.d.ts +1 -1
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/RequestHelpers.d.ts +3 -3
- package/dist/request/RequestHelpers.d.ts.map +1 -1
- package/dist/request/RequestHelpers.mjs +2 -2
- package/dist/request/SilentRequest.d.ts +2 -2
- package/dist/request/SilentRequest.d.ts.map +1 -1
- package/dist/request/SsoSilentRequest.d.ts +1 -1
- package/dist/request/SsoSilentRequest.d.ts.map +1 -1
- package/dist/response/AuthenticationResult.d.ts +1 -1
- package/dist/response/AuthenticationResult.d.ts.map +1 -1
- package/dist/response/ResponseHandler.d.ts +2 -2
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +2 -2
- package/dist/telemetry/BrowserPerformanceClient.d.ts +2 -2
- package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +2 -2
- package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
- package/dist/utils/BrowserConstants.d.ts +2 -2
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +2 -2
- package/dist/utils/BrowserProtocolUtils.d.ts +2 -2
- package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +2 -2
- package/dist/utils/BrowserUtils.d.ts +2 -2
- package/dist/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/utils/BrowserUtils.mjs +3 -3
- package/lib/msal-browser.cjs +5045 -4956
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +5045 -4956
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +66 -68
- package/lib/package.json +1 -0
- package/lib/types/app/IPublicClientApplication.d.ts +54 -0
- package/lib/types/app/IPublicClientApplication.d.ts.map +1 -0
- package/lib/types/app/PublicClientApplication.d.ts +294 -0
- package/lib/types/app/PublicClientApplication.d.ts.map +1 -0
- package/lib/types/app/PublicClientNext.d.ts +277 -0
- package/lib/types/app/PublicClientNext.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts +63 -0
- package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/NativeRequest.d.ts +46 -0
- package/lib/types/broker/nativeBroker/NativeRequest.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/NativeResponse.d.ts +49 -0
- package/lib/types/broker/nativeBroker/NativeResponse.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/NativeStatusCodes.d.ts +8 -0
- package/lib/types/broker/nativeBroker/NativeStatusCodes.d.ts.map +1 -0
- package/lib/types/cache/AccountManager.d.ts +49 -0
- package/lib/types/cache/AccountManager.d.ts.map +1 -0
- package/lib/types/cache/AsyncMemoryStorage.d.ts +51 -0
- package/lib/types/cache/AsyncMemoryStorage.d.ts.map +1 -0
- package/lib/types/cache/BrowserCacheManager.d.ts +386 -0
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -0
- package/lib/types/cache/BrowserStorage.d.ts +12 -0
- package/lib/types/cache/BrowserStorage.d.ts.map +1 -0
- package/lib/types/cache/DatabaseStorage.d.ts +57 -0
- package/lib/types/cache/DatabaseStorage.d.ts.map +1 -0
- package/lib/types/cache/IAsyncStorage.d.ts +28 -0
- package/lib/types/cache/IAsyncStorage.d.ts.map +1 -0
- package/lib/types/cache/ITokenCache.d.ts +12 -0
- package/lib/types/cache/ITokenCache.d.ts.map +1 -0
- package/lib/types/cache/IWindowStorage.d.ts +28 -0
- package/lib/types/cache/IWindowStorage.d.ts.map +1 -0
- package/lib/types/cache/MemoryStorage.d.ts +12 -0
- package/lib/types/cache/MemoryStorage.d.ts.map +1 -0
- package/lib/types/cache/TokenCache.d.ts +78 -0
- package/lib/types/cache/TokenCache.d.ts.map +1 -0
- package/lib/types/config/Configuration.d.ts +218 -0
- package/lib/types/config/Configuration.d.ts.map +1 -0
- package/lib/types/controllers/ControllerFactory.d.ts +6 -0
- package/lib/types/controllers/ControllerFactory.d.ts.map +1 -0
- package/lib/types/controllers/IController.d.ts +61 -0
- package/lib/types/controllers/IController.d.ts.map +1 -0
- package/lib/types/controllers/NestedAppAuthController.d.ts +203 -0
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -0
- package/lib/types/controllers/StandardController.d.ts +406 -0
- package/lib/types/controllers/StandardController.d.ts.map +1 -0
- package/lib/types/controllers/UnknownOperatingContextController.d.ts +87 -0
- package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -0
- package/lib/types/crypto/BrowserCrypto.d.ts +53 -0
- package/lib/types/crypto/BrowserCrypto.d.ts.map +1 -0
- package/lib/types/crypto/CryptoOps.d.ts +75 -0
- package/lib/types/crypto/CryptoOps.d.ts.map +1 -0
- package/lib/types/crypto/PkceGenerator.d.ts +9 -0
- package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
- package/lib/types/crypto/SignedHttpRequest.d.ts +31 -0
- package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
- package/lib/types/encode/Base64Decode.d.ts +10 -0
- package/lib/types/encode/Base64Decode.d.ts.map +1 -0
- package/lib/types/encode/Base64Encode.d.ts +20 -0
- package/lib/types/encode/Base64Encode.d.ts.map +1 -0
- package/lib/types/error/BrowserAuthError.d.ts +256 -0
- package/lib/types/error/BrowserAuthError.d.ts.map +1 -0
- package/lib/types/error/BrowserAuthErrorCodes.d.ts +47 -0
- package/lib/types/error/BrowserAuthErrorCodes.d.ts.map +1 -0
- package/lib/types/error/BrowserConfigurationAuthError.d.ts +34 -0
- package/lib/types/error/BrowserConfigurationAuthError.d.ts.map +1 -0
- package/lib/types/error/BrowserConfigurationAuthErrorCodes.d.ts +4 -0
- package/lib/types/error/BrowserConfigurationAuthErrorCodes.d.ts.map +1 -0
- package/lib/types/error/NativeAuthError.d.ts +30 -0
- package/lib/types/error/NativeAuthError.d.ts.map +1 -0
- package/lib/types/error/NativeAuthErrorCodes.d.ts +3 -0
- package/lib/types/error/NativeAuthErrorCodes.d.ts.map +1 -0
- package/lib/types/error/NestedAppAuthError.d.ts +15 -0
- package/lib/types/error/NestedAppAuthError.d.ts.map +1 -0
- package/lib/types/event/EventHandler.d.ts +42 -0
- package/lib/types/event/EventHandler.d.ts.map +1 -0
- package/lib/types/event/EventMessage.d.ts +31 -0
- package/lib/types/event/EventMessage.d.ts.map +1 -0
- package/lib/types/event/EventType.d.ts +30 -0
- package/lib/types/event/EventType.d.ts.map +1 -0
- package/lib/types/index.d.ts +41 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/interaction_client/BaseInteractionClient.d.ts +59 -0
- package/lib/types/interaction_client/BaseInteractionClient.d.ts.map +1 -0
- package/lib/types/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +5 -0
- package/lib/types/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -0
- package/lib/types/interaction_client/NativeInteractionClient.d.ts +152 -0
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -0
- package/lib/types/interaction_client/PopupClient.d.ts +107 -0
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -0
- package/lib/types/interaction_client/RedirectClient.d.ts +51 -0
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -0
- package/lib/types/interaction_client/SilentAuthCodeClient.d.ts +24 -0
- package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -0
- package/lib/types/interaction_client/SilentCacheClient.d.ts +17 -0
- package/lib/types/interaction_client/SilentCacheClient.d.ts.map +1 -0
- package/lib/types/interaction_client/SilentIframeClient.d.ts +33 -0
- package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -0
- package/lib/types/interaction_client/SilentRefreshClient.d.ts +32 -0
- package/lib/types/interaction_client/SilentRefreshClient.d.ts.map +1 -0
- package/lib/types/interaction_client/StandardInteractionClient.d.ts +70 -0
- package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -0
- package/lib/types/interaction_handler/InteractionHandler.d.ts +34 -0
- package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -0
- package/lib/types/interaction_handler/RedirectHandler.d.ts +33 -0
- package/lib/types/interaction_handler/RedirectHandler.d.ts.map +1 -0
- package/lib/types/interaction_handler/SilentHandler.d.ts +14 -0
- package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -0
- package/lib/types/naa/AccountInfo.d.ts +12 -0
- package/lib/types/naa/AccountInfo.d.ts.map +1 -0
- package/lib/types/naa/AuthBridge.d.ts +9 -0
- package/lib/types/naa/AuthBridge.d.ts.map +1 -0
- package/lib/types/naa/AuthResult.d.ts +7 -0
- package/lib/types/naa/AuthResult.d.ts.map +1 -0
- package/lib/types/naa/BridgeAccountContext.d.ts +13 -0
- package/lib/types/naa/BridgeAccountContext.d.ts.map +1 -0
- package/lib/types/naa/BridgeCapabilities.d.ts +4 -0
- package/lib/types/naa/BridgeCapabilities.d.ts.map +1 -0
- package/lib/types/naa/BridgeError.d.ts +10 -0
- package/lib/types/naa/BridgeError.d.ts.map +1 -0
- package/lib/types/naa/BridgeProxy.d.ts +69 -0
- package/lib/types/naa/BridgeProxy.d.ts.map +1 -0
- package/lib/types/naa/BridgeRequest.d.ts +8 -0
- package/lib/types/naa/BridgeRequest.d.ts.map +1 -0
- package/lib/types/naa/BridgeRequestEnvelope.d.ts +13 -0
- package/lib/types/naa/BridgeRequestEnvelope.d.ts.map +1 -0
- package/lib/types/naa/BridgeResponseEnvelope.d.ts +14 -0
- package/lib/types/naa/BridgeResponseEnvelope.d.ts.map +1 -0
- package/lib/types/naa/BridgeStatusCode.d.ts +12 -0
- package/lib/types/naa/BridgeStatusCode.d.ts.map +1 -0
- package/lib/types/naa/IBridgeProxy.d.ts +11 -0
- package/lib/types/naa/IBridgeProxy.d.ts.map +1 -0
- package/lib/types/naa/InitContext.d.ts +9 -0
- package/lib/types/naa/InitContext.d.ts.map +1 -0
- package/lib/types/naa/TokenRequest.d.ts +19 -0
- package/lib/types/naa/TokenRequest.d.ts.map +1 -0
- package/lib/types/naa/TokenResponse.d.ts +14 -0
- package/lib/types/naa/TokenResponse.d.ts.map +1 -0
- package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts +36 -0
- package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -0
- package/lib/types/navigation/INavigationClient.d.ts +17 -0
- package/lib/types/navigation/INavigationClient.d.ts.map +1 -0
- package/lib/types/navigation/NavigationClient.d.ts +23 -0
- package/lib/types/navigation/NavigationClient.d.ts.map +1 -0
- package/lib/types/navigation/NavigationOptions.d.ts +13 -0
- package/lib/types/navigation/NavigationOptions.d.ts.map +1 -0
- package/lib/types/network/FetchClient.d.ts +27 -0
- package/lib/types/network/FetchClient.d.ts.map +1 -0
- package/lib/types/operatingcontext/BaseOperatingContext.d.ts +42 -0
- package/lib/types/operatingcontext/BaseOperatingContext.d.ts.map +1 -0
- package/lib/types/operatingcontext/NestedAppOperatingContext.d.ts +40 -0
- package/lib/types/operatingcontext/NestedAppOperatingContext.d.ts.map +1 -0
- package/lib/types/operatingcontext/StandardOperatingContext.d.ts +26 -0
- package/lib/types/operatingcontext/StandardOperatingContext.d.ts.map +1 -0
- package/lib/types/operatingcontext/UnknownOperatingContext.d.ts +26 -0
- package/lib/types/operatingcontext/UnknownOperatingContext.d.ts.map +1 -0
- package/lib/types/packageMetadata.d.ts +3 -0
- package/lib/types/packageMetadata.d.ts.map +1 -0
- package/lib/types/request/AuthorizationCodeRequest.d.ts +9 -0
- package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
- package/lib/types/request/AuthorizationUrlRequest.d.ts +9 -0
- package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
- package/lib/types/request/ClearCacheRequest.d.ts +11 -0
- package/lib/types/request/ClearCacheRequest.d.ts.map +1 -0
- package/lib/types/request/EndSessionPopupRequest.d.ts +21 -0
- package/lib/types/request/EndSessionPopupRequest.d.ts.map +1 -0
- package/lib/types/request/EndSessionRequest.d.ts +16 -0
- package/lib/types/request/EndSessionRequest.d.ts.map +1 -0
- package/lib/types/request/InitializeApplicationRequest.d.ts +9 -0
- package/lib/types/request/InitializeApplicationRequest.d.ts.map +1 -0
- package/lib/types/request/PopupRequest.d.ts +37 -0
- package/lib/types/request/PopupRequest.d.ts.map +1 -0
- package/lib/types/request/PopupWindowAttributes.d.ts +16 -0
- package/lib/types/request/PopupWindowAttributes.d.ts.map +1 -0
- package/lib/types/request/RedirectRequest.d.ts +41 -0
- package/lib/types/request/RedirectRequest.d.ts.map +1 -0
- package/lib/types/request/RequestHelpers.d.ts +14 -0
- package/lib/types/request/RequestHelpers.d.ts.map +1 -0
- package/lib/types/request/SilentRequest.d.ts +34 -0
- package/lib/types/request/SilentRequest.d.ts.map +1 -0
- package/lib/types/request/SsoSilentRequest.d.ts +30 -0
- package/lib/types/request/SsoSilentRequest.d.ts.map +1 -0
- package/lib/types/response/AuthenticationResult.d.ts +5 -0
- package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
- package/lib/types/response/ResponseHandler.d.ts +8 -0
- package/lib/types/response/ResponseHandler.d.ts.map +1 -0
- package/lib/types/telemetry/BrowserPerformanceClient.d.ts +35 -0
- package/lib/types/telemetry/BrowserPerformanceClient.d.ts.map +1 -0
- package/lib/types/telemetry/BrowserPerformanceMeasurement.d.ts +22 -0
- package/lib/types/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -0
- package/lib/types/utils/BrowserConstants.d.ts +181 -0
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -0
- package/lib/types/utils/BrowserProtocolUtils.d.ts +12 -0
- package/lib/types/utils/BrowserProtocolUtils.d.ts.map +1 -0
- package/lib/types/utils/BrowserUtils.d.ts +76 -0
- package/lib/types/utils/BrowserUtils.d.ts.map +1 -0
- package/package.json +14 -13
- package/src/app/IPublicClientApplication.ts +17 -17
- package/src/app/PublicClientApplication.ts +26 -23
- package/src/app/PublicClientNext.ts +22 -19
- package/src/broker/nativeBroker/NativeMessageHandler.ts +7 -7
- package/src/broker/nativeBroker/NativeRequest.ts +2 -2
- package/src/cache/AccountManager.ts +2 -2
- package/src/cache/AsyncMemoryStorage.ts +5 -5
- package/src/cache/BrowserCacheManager.ts +16 -16
- package/src/cache/BrowserStorage.ts +3 -3
- package/src/cache/DatabaseStorage.ts +7 -3
- package/src/cache/ITokenCache.ts +4 -4
- package/src/cache/MemoryStorage.ts +1 -1
- package/src/cache/TokenCache.ts +9 -9
- package/src/config/Configuration.ts +10 -5
- package/src/controllers/ControllerFactory.ts +7 -7
- package/src/controllers/IController.ts +17 -17
- package/src/controllers/NestedAppAuthController.ts +25 -25
- package/src/controllers/StandardController.ts +39 -39
- package/src/controllers/UnknownOperatingContextController.ts +21 -21
- package/src/crypto/BrowserCrypto.ts +4 -4
- package/src/crypto/CryptoOps.ts +10 -6
- package/src/crypto/PkceGenerator.ts +4 -4
- package/src/crypto/SignedHttpRequest.ts +3 -3
- package/src/encode/Base64Decode.ts +1 -1
- package/src/error/BrowserAuthError.ts +2 -2
- package/src/error/BrowserConfigurationAuthError.ts +2 -2
- package/src/error/NativeAuthError.ts +4 -4
- package/src/error/NestedAppAuthError.ts +1 -1
- package/src/event/EventHandler.ts +5 -5
- package/src/event/EventMessage.ts +11 -10
- package/src/index.ts +35 -35
- package/src/interaction_client/BaseInteractionClient.ts +51 -28
- package/src/interaction_client/HybridSpaAuthorizationCodeClient.ts +1 -1
- package/src/interaction_client/NativeInteractionClient.ts +32 -29
- package/src/interaction_client/PopupClient.ts +95 -109
- package/src/interaction_client/RedirectClient.ts +32 -30
- package/src/interaction_client/SilentAuthCodeClient.ts +20 -19
- package/src/interaction_client/SilentCacheClient.ts +11 -11
- package/src/interaction_client/SilentIframeClient.ts +23 -22
- package/src/interaction_client/SilentRefreshClient.ts +33 -20
- package/src/interaction_client/StandardInteractionClient.ts +62 -38
- package/src/interaction_handler/InteractionHandler.ts +5 -5
- package/src/interaction_handler/RedirectHandler.ts +7 -7
- package/src/interaction_handler/SilentHandler.ts +3 -3
- package/src/naa/AuthResult.ts +2 -2
- package/src/naa/BridgeError.ts +1 -1
- package/src/naa/BridgeProxy.ts +36 -26
- package/src/naa/BridgeRequest.ts +1 -1
- package/src/naa/BridgeRequestEnvelope.ts +1 -1
- package/src/naa/BridgeResponseEnvelope.ts +4 -4
- package/src/naa/IBridgeProxy.ts +4 -4
- package/src/naa/InitContext.ts +2 -2
- package/src/naa/mapping/NestedAppAuthAdapter.ts +12 -12
- package/src/navigation/INavigationClient.ts +1 -1
- package/src/navigation/NavigationClient.ts +2 -2
- package/src/navigation/NavigationOptions.ts +1 -1
- package/src/network/FetchClient.ts +3 -3
- package/src/operatingcontext/BaseOperatingContext.ts +4 -4
- package/src/operatingcontext/NestedAppOperatingContext.ts +14 -9
- package/src/operatingcontext/StandardOperatingContext.ts +1 -1
- package/src/operatingcontext/UnknownOperatingContext.ts +1 -1
- package/src/packageMetadata.ts +1 -1
- package/src/request/AuthorizationCodeRequest.ts +1 -1
- package/src/request/AuthorizationUrlRequest.ts +1 -1
- package/src/request/ClearCacheRequest.ts +1 -1
- package/src/request/EndSessionPopupRequest.ts +4 -2
- package/src/request/EndSessionRequest.ts +1 -1
- package/src/request/PopupRequest.ts +7 -2
- package/src/request/RedirectRequest.ts +4 -1
- package/src/request/RequestHelpers.ts +4 -4
- package/src/request/SilentRequest.ts +2 -2
- package/src/request/SsoSilentRequest.ts +4 -1
- package/src/response/AuthenticationResult.ts +1 -1
- package/src/response/ResponseHandler.ts +4 -4
- package/src/telemetry/BrowserPerformanceClient.ts +6 -6
- package/src/telemetry/BrowserPerformanceMeasurement.ts +4 -1
- package/src/utils/BrowserConstants.ts +3 -3
- package/src/utils/BrowserProtocolUtils.ts +2 -2
- package/src/utils/BrowserUtils.ts +6 -6
|
@@ -20,38 +20,39 @@ import {
|
|
|
20
20
|
ServerResponseType,
|
|
21
21
|
invokeAsync,
|
|
22
22
|
invoke,
|
|
23
|
-
} from "@azure/msal-common";
|
|
24
|
-
import { StandardInteractionClient } from "./StandardInteractionClient";
|
|
25
|
-
import { EventType } from "../event/EventType";
|
|
23
|
+
} from "@azure/msal-common/browser";
|
|
24
|
+
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
25
|
+
import { EventType } from "../event/EventType.js";
|
|
26
26
|
import {
|
|
27
27
|
InteractionType,
|
|
28
28
|
ApiId,
|
|
29
29
|
BrowserConstants,
|
|
30
|
-
} from "../utils/BrowserConstants";
|
|
31
|
-
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest";
|
|
32
|
-
import { NavigationOptions } from "../navigation/NavigationOptions";
|
|
33
|
-
import * as BrowserUtils from "../utils/BrowserUtils";
|
|
34
|
-
import { PopupRequest } from "../request/PopupRequest";
|
|
35
|
-
import { NativeInteractionClient } from "./NativeInteractionClient";
|
|
36
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
|
|
30
|
+
} from "../utils/BrowserConstants.js";
|
|
31
|
+
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
|
|
32
|
+
import { NavigationOptions } from "../navigation/NavigationOptions.js";
|
|
33
|
+
import * as BrowserUtils from "../utils/BrowserUtils.js";
|
|
34
|
+
import { PopupRequest } from "../request/PopupRequest.js";
|
|
35
|
+
import { NativeInteractionClient } from "./NativeInteractionClient.js";
|
|
36
|
+
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
37
37
|
import {
|
|
38
38
|
createBrowserAuthError,
|
|
39
39
|
BrowserAuthErrorCodes,
|
|
40
|
-
} from "../error/BrowserAuthError";
|
|
41
|
-
import { INavigationClient } from "../navigation/INavigationClient";
|
|
42
|
-
import { EventHandler } from "../event/EventHandler";
|
|
43
|
-
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
44
|
-
import { BrowserConfiguration } from "../config/Configuration";
|
|
45
|
-
import { InteractionHandler } from "../interaction_handler/InteractionHandler";
|
|
46
|
-
import { PopupWindowAttributes } from "../request/PopupWindowAttributes";
|
|
47
|
-
import { EventError } from "../event/EventMessage";
|
|
48
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
49
|
-
import * as ResponseHandler from "../response/ResponseHandler";
|
|
40
|
+
} from "../error/BrowserAuthError.js";
|
|
41
|
+
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
42
|
+
import { EventHandler } from "../event/EventHandler.js";
|
|
43
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
44
|
+
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
45
|
+
import { InteractionHandler } from "../interaction_handler/InteractionHandler.js";
|
|
46
|
+
import { PopupWindowAttributes } from "../request/PopupWindowAttributes.js";
|
|
47
|
+
import { EventError } from "../event/EventMessage.js";
|
|
48
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
49
|
+
import * as ResponseHandler from "../response/ResponseHandler.js";
|
|
50
50
|
|
|
51
51
|
export type PopupParams = {
|
|
52
52
|
popup?: Window | null;
|
|
53
53
|
popupName: string;
|
|
54
54
|
popupWindowAttributes: PopupWindowAttributes;
|
|
55
|
+
popupWindowParent: Window;
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
export class PopupClient extends StandardInteractionClient {
|
|
@@ -96,33 +97,27 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
96
97
|
request.scopes || OIDC_DEFAULT_SCOPES,
|
|
97
98
|
request.authority || this.config.auth.authority
|
|
98
99
|
);
|
|
99
|
-
const
|
|
100
|
+
const popupParams: PopupParams = {
|
|
101
|
+
popupName,
|
|
102
|
+
popupWindowAttributes: request.popupWindowAttributes || {},
|
|
103
|
+
popupWindowParent: request.popupWindowParent ?? window,
|
|
104
|
+
};
|
|
100
105
|
|
|
101
106
|
// asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.
|
|
102
107
|
if (this.config.system.asyncPopups) {
|
|
103
108
|
this.logger.verbose("asyncPopups set to true, acquiring token");
|
|
104
109
|
// Passes on popup position and dimensions if in request
|
|
105
|
-
return this.acquireTokenPopupAsync(
|
|
106
|
-
request,
|
|
107
|
-
popupName,
|
|
108
|
-
popupWindowAttributes
|
|
109
|
-
);
|
|
110
|
+
return this.acquireTokenPopupAsync(request, popupParams);
|
|
110
111
|
} else {
|
|
111
112
|
// asyncPopups flag is set to false. Opens popup before acquiring token.
|
|
112
113
|
this.logger.verbose(
|
|
113
114
|
"asyncPopup set to false, opening popup before acquiring token"
|
|
114
115
|
);
|
|
115
|
-
|
|
116
|
+
popupParams.popup = this.openSizedPopup(
|
|
116
117
|
"about:blank",
|
|
117
|
-
|
|
118
|
-
popupWindowAttributes
|
|
119
|
-
);
|
|
120
|
-
return this.acquireTokenPopupAsync(
|
|
121
|
-
request,
|
|
122
|
-
popupName,
|
|
123
|
-
popupWindowAttributes,
|
|
124
|
-
popup
|
|
118
|
+
popupParams
|
|
125
119
|
);
|
|
120
|
+
return this.acquireTokenPopupAsync(request, popupParams);
|
|
126
121
|
}
|
|
127
122
|
} catch (e) {
|
|
128
123
|
return Promise.reject(e);
|
|
@@ -138,13 +133,15 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
138
133
|
this.logger.verbose("logoutPopup called");
|
|
139
134
|
const validLogoutRequest =
|
|
140
135
|
this.initializeLogoutRequest(logoutRequest);
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
const popupParams: PopupParams = {
|
|
137
|
+
popupName: this.generateLogoutPopupName(validLogoutRequest),
|
|
138
|
+
popupWindowAttributes:
|
|
139
|
+
logoutRequest?.popupWindowAttributes || {},
|
|
140
|
+
popupWindowParent: logoutRequest?.popupWindowParent ?? window,
|
|
141
|
+
};
|
|
143
142
|
const authority = logoutRequest && logoutRequest.authority;
|
|
144
143
|
const mainWindowRedirectUri =
|
|
145
144
|
logoutRequest && logoutRequest.mainWindowRedirectUri;
|
|
146
|
-
const popupWindowAttributes =
|
|
147
|
-
logoutRequest?.popupWindowAttributes || {};
|
|
148
145
|
|
|
149
146
|
// asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.
|
|
150
147
|
if (this.config.system.asyncPopups) {
|
|
@@ -152,26 +149,21 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
152
149
|
// Passes on popup position and dimensions if in request
|
|
153
150
|
return this.logoutPopupAsync(
|
|
154
151
|
validLogoutRequest,
|
|
155
|
-
|
|
156
|
-
popupWindowAttributes,
|
|
152
|
+
popupParams,
|
|
157
153
|
authority,
|
|
158
|
-
undefined,
|
|
159
154
|
mainWindowRedirectUri
|
|
160
155
|
);
|
|
161
156
|
} else {
|
|
162
157
|
// asyncPopups flag is set to false. Opens popup before logging out.
|
|
163
158
|
this.logger.verbose("asyncPopup set to false, opening popup");
|
|
164
|
-
|
|
159
|
+
popupParams.popup = this.openSizedPopup(
|
|
165
160
|
"about:blank",
|
|
166
|
-
|
|
167
|
-
popupWindowAttributes
|
|
161
|
+
popupParams
|
|
168
162
|
);
|
|
169
163
|
return this.logoutPopupAsync(
|
|
170
164
|
validLogoutRequest,
|
|
171
|
-
|
|
172
|
-
popupWindowAttributes,
|
|
165
|
+
popupParams,
|
|
173
166
|
authority,
|
|
174
|
-
popup,
|
|
175
167
|
mainWindowRedirectUri
|
|
176
168
|
);
|
|
177
169
|
}
|
|
@@ -192,9 +184,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
192
184
|
*/
|
|
193
185
|
protected async acquireTokenPopupAsync(
|
|
194
186
|
request: PopupRequest,
|
|
195
|
-
|
|
196
|
-
popupWindowAttributes: PopupWindowAttributes,
|
|
197
|
-
popup?: Window | null
|
|
187
|
+
popupParams: PopupParams
|
|
198
188
|
): Promise<AuthenticationResult> {
|
|
199
189
|
this.logger.verbose("acquireTokenPopupAsync called");
|
|
200
190
|
const serverTelemetryManager = this.initializeServerTelemetryManager(
|
|
@@ -229,12 +219,13 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
229
219
|
this.logger,
|
|
230
220
|
this.performanceClient,
|
|
231
221
|
this.correlationId
|
|
232
|
-
)(
|
|
222
|
+
)({
|
|
233
223
|
serverTelemetryManager,
|
|
234
|
-
validRequest.authority,
|
|
235
|
-
validRequest.azureCloudOptions,
|
|
236
|
-
validRequest.
|
|
237
|
-
|
|
224
|
+
requestAuthority: validRequest.authority,
|
|
225
|
+
requestAzureCloudOptions: validRequest.azureCloudOptions,
|
|
226
|
+
requestExtraQueryParameters: validRequest.extraQueryParameters,
|
|
227
|
+
account: validRequest.account,
|
|
228
|
+
});
|
|
238
229
|
|
|
239
230
|
const isNativeBroker = NativeMessageHandler.isNativeAvailable(
|
|
240
231
|
this.config,
|
|
@@ -268,14 +259,9 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
268
259
|
);
|
|
269
260
|
|
|
270
261
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
271
|
-
const popupParameters: PopupParams = {
|
|
272
|
-
popup,
|
|
273
|
-
popupName,
|
|
274
|
-
popupWindowAttributes,
|
|
275
|
-
};
|
|
276
262
|
const popupWindow: Window = this.initiateAuthRequest(
|
|
277
263
|
navigateUrl,
|
|
278
|
-
|
|
264
|
+
popupParams
|
|
279
265
|
);
|
|
280
266
|
this.eventHandler.emitEvent(
|
|
281
267
|
EventType.POPUP_OPENED,
|
|
@@ -285,7 +271,10 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
285
271
|
);
|
|
286
272
|
|
|
287
273
|
// Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
288
|
-
const responseString = await this.monitorPopupForHash(
|
|
274
|
+
const responseString = await this.monitorPopupForHash(
|
|
275
|
+
popupWindow,
|
|
276
|
+
popupParams.popupWindowParent
|
|
277
|
+
);
|
|
289
278
|
|
|
290
279
|
const serverParams = invoke(
|
|
291
280
|
ResponseHandler.deserializeResponse,
|
|
@@ -355,10 +344,8 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
355
344
|
|
|
356
345
|
return result;
|
|
357
346
|
} catch (e) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
popup.close();
|
|
361
|
-
}
|
|
347
|
+
// Close the synchronous popup if an error is thrown before the window unload event is registered
|
|
348
|
+
popupParams.popup?.close();
|
|
362
349
|
|
|
363
350
|
if (e instanceof AuthError) {
|
|
364
351
|
(e as AuthError).setCorrelationId(this.correlationId);
|
|
@@ -380,10 +367,8 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
380
367
|
*/
|
|
381
368
|
protected async logoutPopupAsync(
|
|
382
369
|
validRequest: CommonEndSessionRequest,
|
|
383
|
-
|
|
384
|
-
popupWindowAttributes: PopupWindowAttributes,
|
|
370
|
+
popupParams: PopupParams,
|
|
385
371
|
requestAuthority?: string,
|
|
386
|
-
popup?: Window | null,
|
|
387
372
|
mainWindowRedirectUri?: string
|
|
388
373
|
): Promise<void> {
|
|
389
374
|
this.logger.verbose("logoutPopupAsync called");
|
|
@@ -408,12 +393,11 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
408
393
|
this.logger,
|
|
409
394
|
this.performanceClient,
|
|
410
395
|
this.correlationId
|
|
411
|
-
)(
|
|
396
|
+
)({
|
|
412
397
|
serverTelemetryManager,
|
|
413
|
-
requestAuthority,
|
|
414
|
-
undefined,
|
|
415
|
-
|
|
416
|
-
);
|
|
398
|
+
requestAuthority: requestAuthority,
|
|
399
|
+
account: validRequest.account || undefined,
|
|
400
|
+
});
|
|
417
401
|
|
|
418
402
|
try {
|
|
419
403
|
authClient.authority.endSessionEndpoint;
|
|
@@ -450,9 +434,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
450
434
|
);
|
|
451
435
|
}
|
|
452
436
|
|
|
453
|
-
|
|
454
|
-
popup.close();
|
|
455
|
-
}
|
|
437
|
+
popupParams.popup?.close();
|
|
456
438
|
|
|
457
439
|
return;
|
|
458
440
|
}
|
|
@@ -468,11 +450,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
468
450
|
);
|
|
469
451
|
|
|
470
452
|
// Open the popup window to requestUrl.
|
|
471
|
-
const popupWindow = this.openPopup(logoutUri,
|
|
472
|
-
popupName,
|
|
473
|
-
popupWindowAttributes,
|
|
474
|
-
popup,
|
|
475
|
-
});
|
|
453
|
+
const popupWindow = this.openPopup(logoutUri, popupParams);
|
|
476
454
|
this.eventHandler.emitEvent(
|
|
477
455
|
EventType.POPUP_OPENED,
|
|
478
456
|
InteractionType.Popup,
|
|
@@ -480,7 +458,10 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
480
458
|
null
|
|
481
459
|
);
|
|
482
460
|
|
|
483
|
-
await this.monitorPopupForHash(
|
|
461
|
+
await this.monitorPopupForHash(
|
|
462
|
+
popupWindow,
|
|
463
|
+
popupParams.popupWindowParent
|
|
464
|
+
).catch(() => {
|
|
484
465
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
485
466
|
});
|
|
486
467
|
|
|
@@ -509,10 +490,8 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
509
490
|
this.logger.verbose("No main window navigation requested");
|
|
510
491
|
}
|
|
511
492
|
} catch (e) {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
popup.close();
|
|
515
|
-
}
|
|
493
|
+
// Close the synchronous popup if an error is thrown before the window unload event is registered
|
|
494
|
+
popupParams.popup?.close();
|
|
516
495
|
|
|
517
496
|
if (e instanceof AuthError) {
|
|
518
497
|
(e as AuthError).setCorrelationId(this.correlationId);
|
|
@@ -562,7 +541,10 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
562
541
|
* @param popupWindow - window that is being monitored
|
|
563
542
|
* @param timeout - timeout for processing hash once popup is redirected back to application
|
|
564
543
|
*/
|
|
565
|
-
monitorPopupForHash(
|
|
544
|
+
monitorPopupForHash(
|
|
545
|
+
popupWindow: Window,
|
|
546
|
+
popupWindowParent: Window
|
|
547
|
+
): Promise<string> {
|
|
566
548
|
return new Promise<string>((resolve, reject) => {
|
|
567
549
|
this.logger.verbose(
|
|
568
550
|
"PopupHandler.monitorPopupForHash - polling started"
|
|
@@ -617,7 +599,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
617
599
|
resolve(responseString);
|
|
618
600
|
}, this.config.system.pollIntervalMilliseconds);
|
|
619
601
|
}).finally(() => {
|
|
620
|
-
this.cleanPopup(popupWindow);
|
|
602
|
+
this.cleanPopup(popupWindow, popupWindowParent);
|
|
621
603
|
});
|
|
622
604
|
}
|
|
623
605
|
|
|
@@ -649,11 +631,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
649
631
|
this.logger.verbosePii(
|
|
650
632
|
`Opening popup window to: ${urlNavigate}`
|
|
651
633
|
);
|
|
652
|
-
popupWindow = this.openSizedPopup(
|
|
653
|
-
urlNavigate,
|
|
654
|
-
popupParams.popupName,
|
|
655
|
-
popupParams.popupWindowAttributes
|
|
656
|
-
);
|
|
634
|
+
popupWindow = this.openSizedPopup(urlNavigate, popupParams);
|
|
657
635
|
}
|
|
658
636
|
|
|
659
637
|
// Popup will be null if popups are blocked
|
|
@@ -666,7 +644,10 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
666
644
|
popupWindow.focus();
|
|
667
645
|
}
|
|
668
646
|
this.currentWindow = popupWindow;
|
|
669
|
-
|
|
647
|
+
popupParams.popupWindowParent.addEventListener(
|
|
648
|
+
"beforeunload",
|
|
649
|
+
this.unloadWindow
|
|
650
|
+
);
|
|
670
651
|
|
|
671
652
|
return popupWindow;
|
|
672
653
|
} catch (e) {
|
|
@@ -689,25 +670,28 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
689
670
|
*/
|
|
690
671
|
openSizedPopup(
|
|
691
672
|
urlNavigate: string,
|
|
692
|
-
popupName:
|
|
693
|
-
popupWindowAttributes: PopupWindowAttributes
|
|
673
|
+
{ popupName, popupWindowAttributes, popupWindowParent }: PopupParams
|
|
694
674
|
): Window | null {
|
|
695
675
|
/**
|
|
696
676
|
* adding winLeft and winTop to account for dual monitor
|
|
697
677
|
* using screenLeft and screenTop for IE8 and earlier
|
|
698
678
|
*/
|
|
699
|
-
const winLeft =
|
|
700
|
-
|
|
679
|
+
const winLeft = popupWindowParent.screenLeft
|
|
680
|
+
? popupWindowParent.screenLeft
|
|
681
|
+
: popupWindowParent.screenX;
|
|
682
|
+
const winTop = popupWindowParent.screenTop
|
|
683
|
+
? popupWindowParent.screenTop
|
|
684
|
+
: popupWindowParent.screenY;
|
|
701
685
|
/**
|
|
702
686
|
* window.innerWidth displays browser window"s height and width excluding toolbars
|
|
703
687
|
* using document.documentElement.clientWidth for IE8 and earlier
|
|
704
688
|
*/
|
|
705
689
|
const winWidth =
|
|
706
|
-
|
|
690
|
+
popupWindowParent.innerWidth ||
|
|
707
691
|
document.documentElement.clientWidth ||
|
|
708
692
|
document.body.clientWidth;
|
|
709
693
|
const winHeight =
|
|
710
|
-
|
|
694
|
+
popupWindowParent.innerHeight ||
|
|
711
695
|
document.documentElement.clientHeight ||
|
|
712
696
|
document.body.clientHeight;
|
|
713
697
|
|
|
@@ -750,7 +734,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
750
734
|
);
|
|
751
735
|
}
|
|
752
736
|
|
|
753
|
-
return
|
|
737
|
+
return popupWindowParent.open(
|
|
754
738
|
urlNavigate,
|
|
755
739
|
popupName,
|
|
756
740
|
`width=${width}, height=${height}, top=${top}, left=${left}, scrollbars=yes`
|
|
@@ -775,13 +759,15 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
775
759
|
* Closes popup, removes any state vars created during popup calls.
|
|
776
760
|
* @param popupWindow
|
|
777
761
|
*/
|
|
778
|
-
cleanPopup(popupWindow
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
762
|
+
cleanPopup(popupWindow: Window, popupWindowParent: Window): void {
|
|
763
|
+
// Close window.
|
|
764
|
+
popupWindow.close();
|
|
765
|
+
|
|
783
766
|
// Remove window unload function
|
|
784
|
-
|
|
767
|
+
popupWindowParent.removeEventListener(
|
|
768
|
+
"beforeunload",
|
|
769
|
+
this.unloadWindow
|
|
770
|
+
);
|
|
785
771
|
|
|
786
772
|
// Interaction is completed - remove interaction status.
|
|
787
773
|
this.browserStorage.setInteractionInProgress(false);
|
|
@@ -22,32 +22,32 @@ import {
|
|
|
22
22
|
ServerResponseType,
|
|
23
23
|
UrlUtils,
|
|
24
24
|
InProgressPerformanceEvent,
|
|
25
|
-
} from "@azure/msal-common";
|
|
26
|
-
import { StandardInteractionClient } from "./StandardInteractionClient";
|
|
25
|
+
} from "@azure/msal-common/browser";
|
|
26
|
+
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
27
27
|
import {
|
|
28
28
|
ApiId,
|
|
29
29
|
InteractionType,
|
|
30
30
|
TemporaryCacheKeys,
|
|
31
|
-
} from "../utils/BrowserConstants";
|
|
32
|
-
import { RedirectHandler } from "../interaction_handler/RedirectHandler";
|
|
33
|
-
import * as BrowserUtils from "../utils/BrowserUtils";
|
|
34
|
-
import { EndSessionRequest } from "../request/EndSessionRequest";
|
|
35
|
-
import { EventType } from "../event/EventType";
|
|
36
|
-
import { NavigationOptions } from "../navigation/NavigationOptions";
|
|
31
|
+
} from "../utils/BrowserConstants.js";
|
|
32
|
+
import { RedirectHandler } from "../interaction_handler/RedirectHandler.js";
|
|
33
|
+
import * as BrowserUtils from "../utils/BrowserUtils.js";
|
|
34
|
+
import { EndSessionRequest } from "../request/EndSessionRequest.js";
|
|
35
|
+
import { EventType } from "../event/EventType.js";
|
|
36
|
+
import { NavigationOptions } from "../navigation/NavigationOptions.js";
|
|
37
37
|
import {
|
|
38
38
|
createBrowserAuthError,
|
|
39
39
|
BrowserAuthErrorCodes,
|
|
40
|
-
} from "../error/BrowserAuthError";
|
|
41
|
-
import { RedirectRequest } from "../request/RedirectRequest";
|
|
42
|
-
import { NativeInteractionClient } from "./NativeInteractionClient";
|
|
43
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
|
|
44
|
-
import { BrowserConfiguration } from "../config/Configuration";
|
|
45
|
-
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
46
|
-
import { EventHandler } from "../event/EventHandler";
|
|
47
|
-
import { INavigationClient } from "../navigation/INavigationClient";
|
|
48
|
-
import { EventError } from "../event/EventMessage";
|
|
49
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
50
|
-
import * as ResponseHandler from "../response/ResponseHandler";
|
|
40
|
+
} from "../error/BrowserAuthError.js";
|
|
41
|
+
import { RedirectRequest } from "../request/RedirectRequest.js";
|
|
42
|
+
import { NativeInteractionClient } from "./NativeInteractionClient.js";
|
|
43
|
+
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
44
|
+
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
45
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
46
|
+
import { EventHandler } from "../event/EventHandler.js";
|
|
47
|
+
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
48
|
+
import { EventError } from "../event/EventMessage.js";
|
|
49
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
50
|
+
import * as ResponseHandler from "../response/ResponseHandler.js";
|
|
51
51
|
|
|
52
52
|
export class RedirectClient extends StandardInteractionClient {
|
|
53
53
|
protected nativeStorage: BrowserCacheManager;
|
|
@@ -134,12 +134,13 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
134
134
|
this.logger,
|
|
135
135
|
this.performanceClient,
|
|
136
136
|
this.correlationId
|
|
137
|
-
)(
|
|
137
|
+
)({
|
|
138
138
|
serverTelemetryManager,
|
|
139
|
-
validRequest.authority,
|
|
140
|
-
validRequest.azureCloudOptions,
|
|
141
|
-
validRequest.
|
|
142
|
-
|
|
139
|
+
requestAuthority: validRequest.authority,
|
|
140
|
+
requestAzureCloudOptions: validRequest.azureCloudOptions,
|
|
141
|
+
requestExtraQueryParameters: validRequest.extraQueryParameters,
|
|
142
|
+
account: validRequest.account,
|
|
143
|
+
});
|
|
143
144
|
|
|
144
145
|
// Create redirect interaction handler.
|
|
145
146
|
const interactionHandler = new RedirectHandler(
|
|
@@ -477,7 +478,7 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
477
478
|
this.logger,
|
|
478
479
|
this.performanceClient,
|
|
479
480
|
this.correlationId
|
|
480
|
-
)(serverTelemetryManager, currentAuthority);
|
|
481
|
+
)({ serverTelemetryManager, requestAuthority: currentAuthority });
|
|
481
482
|
|
|
482
483
|
ThrottlingUtils.removeThrottle(
|
|
483
484
|
this.browserStorage,
|
|
@@ -528,12 +529,13 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
528
529
|
this.logger,
|
|
529
530
|
this.performanceClient,
|
|
530
531
|
this.correlationId
|
|
531
|
-
)(
|
|
532
|
+
)({
|
|
532
533
|
serverTelemetryManager,
|
|
533
|
-
logoutRequest && logoutRequest.authority,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
534
|
+
requestAuthority: logoutRequest && logoutRequest.authority,
|
|
535
|
+
requestExtraQueryParameters:
|
|
536
|
+
logoutRequest?.extraQueryParameters,
|
|
537
|
+
account: (logoutRequest && logoutRequest.account) || undefined,
|
|
538
|
+
});
|
|
537
539
|
|
|
538
540
|
if (authClient.authority.protocolMode === ProtocolMode.OIDC) {
|
|
539
541
|
try {
|
|
@@ -11,23 +11,23 @@ import {
|
|
|
11
11
|
IPerformanceClient,
|
|
12
12
|
PerformanceEvents,
|
|
13
13
|
invokeAsync,
|
|
14
|
-
} from "@azure/msal-common";
|
|
15
|
-
import { StandardInteractionClient } from "./StandardInteractionClient";
|
|
16
|
-
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
|
|
17
|
-
import { BrowserConfiguration } from "../config/Configuration";
|
|
18
|
-
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
19
|
-
import { EventHandler } from "../event/EventHandler";
|
|
20
|
-
import { INavigationClient } from "../navigation/INavigationClient";
|
|
14
|
+
} from "@azure/msal-common/browser";
|
|
15
|
+
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
16
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
17
|
+
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
18
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
19
|
+
import { EventHandler } from "../event/EventHandler.js";
|
|
20
|
+
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
21
21
|
import {
|
|
22
22
|
createBrowserAuthError,
|
|
23
23
|
BrowserAuthErrorCodes,
|
|
24
|
-
} from "../error/BrowserAuthError";
|
|
25
|
-
import { InteractionType, ApiId } from "../utils/BrowserConstants";
|
|
26
|
-
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest";
|
|
27
|
-
import { HybridSpaAuthorizationCodeClient } from "./HybridSpaAuthorizationCodeClient";
|
|
28
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
|
|
29
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
30
|
-
import { InteractionHandler } from "../interaction_handler/InteractionHandler";
|
|
24
|
+
} from "../error/BrowserAuthError.js";
|
|
25
|
+
import { InteractionType, ApiId } from "../utils/BrowserConstants.js";
|
|
26
|
+
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
|
|
27
|
+
import { HybridSpaAuthorizationCodeClient } from "./HybridSpaAuthorizationCodeClient.js";
|
|
28
|
+
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
29
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
30
|
+
import { InteractionHandler } from "../interaction_handler/InteractionHandler.js";
|
|
31
31
|
|
|
32
32
|
export class SilentAuthCodeClient extends StandardInteractionClient {
|
|
33
33
|
private apiId: ApiId;
|
|
@@ -99,12 +99,13 @@ export class SilentAuthCodeClient extends StandardInteractionClient {
|
|
|
99
99
|
this.logger,
|
|
100
100
|
this.performanceClient,
|
|
101
101
|
request.correlationId
|
|
102
|
-
)(
|
|
102
|
+
)({
|
|
103
103
|
serverTelemetryManager,
|
|
104
|
-
silentRequest.authority,
|
|
105
|
-
silentRequest.azureCloudOptions,
|
|
106
|
-
silentRequest.
|
|
107
|
-
|
|
104
|
+
requestAuthority: silentRequest.authority,
|
|
105
|
+
requestAzureCloudOptions: silentRequest.azureCloudOptions,
|
|
106
|
+
requestExtraQueryParameters: silentRequest.extraQueryParameters,
|
|
107
|
+
account: silentRequest.account,
|
|
108
|
+
});
|
|
108
109
|
const authClient: HybridSpaAuthorizationCodeClient =
|
|
109
110
|
new HybridSpaAuthorizationCodeClient(clientConfig);
|
|
110
111
|
this.logger.verbose("Auth code client created");
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { StandardInteractionClient } from "./StandardInteractionClient";
|
|
6
|
+
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
7
7
|
import {
|
|
8
8
|
CommonSilentFlowRequest,
|
|
9
9
|
SilentFlowClient,
|
|
10
10
|
PerformanceEvents,
|
|
11
11
|
invokeAsync,
|
|
12
|
-
} from "@azure/msal-common";
|
|
13
|
-
import { ApiId } from "../utils/BrowserConstants";
|
|
12
|
+
} from "@azure/msal-common/browser";
|
|
13
|
+
import { ApiId } from "../utils/BrowserConstants.js";
|
|
14
14
|
import {
|
|
15
15
|
BrowserAuthError,
|
|
16
16
|
BrowserAuthErrorCodes,
|
|
17
|
-
} from "../error/BrowserAuthError";
|
|
18
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
19
|
-
import { ClearCacheRequest } from "../request/ClearCacheRequest";
|
|
17
|
+
} from "../error/BrowserAuthError.js";
|
|
18
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
19
|
+
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
|
|
20
20
|
|
|
21
21
|
export class SilentCacheClient extends StandardInteractionClient {
|
|
22
22
|
/**
|
|
@@ -41,12 +41,12 @@ export class SilentCacheClient extends StandardInteractionClient {
|
|
|
41
41
|
this.logger,
|
|
42
42
|
this.performanceClient,
|
|
43
43
|
this.correlationId
|
|
44
|
-
)(
|
|
44
|
+
)({
|
|
45
45
|
serverTelemetryManager,
|
|
46
|
-
silentRequest.authority,
|
|
47
|
-
silentRequest.azureCloudOptions,
|
|
48
|
-
silentRequest.account
|
|
49
|
-
);
|
|
46
|
+
requestAuthority: silentRequest.authority,
|
|
47
|
+
requestAzureCloudOptions: silentRequest.azureCloudOptions,
|
|
48
|
+
account: silentRequest.account,
|
|
49
|
+
});
|
|
50
50
|
const silentAuthClient = new SilentFlowClient(
|
|
51
51
|
clientConfig,
|
|
52
52
|
this.performanceClient
|