@azure/msal-browser 3.23.0 → 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
|
@@ -15,33 +15,33 @@ import {
|
|
|
15
15
|
PerformanceEvents,
|
|
16
16
|
invokeAsync,
|
|
17
17
|
invoke,
|
|
18
|
-
} from "@azure/msal-common";
|
|
19
|
-
import { StandardInteractionClient } from "./StandardInteractionClient";
|
|
20
|
-
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
|
|
21
|
-
import { BrowserConfiguration } from "../config/Configuration";
|
|
22
|
-
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
23
|
-
import { EventHandler } from "../event/EventHandler";
|
|
24
|
-
import { INavigationClient } from "../navigation/INavigationClient";
|
|
18
|
+
} from "@azure/msal-common/browser";
|
|
19
|
+
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
20
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
21
|
+
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
22
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
23
|
+
import { EventHandler } from "../event/EventHandler.js";
|
|
24
|
+
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
25
25
|
import {
|
|
26
26
|
createBrowserAuthError,
|
|
27
27
|
BrowserAuthErrorCodes,
|
|
28
|
-
} from "../error/BrowserAuthError";
|
|
28
|
+
} from "../error/BrowserAuthError.js";
|
|
29
29
|
import {
|
|
30
30
|
InteractionType,
|
|
31
31
|
ApiId,
|
|
32
32
|
BrowserConstants,
|
|
33
|
-
} from "../utils/BrowserConstants";
|
|
33
|
+
} from "../utils/BrowserConstants.js";
|
|
34
34
|
import {
|
|
35
35
|
initiateAuthRequest,
|
|
36
36
|
monitorIframeForHash,
|
|
37
|
-
} from "../interaction_handler/SilentHandler";
|
|
38
|
-
import { SsoSilentRequest } from "../request/SsoSilentRequest";
|
|
39
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
|
|
40
|
-
import { NativeInteractionClient } from "./NativeInteractionClient";
|
|
41
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
42
|
-
import { InteractionHandler } from "../interaction_handler/InteractionHandler";
|
|
43
|
-
import * as BrowserUtils from "../utils/BrowserUtils";
|
|
44
|
-
import * as ResponseHandler from "../response/ResponseHandler";
|
|
37
|
+
} from "../interaction_handler/SilentHandler.js";
|
|
38
|
+
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
|
|
39
|
+
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
40
|
+
import { NativeInteractionClient } from "./NativeInteractionClient.js";
|
|
41
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
42
|
+
import { InteractionHandler } from "../interaction_handler/InteractionHandler.js";
|
|
43
|
+
import * as BrowserUtils from "../utils/BrowserUtils.js";
|
|
44
|
+
import * as ResponseHandler from "../response/ResponseHandler.js";
|
|
45
45
|
|
|
46
46
|
export class SilentIframeClient extends StandardInteractionClient {
|
|
47
47
|
protected apiId: ApiId;
|
|
@@ -137,12 +137,13 @@ export class SilentIframeClient extends StandardInteractionClient {
|
|
|
137
137
|
this.logger,
|
|
138
138
|
this.performanceClient,
|
|
139
139
|
request.correlationId
|
|
140
|
-
)(
|
|
140
|
+
)({
|
|
141
141
|
serverTelemetryManager,
|
|
142
|
-
silentRequest.authority,
|
|
143
|
-
silentRequest.azureCloudOptions,
|
|
144
|
-
silentRequest.
|
|
145
|
-
|
|
142
|
+
requestAuthority: silentRequest.authority,
|
|
143
|
+
requestAzureCloudOptions: silentRequest.azureCloudOptions,
|
|
144
|
+
requestExtraQueryParameters: silentRequest.extraQueryParameters,
|
|
145
|
+
account: silentRequest.account,
|
|
146
|
+
});
|
|
146
147
|
|
|
147
148
|
return await invokeAsync(
|
|
148
149
|
this.silentTokenHelper.bind(this),
|
|
@@ -3,7 +3,7 @@
|
|
|
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
|
ServerTelemetryManager,
|
|
@@ -13,14 +13,15 @@ import {
|
|
|
13
13
|
PerformanceEvents,
|
|
14
14
|
invokeAsync,
|
|
15
15
|
AccountInfo,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
StringDict,
|
|
17
|
+
} from "@azure/msal-common/browser";
|
|
18
|
+
import { ApiId } from "../utils/BrowserConstants.js";
|
|
18
19
|
import {
|
|
19
20
|
createBrowserAuthError,
|
|
20
21
|
BrowserAuthErrorCodes,
|
|
21
|
-
} from "../error/BrowserAuthError";
|
|
22
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
23
|
-
import { initializeBaseRequest } from "../request/RequestHelpers";
|
|
22
|
+
} from "../error/BrowserAuthError.js";
|
|
23
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
24
|
+
import { initializeBaseRequest } from "../request/RequestHelpers.js";
|
|
24
25
|
|
|
25
26
|
export class SilentRefreshClient extends StandardInteractionClient {
|
|
26
27
|
/**
|
|
@@ -58,12 +59,12 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
58
59
|
ApiId.acquireTokenSilent_silentFlow
|
|
59
60
|
);
|
|
60
61
|
|
|
61
|
-
const refreshTokenClient = await this.createRefreshTokenClient(
|
|
62
|
+
const refreshTokenClient = await this.createRefreshTokenClient({
|
|
62
63
|
serverTelemetryManager,
|
|
63
|
-
silentRequest.authority,
|
|
64
|
-
silentRequest.azureCloudOptions,
|
|
65
|
-
silentRequest.account
|
|
66
|
-
);
|
|
64
|
+
authorityUrl: silentRequest.authority,
|
|
65
|
+
azureCloudOptions: silentRequest.azureCloudOptions,
|
|
66
|
+
account: silentRequest.account,
|
|
67
|
+
});
|
|
67
68
|
// Send request to renew token. Auth module will throw errors if token cannot be renewed.
|
|
68
69
|
return invokeAsync(
|
|
69
70
|
refreshTokenClient.acquireTokenByRefreshToken.bind(
|
|
@@ -94,15 +95,21 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
94
95
|
|
|
95
96
|
/**
|
|
96
97
|
* Creates a Refresh Client with the given authority, or the default authority.
|
|
97
|
-
* @param
|
|
98
|
-
*
|
|
98
|
+
* @param params {
|
|
99
|
+
* serverTelemetryManager: ServerTelemetryManager;
|
|
100
|
+
* authorityUrl?: string;
|
|
101
|
+
* azureCloudOptions?: AzureCloudOptions;
|
|
102
|
+
* extraQueryParams?: StringDict;
|
|
103
|
+
* account?: AccountInfo;
|
|
104
|
+
* }
|
|
99
105
|
*/
|
|
100
|
-
protected async createRefreshTokenClient(
|
|
101
|
-
serverTelemetryManager: ServerTelemetryManager
|
|
102
|
-
authorityUrl?: string
|
|
103
|
-
azureCloudOptions?: AzureCloudOptions
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
protected async createRefreshTokenClient(params: {
|
|
107
|
+
serverTelemetryManager: ServerTelemetryManager;
|
|
108
|
+
authorityUrl?: string;
|
|
109
|
+
azureCloudOptions?: AzureCloudOptions;
|
|
110
|
+
extraQueryParameters?: StringDict;
|
|
111
|
+
account?: AccountInfo;
|
|
112
|
+
}): Promise<RefreshTokenClient> {
|
|
106
113
|
// Create auth module.
|
|
107
114
|
const clientConfig = await invokeAsync(
|
|
108
115
|
this.getClientConfiguration.bind(this),
|
|
@@ -110,7 +117,13 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
110
117
|
this.logger,
|
|
111
118
|
this.performanceClient,
|
|
112
119
|
this.correlationId
|
|
113
|
-
)(
|
|
120
|
+
)({
|
|
121
|
+
serverTelemetryManager: params.serverTelemetryManager,
|
|
122
|
+
requestAuthority: params.authorityUrl,
|
|
123
|
+
requestAzureCloudOptions: params.azureCloudOptions,
|
|
124
|
+
requestExtraQueryParameters: params.extraQueryParameters,
|
|
125
|
+
account: params.account,
|
|
126
|
+
});
|
|
114
127
|
return new RefreshTokenClient(clientConfig, this.performanceClient);
|
|
115
128
|
}
|
|
116
129
|
}
|
|
@@ -19,20 +19,24 @@ import {
|
|
|
19
19
|
PerformanceEvents,
|
|
20
20
|
invokeAsync,
|
|
21
21
|
BaseAuthRequest,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
22
|
+
StringDict,
|
|
23
|
+
} from "@azure/msal-common/browser";
|
|
24
|
+
import { BaseInteractionClient } from "./BaseInteractionClient.js";
|
|
25
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
26
|
+
import {
|
|
27
|
+
BrowserConstants,
|
|
28
|
+
InteractionType,
|
|
29
|
+
} from "../utils/BrowserConstants.js";
|
|
30
|
+
import { version } from "../packageMetadata.js";
|
|
31
|
+
import { BrowserStateObject } from "../utils/BrowserProtocolUtils.js";
|
|
32
|
+
import { EndSessionRequest } from "../request/EndSessionRequest.js";
|
|
33
|
+
import * as BrowserUtils from "../utils/BrowserUtils.js";
|
|
34
|
+
import { RedirectRequest } from "../request/RedirectRequest.js";
|
|
35
|
+
import { PopupRequest } from "../request/PopupRequest.js";
|
|
36
|
+
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
|
|
37
|
+
import { generatePkceCodes } from "../crypto/PkceGenerator.js";
|
|
38
|
+
import { createNewGuid } from "../crypto/BrowserCrypto.js";
|
|
39
|
+
import { initializeBaseRequest } from "../request/RequestHelpers.js";
|
|
36
40
|
|
|
37
41
|
/**
|
|
38
42
|
* Defines the class structure and helper functions used by the "standard", non-brokered auth flows (popup, redirect, silent (RT), silent (iframe))
|
|
@@ -199,15 +203,21 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
199
203
|
|
|
200
204
|
/**
|
|
201
205
|
* Creates an Authorization Code Client with the given authority, or the default authority.
|
|
202
|
-
* @param
|
|
203
|
-
*
|
|
206
|
+
* @param params {
|
|
207
|
+
* serverTelemetryManager: ServerTelemetryManager;
|
|
208
|
+
* authorityUrl?: string;
|
|
209
|
+
* requestAzureCloudOptions?: AzureCloudOptions;
|
|
210
|
+
* requestExtraQueryParameters?: StringDict;
|
|
211
|
+
* account?: AccountInfo;
|
|
212
|
+
* }
|
|
204
213
|
*/
|
|
205
|
-
protected async createAuthCodeClient(
|
|
206
|
-
serverTelemetryManager: ServerTelemetryManager
|
|
207
|
-
|
|
208
|
-
requestAzureCloudOptions?: AzureCloudOptions
|
|
209
|
-
|
|
210
|
-
|
|
214
|
+
protected async createAuthCodeClient(params: {
|
|
215
|
+
serverTelemetryManager: ServerTelemetryManager;
|
|
216
|
+
requestAuthority?: string;
|
|
217
|
+
requestAzureCloudOptions?: AzureCloudOptions;
|
|
218
|
+
requestExtraQueryParameters?: StringDict;
|
|
219
|
+
account?: AccountInfo;
|
|
220
|
+
}): Promise<AuthorizationCodeClient> {
|
|
211
221
|
this.performanceClient.addQueueMeasurement(
|
|
212
222
|
PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,
|
|
213
223
|
this.correlationId
|
|
@@ -219,12 +229,8 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
219
229
|
this.logger,
|
|
220
230
|
this.performanceClient,
|
|
221
231
|
this.correlationId
|
|
222
|
-
)(
|
|
223
|
-
|
|
224
|
-
authorityUrl,
|
|
225
|
-
requestAzureCloudOptions,
|
|
226
|
-
account
|
|
227
|
-
);
|
|
232
|
+
)(params);
|
|
233
|
+
|
|
228
234
|
return new AuthorizationCodeClient(
|
|
229
235
|
clientConfig,
|
|
230
236
|
this.performanceClient
|
|
@@ -233,16 +239,29 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
233
239
|
|
|
234
240
|
/**
|
|
235
241
|
* Creates a Client Configuration object with the given request authority, or the default authority.
|
|
236
|
-
* @param
|
|
237
|
-
*
|
|
238
|
-
*
|
|
242
|
+
* @param params {
|
|
243
|
+
* serverTelemetryManager: ServerTelemetryManager;
|
|
244
|
+
* requestAuthority?: string;
|
|
245
|
+
* requestAzureCloudOptions?: AzureCloudOptions;
|
|
246
|
+
* requestExtraQueryParameters?: boolean;
|
|
247
|
+
* account?: AccountInfo;
|
|
248
|
+
* }
|
|
239
249
|
*/
|
|
240
|
-
protected async getClientConfiguration(
|
|
241
|
-
serverTelemetryManager: ServerTelemetryManager
|
|
242
|
-
requestAuthority?: string
|
|
243
|
-
requestAzureCloudOptions?: AzureCloudOptions
|
|
244
|
-
|
|
245
|
-
|
|
250
|
+
protected async getClientConfiguration(params: {
|
|
251
|
+
serverTelemetryManager: ServerTelemetryManager;
|
|
252
|
+
requestAuthority?: string;
|
|
253
|
+
requestAzureCloudOptions?: AzureCloudOptions;
|
|
254
|
+
requestExtraQueryParameters?: StringDict;
|
|
255
|
+
account?: AccountInfo;
|
|
256
|
+
}): Promise<ClientConfiguration> {
|
|
257
|
+
const {
|
|
258
|
+
serverTelemetryManager,
|
|
259
|
+
requestAuthority,
|
|
260
|
+
requestAzureCloudOptions,
|
|
261
|
+
requestExtraQueryParameters,
|
|
262
|
+
account,
|
|
263
|
+
} = params;
|
|
264
|
+
|
|
246
265
|
this.performanceClient.addQueueMeasurement(
|
|
247
266
|
PerformanceEvents.StandardInteractionClientGetClientConfiguration,
|
|
248
267
|
this.correlationId
|
|
@@ -253,7 +272,12 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
253
272
|
this.logger,
|
|
254
273
|
this.performanceClient,
|
|
255
274
|
this.correlationId
|
|
256
|
-
)(
|
|
275
|
+
)({
|
|
276
|
+
requestAuthority,
|
|
277
|
+
requestAzureCloudOptions,
|
|
278
|
+
requestExtraQueryParameters,
|
|
279
|
+
account,
|
|
280
|
+
});
|
|
257
281
|
const logger = this.config.system.loggerOptions;
|
|
258
282
|
|
|
259
283
|
return {
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
invokeAsync,
|
|
16
16
|
CcsCredentialType,
|
|
17
17
|
ServerAuthorizationCodeResponse,
|
|
18
|
-
} from "@azure/msal-common";
|
|
18
|
+
} from "@azure/msal-common/browser";
|
|
19
19
|
|
|
20
|
-
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
20
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
21
21
|
import {
|
|
22
22
|
createBrowserAuthError,
|
|
23
23
|
BrowserAuthErrorCodes,
|
|
24
|
-
} from "../error/BrowserAuthError";
|
|
25
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
26
|
-
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
|
|
24
|
+
} from "../error/BrowserAuthError.js";
|
|
25
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
26
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Abstract class which defines operations for a browser interaction handling class.
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
invokeAsync,
|
|
16
16
|
PerformanceEvents,
|
|
17
17
|
ServerAuthorizationCodeResponse,
|
|
18
|
-
} from "@azure/msal-common";
|
|
18
|
+
} from "@azure/msal-common/browser";
|
|
19
19
|
import {
|
|
20
20
|
createBrowserAuthError,
|
|
21
21
|
BrowserAuthErrorCodes,
|
|
22
|
-
} from "../error/BrowserAuthError";
|
|
23
|
-
import { ApiId, TemporaryCacheKeys } from "../utils/BrowserConstants";
|
|
24
|
-
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
25
|
-
import { INavigationClient } from "../navigation/INavigationClient";
|
|
26
|
-
import { NavigationOptions } from "../navigation/NavigationOptions";
|
|
27
|
-
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
22
|
+
} from "../error/BrowserAuthError.js";
|
|
23
|
+
import { ApiId, TemporaryCacheKeys } from "../utils/BrowserConstants.js";
|
|
24
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
25
|
+
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
26
|
+
import { NavigationOptions } from "../navigation/NavigationOptions.js";
|
|
27
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
28
28
|
|
|
29
29
|
export type RedirectParams = {
|
|
30
30
|
navigationClient: INavigationClient;
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
invokeAsync,
|
|
11
11
|
invoke,
|
|
12
12
|
ServerResponseType,
|
|
13
|
-
} from "@azure/msal-common";
|
|
13
|
+
} from "@azure/msal-common/browser";
|
|
14
14
|
import {
|
|
15
15
|
createBrowserAuthError,
|
|
16
16
|
BrowserAuthErrorCodes,
|
|
17
|
-
} from "../error/BrowserAuthError";
|
|
18
|
-
import { DEFAULT_IFRAME_TIMEOUT_MS } from "../config/Configuration";
|
|
17
|
+
} from "../error/BrowserAuthError.js";
|
|
18
|
+
import { DEFAULT_IFRAME_TIMEOUT_MS } from "../config/Configuration.js";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Creates a hidden iframe to given URL using user-requested scopes as an id.
|
package/src/naa/AuthResult.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { AccountInfo } from "./AccountInfo";
|
|
7
|
-
import { TokenResponse } from "./TokenResponse";
|
|
6
|
+
import { AccountInfo } from "./AccountInfo.js";
|
|
7
|
+
import { TokenResponse } from "./TokenResponse.js";
|
|
8
8
|
|
|
9
9
|
export type AuthResult = {
|
|
10
10
|
token: TokenResponse;
|
package/src/naa/BridgeError.ts
CHANGED
package/src/naa/BridgeProxy.ts
CHANGED
|
@@ -3,19 +3,24 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { AuthBridge, AuthBridgeResponse } from "./AuthBridge";
|
|
7
|
-
import { AuthResult } from "./AuthResult";
|
|
8
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
9
|
-
import { AccountContext } from "./BridgeAccountContext";
|
|
10
|
-
import { BridgeError } from "./BridgeError";
|
|
11
|
-
import { BridgeRequest } from "./BridgeRequest";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
6
|
+
import { AuthBridge, AuthBridgeResponse } from "./AuthBridge.js";
|
|
7
|
+
import { AuthResult } from "./AuthResult.js";
|
|
8
|
+
import { BridgeCapabilities } from "./BridgeCapabilities.js";
|
|
9
|
+
import { AccountContext } from "./BridgeAccountContext.js";
|
|
10
|
+
import { BridgeError } from "./BridgeError.js";
|
|
11
|
+
import { BridgeRequest } from "./BridgeRequest.js";
|
|
12
|
+
import {
|
|
13
|
+
BridgeRequestEnvelope,
|
|
14
|
+
BridgeMethods,
|
|
15
|
+
} from "./BridgeRequestEnvelope.js";
|
|
16
|
+
import { BridgeResponseEnvelope } from "./BridgeResponseEnvelope.js";
|
|
17
|
+
import { BridgeStatusCode } from "./BridgeStatusCode.js";
|
|
18
|
+
import { IBridgeProxy } from "./IBridgeProxy.js";
|
|
19
|
+
import { InitContext } from "./InitContext.js";
|
|
20
|
+
import { TokenRequest } from "./TokenRequest.js";
|
|
21
|
+
import * as BrowserCrypto from "../crypto/BrowserCrypto.js";
|
|
22
|
+
import { BrowserConstants } from "../utils/BrowserConstants.js";
|
|
23
|
+
import { version } from "../packageMetadata.js";
|
|
19
24
|
|
|
20
25
|
declare global {
|
|
21
26
|
interface Window {
|
|
@@ -77,12 +82,8 @@ export class BridgeProxy implements IBridgeProxy {
|
|
|
77
82
|
|
|
78
83
|
const bridgeResponse = await new Promise<BridgeResponseEnvelope>(
|
|
79
84
|
(resolve, reject) => {
|
|
80
|
-
const message
|
|
81
|
-
|
|
82
|
-
method: "GetInitContext",
|
|
83
|
-
requestId: BrowserCrypto.createNewGuid(),
|
|
84
|
-
sendTime: Date.now(),
|
|
85
|
-
};
|
|
85
|
+
const message = BridgeProxy.buildRequest("GetInitContext");
|
|
86
|
+
|
|
86
87
|
const request: BridgeRequest = {
|
|
87
88
|
requestId: message.requestId,
|
|
88
89
|
method: message.method,
|
|
@@ -144,6 +145,21 @@ export class BridgeProxy implements IBridgeProxy {
|
|
|
144
145
|
return this.accountContext ? this.accountContext : null;
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
private static buildRequest(
|
|
149
|
+
method: BridgeMethods,
|
|
150
|
+
requestParams?: Partial<BridgeRequestEnvelope>
|
|
151
|
+
): BridgeRequestEnvelope {
|
|
152
|
+
return {
|
|
153
|
+
messageType: "NestedAppAuthRequest",
|
|
154
|
+
method: method,
|
|
155
|
+
requestId: BrowserCrypto.createNewGuid(),
|
|
156
|
+
sendTime: Date.now(),
|
|
157
|
+
clientLibrary: BrowserConstants.MSAL_SKU,
|
|
158
|
+
clientLibraryVersion: version,
|
|
159
|
+
...requestParams,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
147
163
|
/**
|
|
148
164
|
* A method used to send a request to the bridge
|
|
149
165
|
* @param request A token request
|
|
@@ -153,13 +169,7 @@ export class BridgeProxy implements IBridgeProxy {
|
|
|
153
169
|
method: BridgeMethods,
|
|
154
170
|
requestParams?: Partial<BridgeRequestEnvelope>
|
|
155
171
|
): Promise<BridgeResponseEnvelope> {
|
|
156
|
-
const message
|
|
157
|
-
messageType: "NestedAppAuthRequest",
|
|
158
|
-
method: method,
|
|
159
|
-
requestId: BrowserCrypto.createNewGuid(),
|
|
160
|
-
sendTime: Date.now(),
|
|
161
|
-
...requestParams,
|
|
162
|
-
};
|
|
172
|
+
const message = BridgeProxy.buildRequest(method, requestParams);
|
|
163
173
|
|
|
164
174
|
const promise = new Promise<BridgeResponseEnvelope>(
|
|
165
175
|
(resolve, reject) => {
|
package/src/naa/BridgeRequest.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { BridgeError } from "./BridgeError";
|
|
7
|
-
import { TokenResponse } from "./TokenResponse";
|
|
8
|
-
import { AccountInfo } from "./AccountInfo";
|
|
9
|
-
import { InitContext } from "./InitContext";
|
|
6
|
+
import { BridgeError } from "./BridgeError.js";
|
|
7
|
+
import { TokenResponse } from "./TokenResponse.js";
|
|
8
|
+
import { AccountInfo } from "./AccountInfo.js";
|
|
9
|
+
import { InitContext } from "./InitContext.js";
|
|
10
10
|
|
|
11
11
|
export type BridgeResponseEnvelope = {
|
|
12
12
|
messageType: "NestedAppAuthResponse";
|
package/src/naa/IBridgeProxy.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { AuthResult } from "./AuthResult";
|
|
7
|
-
import { AccountContext } from "./BridgeAccountContext";
|
|
8
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
9
|
-
import { TokenRequest } from "./TokenRequest";
|
|
6
|
+
import { AuthResult } from "./AuthResult.js";
|
|
7
|
+
import { AccountContext } from "./BridgeAccountContext.js";
|
|
8
|
+
import { BridgeCapabilities } from "./BridgeCapabilities.js";
|
|
9
|
+
import { TokenRequest } from "./TokenRequest.js";
|
|
10
10
|
|
|
11
11
|
export interface IBridgeProxy {
|
|
12
12
|
getTokenInteractive(request: TokenRequest): Promise<AuthResult>;
|
package/src/naa/InitContext.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
7
|
-
import { AccountContext } from "./BridgeAccountContext";
|
|
6
|
+
import { BridgeCapabilities } from "./BridgeCapabilities.js";
|
|
7
|
+
import { AccountContext } from "./BridgeAccountContext.js";
|
|
8
8
|
|
|
9
9
|
export interface InitContext {
|
|
10
10
|
capabilities?: BridgeCapabilities;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { TokenRequest } from "../TokenRequest";
|
|
7
|
-
import { AccountInfo as NaaAccountInfo } from "../AccountInfo";
|
|
8
|
-
import { RedirectRequest } from "../../request/RedirectRequest";
|
|
9
|
-
import { PopupRequest } from "../../request/PopupRequest";
|
|
6
|
+
import { TokenRequest } from "../TokenRequest.js";
|
|
7
|
+
import { AccountInfo as NaaAccountInfo } from "../AccountInfo.js";
|
|
8
|
+
import { RedirectRequest } from "../../request/RedirectRequest.js";
|
|
9
|
+
import { PopupRequest } from "../../request/PopupRequest.js";
|
|
10
10
|
import {
|
|
11
11
|
AccountInfo as MsalAccountInfo,
|
|
12
12
|
AuthError,
|
|
@@ -29,14 +29,14 @@ import {
|
|
|
29
29
|
AccessTokenEntity,
|
|
30
30
|
TenantProfile,
|
|
31
31
|
buildTenantProfile,
|
|
32
|
-
} from "@azure/msal-common";
|
|
33
|
-
import { isBridgeError } from "../BridgeError";
|
|
34
|
-
import { BridgeStatusCode } from "../BridgeStatusCode";
|
|
35
|
-
import { AuthenticationResult } from "../../response/AuthenticationResult";
|
|
36
|
-
import {} from "../../error/BrowserAuthErrorCodes";
|
|
37
|
-
import { AuthResult } from "../AuthResult";
|
|
38
|
-
import { SsoSilentRequest } from "../../request/SsoSilentRequest";
|
|
39
|
-
import { SilentRequest } from "../../request/SilentRequest";
|
|
32
|
+
} from "@azure/msal-common/browser";
|
|
33
|
+
import { isBridgeError } from "../BridgeError.js";
|
|
34
|
+
import { BridgeStatusCode } from "../BridgeStatusCode.js";
|
|
35
|
+
import { AuthenticationResult } from "../../response/AuthenticationResult.js";
|
|
36
|
+
import {} from "../../error/BrowserAuthErrorCodes.js";
|
|
37
|
+
import { AuthResult } from "../AuthResult.js";
|
|
38
|
+
import { SsoSilentRequest } from "../../request/SsoSilentRequest.js";
|
|
39
|
+
import { SilentRequest } from "../../request/SilentRequest.js";
|
|
40
40
|
|
|
41
41
|
export class NestedAppAuthAdapter {
|
|
42
42
|
protected crypto: ICrypto;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { INavigationClient } from "./INavigationClient";
|
|
7
|
-
import { NavigationOptions } from "./NavigationOptions";
|
|
6
|
+
import { INavigationClient } from "./INavigationClient.js";
|
|
7
|
+
import { NavigationOptions } from "./NavigationOptions.js";
|
|
8
8
|
|
|
9
9
|
export class NavigationClient implements INavigationClient {
|
|
10
10
|
/**
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
INetworkModule,
|
|
9
9
|
NetworkRequestOptions,
|
|
10
10
|
NetworkResponse,
|
|
11
|
-
} from "@azure/msal-common";
|
|
11
|
+
} from "@azure/msal-common/browser";
|
|
12
12
|
import {
|
|
13
13
|
createBrowserAuthError,
|
|
14
14
|
BrowserAuthErrorCodes,
|
|
15
|
-
} from "../error/BrowserAuthError";
|
|
16
|
-
import { HTTP_REQUEST_TYPE } from "../utils/BrowserConstants";
|
|
15
|
+
} from "../error/BrowserAuthError.js";
|
|
16
|
+
import { HTTP_REQUEST_TYPE } from "../utils/BrowserConstants.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* This class implements the Fetch API for GET and POST requests. See more here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|