@azure/msal-browser 3.23.0 → 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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 +35 -7
- 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 +5060 -4953
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +5060 -4953
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +65 -67
- 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 +15 -16
- 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 +57 -31
- 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
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { CommonAuthorizationCodeRequest, ICrypto, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, CacheManager, ServerTelemetryEntity, ThrottlingEntity, Logger, AuthorityMetadataEntity, AccountInfo, ValidCredentialType, TokenKeys, CredentialType, CacheRecord, IPerformanceClient, StaticAuthorityOptions, StoreInCache } from "@azure/msal-common/browser";
|
|
2
|
+
import { CacheOptions } from "../config/Configuration.js";
|
|
3
|
+
import { BrowserCacheLocation, InteractionType } from "../utils/BrowserConstants.js";
|
|
4
|
+
import { MemoryStorage } from "./MemoryStorage.js";
|
|
5
|
+
import { IWindowStorage } from "./IWindowStorage.js";
|
|
6
|
+
import { NativeTokenRequest } from "../broker/nativeBroker/NativeRequest.js";
|
|
7
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
8
|
+
import { SilentRequest } from "../request/SilentRequest.js";
|
|
9
|
+
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
|
|
10
|
+
import { RedirectRequest } from "../request/RedirectRequest.js";
|
|
11
|
+
import { PopupRequest } from "../request/PopupRequest.js";
|
|
12
|
+
/**
|
|
13
|
+
* This class implements the cache storage interface for MSAL through browser local or session storage.
|
|
14
|
+
* Cookies are only used if storeAuthStateInCookie is true, and are only used for
|
|
15
|
+
* parameters such as state and nonce, generally.
|
|
16
|
+
*/
|
|
17
|
+
export declare class BrowserCacheManager extends CacheManager {
|
|
18
|
+
protected cacheConfig: Required<CacheOptions>;
|
|
19
|
+
protected browserStorage: IWindowStorage<string>;
|
|
20
|
+
protected internalStorage: MemoryStorage<string>;
|
|
21
|
+
protected temporaryCacheStorage: IWindowStorage<string>;
|
|
22
|
+
protected logger: Logger;
|
|
23
|
+
protected performanceClient?: IPerformanceClient;
|
|
24
|
+
protected readonly COOKIE_LIFE_MULTIPLIER: number;
|
|
25
|
+
constructor(clientId: string, cacheConfig: Required<CacheOptions>, cryptoImpl: ICrypto, logger: Logger, staticAuthorityOptions?: StaticAuthorityOptions, performanceClient?: IPerformanceClient);
|
|
26
|
+
/**
|
|
27
|
+
* Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured cacheLocation.
|
|
28
|
+
* @param cacheLocation
|
|
29
|
+
*/
|
|
30
|
+
protected setupBrowserStorage(cacheLocation: BrowserCacheLocation | string): IWindowStorage<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured temporaryCacheLocation.
|
|
33
|
+
* @param temporaryCacheLocation
|
|
34
|
+
* @param cacheLocation
|
|
35
|
+
*/
|
|
36
|
+
protected setupTemporaryCacheStorage(temporaryCacheLocation: BrowserCacheLocation | string, cacheLocation: BrowserCacheLocation | string): IWindowStorage<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Migrate all old cache entries to new schema. No rollback supported.
|
|
39
|
+
* @param storeAuthStateInCookie
|
|
40
|
+
*/
|
|
41
|
+
protected migrateCacheEntries(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Searches all cache entries for MSAL accounts and creates the account key map
|
|
44
|
+
* This is used to migrate users from older versions of MSAL which did not create the map.
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
private createKeyMaps;
|
|
48
|
+
/**
|
|
49
|
+
* Parses passed value as JSON object, JSON.parse() will throw an error.
|
|
50
|
+
* @param input
|
|
51
|
+
*/
|
|
52
|
+
protected validateAndParseJson(jsonValue: string): object | null;
|
|
53
|
+
/**
|
|
54
|
+
* fetches the entry from the browser storage based off the key
|
|
55
|
+
* @param key
|
|
56
|
+
*/
|
|
57
|
+
getItem(key: string): string | null;
|
|
58
|
+
/**
|
|
59
|
+
* sets the entry in the browser storage
|
|
60
|
+
* @param key
|
|
61
|
+
* @param value
|
|
62
|
+
*/
|
|
63
|
+
setItem(key: string, value: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* fetch the account entity from the platform cache
|
|
66
|
+
* @param accountKey
|
|
67
|
+
*/
|
|
68
|
+
getAccount(accountKey: string, logger?: Logger): AccountEntity | null;
|
|
69
|
+
/**
|
|
70
|
+
* Reads account from cache, deserializes it into an account entity and returns it.
|
|
71
|
+
* If account is not found from the key, returns null and removes key from map.
|
|
72
|
+
* @param accountKey
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
getCachedAccountEntity(accountKey: string): AccountEntity | null;
|
|
76
|
+
/**
|
|
77
|
+
* set account entity in the platform cache
|
|
78
|
+
* @param account
|
|
79
|
+
*/
|
|
80
|
+
setAccount(account: AccountEntity): void;
|
|
81
|
+
/**
|
|
82
|
+
* Returns the array of account keys currently cached
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
getAccountKeys(): Array<string>;
|
|
86
|
+
/**
|
|
87
|
+
* Add a new account to the key map
|
|
88
|
+
* @param key
|
|
89
|
+
*/
|
|
90
|
+
addAccountKeyToMap(key: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Remove an account from the key map
|
|
93
|
+
* @param key
|
|
94
|
+
*/
|
|
95
|
+
removeAccountKeyFromMap(key: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* Extends inherited removeAccount function to include removal of the account key from the map
|
|
98
|
+
* @param key
|
|
99
|
+
*/
|
|
100
|
+
removeAccount(key: string): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Remove account entity from the platform cache if it's outdated
|
|
103
|
+
* @param accountKey
|
|
104
|
+
*/
|
|
105
|
+
removeOutdatedAccount(accountKey: string): void;
|
|
106
|
+
/**
|
|
107
|
+
* Removes given idToken from the cache and from the key map
|
|
108
|
+
* @param key
|
|
109
|
+
*/
|
|
110
|
+
removeIdToken(key: string): void;
|
|
111
|
+
/**
|
|
112
|
+
* Removes given accessToken from the cache and from the key map
|
|
113
|
+
* @param key
|
|
114
|
+
*/
|
|
115
|
+
removeAccessToken(key: string): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Removes given refreshToken from the cache and from the key map
|
|
118
|
+
* @param key
|
|
119
|
+
*/
|
|
120
|
+
removeRefreshToken(key: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Gets the keys for the cached tokens associated with this clientId
|
|
123
|
+
* @returns
|
|
124
|
+
*/
|
|
125
|
+
getTokenKeys(): TokenKeys;
|
|
126
|
+
/**
|
|
127
|
+
* Adds the given key to the token key map
|
|
128
|
+
* @param key
|
|
129
|
+
* @param type
|
|
130
|
+
*/
|
|
131
|
+
addTokenKey(key: string, type: CredentialType): void;
|
|
132
|
+
/**
|
|
133
|
+
* Removes the given key from the token key map
|
|
134
|
+
* @param key
|
|
135
|
+
* @param type
|
|
136
|
+
*/
|
|
137
|
+
removeTokenKey(key: string, type: CredentialType): void;
|
|
138
|
+
/**
|
|
139
|
+
* generates idToken entity from a string
|
|
140
|
+
* @param idTokenKey
|
|
141
|
+
*/
|
|
142
|
+
getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
|
|
143
|
+
/**
|
|
144
|
+
* set IdToken credential to the platform cache
|
|
145
|
+
* @param idToken
|
|
146
|
+
*/
|
|
147
|
+
setIdTokenCredential(idToken: IdTokenEntity): void;
|
|
148
|
+
/**
|
|
149
|
+
* generates accessToken entity from a string
|
|
150
|
+
* @param key
|
|
151
|
+
*/
|
|
152
|
+
getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
|
|
153
|
+
/**
|
|
154
|
+
* set accessToken credential to the platform cache
|
|
155
|
+
* @param accessToken
|
|
156
|
+
*/
|
|
157
|
+
setAccessTokenCredential(accessToken: AccessTokenEntity): void;
|
|
158
|
+
/**
|
|
159
|
+
* generates refreshToken entity from a string
|
|
160
|
+
* @param refreshTokenKey
|
|
161
|
+
*/
|
|
162
|
+
getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
|
|
163
|
+
/**
|
|
164
|
+
* set refreshToken credential to the platform cache
|
|
165
|
+
* @param refreshToken
|
|
166
|
+
*/
|
|
167
|
+
setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
|
|
168
|
+
/**
|
|
169
|
+
* fetch appMetadata entity from the platform cache
|
|
170
|
+
* @param appMetadataKey
|
|
171
|
+
*/
|
|
172
|
+
getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
|
|
173
|
+
/**
|
|
174
|
+
* set appMetadata entity to the platform cache
|
|
175
|
+
* @param appMetadata
|
|
176
|
+
*/
|
|
177
|
+
setAppMetadata(appMetadata: AppMetadataEntity): void;
|
|
178
|
+
/**
|
|
179
|
+
* fetch server telemetry entity from the platform cache
|
|
180
|
+
* @param serverTelemetryKey
|
|
181
|
+
*/
|
|
182
|
+
getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
|
|
183
|
+
/**
|
|
184
|
+
* set server telemetry entity to the platform cache
|
|
185
|
+
* @param serverTelemetryKey
|
|
186
|
+
* @param serverTelemetry
|
|
187
|
+
*/
|
|
188
|
+
setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
getAuthorityMetadataKeys(): Array<string>;
|
|
197
|
+
/**
|
|
198
|
+
* Sets wrapper metadata in memory
|
|
199
|
+
* @param wrapperSKU
|
|
200
|
+
* @param wrapperVersion
|
|
201
|
+
*/
|
|
202
|
+
setWrapperMetadata(wrapperSKU: string, wrapperVersion: string): void;
|
|
203
|
+
/**
|
|
204
|
+
* Returns wrapper metadata from in-memory storage
|
|
205
|
+
*/
|
|
206
|
+
getWrapperMetadata(): [string, string];
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
* @param entity
|
|
210
|
+
*/
|
|
211
|
+
setAuthorityMetadata(key: string, entity: AuthorityMetadataEntity): void;
|
|
212
|
+
/**
|
|
213
|
+
* Gets the active account
|
|
214
|
+
*/
|
|
215
|
+
getActiveAccount(): AccountInfo | null;
|
|
216
|
+
/**
|
|
217
|
+
* Sets the active account's localAccountId in cache
|
|
218
|
+
* @param account
|
|
219
|
+
*/
|
|
220
|
+
setActiveAccount(account: AccountInfo | null): void;
|
|
221
|
+
/**
|
|
222
|
+
* fetch throttling entity from the platform cache
|
|
223
|
+
* @param throttlingCacheKey
|
|
224
|
+
*/
|
|
225
|
+
getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
|
|
226
|
+
/**
|
|
227
|
+
* set throttling entity to the platform cache
|
|
228
|
+
* @param throttlingCacheKey
|
|
229
|
+
* @param throttlingCache
|
|
230
|
+
*/
|
|
231
|
+
setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
|
|
232
|
+
/**
|
|
233
|
+
* Gets cache item with given key.
|
|
234
|
+
* Will retrieve from cookies if storeAuthStateInCookie is set to true.
|
|
235
|
+
* @param key
|
|
236
|
+
*/
|
|
237
|
+
getTemporaryCache(cacheKey: string, generateKey?: boolean): string | null;
|
|
238
|
+
/**
|
|
239
|
+
* Sets the cache item with the key and value given.
|
|
240
|
+
* Stores in cookie if storeAuthStateInCookie is set to true.
|
|
241
|
+
* This can cause cookie overflow if used incorrectly.
|
|
242
|
+
* @param key
|
|
243
|
+
* @param value
|
|
244
|
+
*/
|
|
245
|
+
setTemporaryCache(cacheKey: string, value: string, generateKey?: boolean): void;
|
|
246
|
+
/**
|
|
247
|
+
* Removes the cache item with the given key.
|
|
248
|
+
* @param key
|
|
249
|
+
*/
|
|
250
|
+
removeItem(key: string): void;
|
|
251
|
+
/**
|
|
252
|
+
* Removes the temporary cache item with the given key.
|
|
253
|
+
* Will also clear the cookie item if storeAuthStateInCookie is set to true.
|
|
254
|
+
* @param key
|
|
255
|
+
*/
|
|
256
|
+
removeTemporaryItem(key: string): void;
|
|
257
|
+
/**
|
|
258
|
+
* Gets all keys in window.
|
|
259
|
+
*/
|
|
260
|
+
getKeys(): string[];
|
|
261
|
+
/**
|
|
262
|
+
* Clears all cache entries created by MSAL.
|
|
263
|
+
*/
|
|
264
|
+
clear(): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* Clears all access tokes that have claims prior to saving the current one
|
|
267
|
+
* @param performanceClient {IPerformanceClient}
|
|
268
|
+
* @param correlationId {string} correlation id
|
|
269
|
+
* @returns
|
|
270
|
+
*/
|
|
271
|
+
clearTokensAndKeysWithClaims(performanceClient: IPerformanceClient, correlationId: string): Promise<void>;
|
|
272
|
+
/**
|
|
273
|
+
* Add value to cookies
|
|
274
|
+
* @param cookieName
|
|
275
|
+
* @param cookieValue
|
|
276
|
+
* @param expires
|
|
277
|
+
* @deprecated
|
|
278
|
+
*/
|
|
279
|
+
setItemCookie(cookieName: string, cookieValue: string, expires?: number): void;
|
|
280
|
+
/**
|
|
281
|
+
* Get one item by key from cookies
|
|
282
|
+
* @param cookieName
|
|
283
|
+
* @deprecated
|
|
284
|
+
*/
|
|
285
|
+
getItemCookie(cookieName: string): string;
|
|
286
|
+
/**
|
|
287
|
+
* Clear all msal-related cookies currently set in the browser. Should only be used to clear temporary cache items.
|
|
288
|
+
* @deprecated
|
|
289
|
+
*/
|
|
290
|
+
clearMsalCookies(): void;
|
|
291
|
+
/**
|
|
292
|
+
* Clear an item in the cookies by key
|
|
293
|
+
* @param cookieName
|
|
294
|
+
* @deprecated
|
|
295
|
+
*/
|
|
296
|
+
clearItemCookie(cookieName: string): void;
|
|
297
|
+
/**
|
|
298
|
+
* Get cookie expiration time
|
|
299
|
+
* @param cookieLifeDays
|
|
300
|
+
* @deprecated
|
|
301
|
+
*/
|
|
302
|
+
getCookieExpirationTime(cookieLifeDays: number): string;
|
|
303
|
+
/**
|
|
304
|
+
* Prepend msal.<client-id> to each key; Skip for any JSON object as Key (defined schemas do not need the key appended: AccessToken Keys or the upcoming schema)
|
|
305
|
+
* @param key
|
|
306
|
+
* @param addInstanceId
|
|
307
|
+
*/
|
|
308
|
+
generateCacheKey(key: string): string;
|
|
309
|
+
/**
|
|
310
|
+
* Create authorityKey to cache authority
|
|
311
|
+
* @param state
|
|
312
|
+
*/
|
|
313
|
+
generateAuthorityKey(stateString: string): string;
|
|
314
|
+
/**
|
|
315
|
+
* Create Nonce key to cache nonce
|
|
316
|
+
* @param state
|
|
317
|
+
*/
|
|
318
|
+
generateNonceKey(stateString: string): string;
|
|
319
|
+
/**
|
|
320
|
+
* Creates full cache key for the request state
|
|
321
|
+
* @param stateString State string for the request
|
|
322
|
+
*/
|
|
323
|
+
generateStateKey(stateString: string): string;
|
|
324
|
+
/**
|
|
325
|
+
* Gets the cached authority based on the cached state. Returns empty if no cached state found.
|
|
326
|
+
*/
|
|
327
|
+
getCachedAuthority(cachedState: string): string | null;
|
|
328
|
+
/**
|
|
329
|
+
* Updates account, authority, and state in cache
|
|
330
|
+
* @param serverAuthenticationRequest
|
|
331
|
+
* @param account
|
|
332
|
+
*/
|
|
333
|
+
updateCacheEntries(state: string, nonce: string, authorityInstance: string, loginHint: string, account: AccountInfo | null): void;
|
|
334
|
+
/**
|
|
335
|
+
* Reset all temporary cache items
|
|
336
|
+
* @param state
|
|
337
|
+
*/
|
|
338
|
+
resetRequestCache(state: string): void;
|
|
339
|
+
/**
|
|
340
|
+
* Removes temporary cache for the provided state
|
|
341
|
+
* @param stateString
|
|
342
|
+
*/
|
|
343
|
+
cleanRequestByState(stateString: string): void;
|
|
344
|
+
/**
|
|
345
|
+
* Looks in temporary cache for any state values with the provided interactionType and removes all temporary cache items for that state
|
|
346
|
+
* Used in scenarios where temp cache needs to be cleaned but state is not known, such as clicking browser back button.
|
|
347
|
+
* @param interactionType
|
|
348
|
+
*/
|
|
349
|
+
cleanRequestByInteractionType(interactionType: InteractionType): void;
|
|
350
|
+
cacheCodeRequest(authCodeRequest: CommonAuthorizationCodeRequest): void;
|
|
351
|
+
/**
|
|
352
|
+
* Gets the token exchange parameters from the cache. Throws an error if nothing is found.
|
|
353
|
+
*/
|
|
354
|
+
getCachedRequest(state: string): CommonAuthorizationCodeRequest;
|
|
355
|
+
/**
|
|
356
|
+
* Gets cached native request for redirect flows
|
|
357
|
+
*/
|
|
358
|
+
getCachedNativeRequest(): NativeTokenRequest | null;
|
|
359
|
+
isInteractionInProgress(matchClientId?: boolean): boolean;
|
|
360
|
+
getInteractionInProgress(): string | null;
|
|
361
|
+
setInteractionInProgress(inProgress: boolean): void;
|
|
362
|
+
/**
|
|
363
|
+
* Returns username retrieved from ADAL or MSAL v1 idToken
|
|
364
|
+
* @deprecated
|
|
365
|
+
*/
|
|
366
|
+
getLegacyLoginHint(): string | null;
|
|
367
|
+
/**
|
|
368
|
+
* Updates a credential's cache key if the current cache key is outdated
|
|
369
|
+
*/
|
|
370
|
+
updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string;
|
|
371
|
+
/**
|
|
372
|
+
* Builds credential entities from AuthenticationResult object and saves the resulting credentials to the cache
|
|
373
|
+
* @param result
|
|
374
|
+
* @param request
|
|
375
|
+
*/
|
|
376
|
+
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
|
|
377
|
+
/**
|
|
378
|
+
* saves a cache record
|
|
379
|
+
* @param cacheRecord {CacheRecord}
|
|
380
|
+
* @param storeInCache {?StoreInCache}
|
|
381
|
+
* @param correlationId {?string} correlation id
|
|
382
|
+
*/
|
|
383
|
+
saveCacheRecord(cacheRecord: CacheRecord, storeInCache?: StoreInCache, correlationId?: string): Promise<void>;
|
|
384
|
+
}
|
|
385
|
+
export declare const DEFAULT_BROWSER_CACHE_MANAGER: (clientId: string, logger: Logger) => BrowserCacheManager;
|
|
386
|
+
//# sourceMappingURL=BrowserCacheManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowserCacheManager.d.ts","sourceRoot":"","sources":["../../../src/cache/Br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BAA6B,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IAmCrE,gBAAgB,CAAC,eAAe,EAAE,8BAA8B,GAAG,IAAI;IAWvE;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,8BAA8B;IA4C/D;;OAEG;IACH,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;IA0BnD,uBAAuB,CAAC,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO;IAUzD,wBAAwB,IAAI,MAAM,GAAG,IAAI;IAKzC,wBAAwB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAoBnD;;;OAGG;IACH,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAgDnC;;OAEG;IACH,wBAAwB,CACpB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,mBAAmB,GAChC,MAAM;IAsBT;;;;OAIG;IACG,YAAY,CACd,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IA+ChB;;;;;OAKG;IACG,eAAe,CACjB,WAAW,EAAE,WAAW,EACxB,YAAY,CAAC,EAAE,YAAY,EAC3B,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC;CA8BnB;AAED,eAAO,MAAM,6BAA6B,aAC5B,MAAM,UACR,MAAM,KACf,mBAeF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IWindowStorage } from "./IWindowStorage.js";
|
|
2
|
+
export declare class BrowserStorage implements IWindowStorage<string> {
|
|
3
|
+
private windowStorage;
|
|
4
|
+
constructor(cacheLocation: string);
|
|
5
|
+
private validateWindowStorage;
|
|
6
|
+
getItem(key: string): string | null;
|
|
7
|
+
setItem(key: string, value: string): void;
|
|
8
|
+
removeItem(key: string): void;
|
|
9
|
+
getKeys(): string[];
|
|
10
|
+
containsKey(key: string): boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=BrowserStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowserStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/BrowserStorage.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,cAAe,YAAW,cAAc,CAAC,MAAM,CAAC;IACzD,OAAO,CAAC,aAAa,CAAU;gBAEnB,aAAa,EAAE,MAAM;IAKjC,OAAO,CAAC,qBAAqB;IAY7B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAInC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,OAAO,IAAI,MAAM,EAAE;IAInB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAGpC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IAsyncStorage } from "./IAsyncStorage.js";
|
|
2
|
+
/**
|
|
3
|
+
* Storage wrapper for IndexedDB storage in browsers: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
|
|
4
|
+
*/
|
|
5
|
+
export declare class DatabaseStorage<T> implements IAsyncStorage<T> {
|
|
6
|
+
private db;
|
|
7
|
+
private dbName;
|
|
8
|
+
private tableName;
|
|
9
|
+
private version;
|
|
10
|
+
private dbOpen;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Opens IndexedDB instance.
|
|
14
|
+
*/
|
|
15
|
+
open(): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Closes the connection to IndexedDB database when all pending transactions
|
|
18
|
+
* complete.
|
|
19
|
+
*/
|
|
20
|
+
closeConnection(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Opens database if it's not already open
|
|
23
|
+
*/
|
|
24
|
+
private validateDbIsOpen;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves item from IndexedDB instance.
|
|
27
|
+
* @param key
|
|
28
|
+
*/
|
|
29
|
+
getItem(key: string): Promise<T | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Adds item to IndexedDB under given key
|
|
32
|
+
* @param key
|
|
33
|
+
* @param payload
|
|
34
|
+
*/
|
|
35
|
+
setItem(key: string, payload: T): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Removes item from IndexedDB under given key
|
|
38
|
+
* @param key
|
|
39
|
+
*/
|
|
40
|
+
removeItem(key: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Get all the keys from the storage object as an iterable array of strings.
|
|
43
|
+
*/
|
|
44
|
+
getKeys(): Promise<string[]>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* Checks whether there is an object under the search key in the object store
|
|
48
|
+
*/
|
|
49
|
+
containsKey(key: string): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Deletes the MSAL database. The database is deleted rather than cleared to make it possible
|
|
52
|
+
* for client applications to downgrade to a previous MSAL version without worrying about forward compatibility issues
|
|
53
|
+
* with IndexedDB database versions.
|
|
54
|
+
*/
|
|
55
|
+
deleteDatabase(): Promise<boolean>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=DatabaseStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/DatabaseStorage.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAcnD;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAU;;IASxB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B3B;;;OAGG;IACH,eAAe,IAAI,IAAI;IAQvB;;OAEG;YACW,gBAAgB;IAM9B;;;OAGG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IA+B7C;;;;OAIG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCrD;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B5C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IA+BlC;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgChD;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;CAwB3C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IAsyncStorage<T> {
|
|
2
|
+
/**
|
|
3
|
+
* Get the item from the asynchronous storage object matching the given key.
|
|
4
|
+
* @param key
|
|
5
|
+
*/
|
|
6
|
+
getItem(key: string): Promise<T | null>;
|
|
7
|
+
/**
|
|
8
|
+
* Sets the item in the asynchronous storage object with the given key.
|
|
9
|
+
* @param key
|
|
10
|
+
* @param value
|
|
11
|
+
*/
|
|
12
|
+
setItem(key: string, value: T): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Removes the item in the asynchronous storage object matching the given key.
|
|
15
|
+
* @param key
|
|
16
|
+
*/
|
|
17
|
+
removeItem(key: string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Get all the keys from the asynchronous storage object as an iterable array of strings.
|
|
20
|
+
*/
|
|
21
|
+
getKeys(): Promise<string[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns true or false if the given key is present in the cache.
|
|
24
|
+
* @param key
|
|
25
|
+
*/
|
|
26
|
+
containsKey(key: string): Promise<boolean>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=IAsyncStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/IAsyncStorage.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE7B;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExternalTokenResponse } from "@azure/msal-common/browser";
|
|
2
|
+
import { SilentRequest } from "../request/SilentRequest.js";
|
|
3
|
+
import { LoadTokenOptions } from "./TokenCache.js";
|
|
4
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
5
|
+
export interface ITokenCache {
|
|
6
|
+
/**
|
|
7
|
+
* API to side-load tokens to MSAL cache
|
|
8
|
+
* @returns `AuthenticationResult` for the response that was loaded.
|
|
9
|
+
*/
|
|
10
|
+
loadExternalTokens(request: SilentRequest, response: ExternalTokenResponse, options: LoadTokenOptions): AuthenticationResult;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ITokenCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/ITokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,WAAW,WAAW;IACxB;;;OAGG;IACH,kBAAkB,CACd,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,gBAAgB,GAC1B,oBAAoB,CAAC;CAC3B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IWindowStorage<T> {
|
|
2
|
+
/**
|
|
3
|
+
* Get the item from the window storage object matching the given key.
|
|
4
|
+
* @param key
|
|
5
|
+
*/
|
|
6
|
+
getItem(key: string): T | null;
|
|
7
|
+
/**
|
|
8
|
+
* Sets the item in the window storage object with the given key.
|
|
9
|
+
* @param key
|
|
10
|
+
* @param value
|
|
11
|
+
*/
|
|
12
|
+
setItem(key: string, value: T): void;
|
|
13
|
+
/**
|
|
14
|
+
* Removes the item in the window storage object matching the given key.
|
|
15
|
+
* @param key
|
|
16
|
+
*/
|
|
17
|
+
removeItem(key: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get all the keys from the window storage object as an iterable array of strings.
|
|
20
|
+
*/
|
|
21
|
+
getKeys(): string[];
|
|
22
|
+
/**
|
|
23
|
+
* Returns true or false if the given key is present in the cache.
|
|
24
|
+
* @param key
|
|
25
|
+
*/
|
|
26
|
+
containsKey(key: string): boolean;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=IWindowStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWindowStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/IWindowStorage.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc,CAAC,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;IAE/B;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,OAAO,IAAI,MAAM,EAAE,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACrC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IWindowStorage } from "./IWindowStorage.js";
|
|
2
|
+
export declare class MemoryStorage<T> implements IWindowStorage<T> {
|
|
3
|
+
private cache;
|
|
4
|
+
constructor();
|
|
5
|
+
getItem(key: string): T | null;
|
|
6
|
+
setItem(key: string, value: T): void;
|
|
7
|
+
removeItem(key: string): void;
|
|
8
|
+
getKeys(): string[];
|
|
9
|
+
containsKey(key: string): boolean;
|
|
10
|
+
clear(): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=MemoryStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/MemoryStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,aAAa,CAAC,CAAC,CAAE,YAAW,cAAc,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,KAAK,CAAiB;;IAM9B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAI9B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAIpC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,OAAO,IAAI,MAAM,EAAE;IAQnB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC,KAAK,IAAI,IAAI;CAGhB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ICrypto, Logger, ExternalTokenResponse } from "@azure/msal-common/browser";
|
|
2
|
+
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
3
|
+
import { SilentRequest } from "../request/SilentRequest.js";
|
|
4
|
+
import { BrowserCacheManager } from "./BrowserCacheManager.js";
|
|
5
|
+
import { ITokenCache } from "./ITokenCache.js";
|
|
6
|
+
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
7
|
+
export type LoadTokenOptions = {
|
|
8
|
+
clientInfo?: string;
|
|
9
|
+
expiresOn?: number;
|
|
10
|
+
extendedExpiresOn?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Token cache manager
|
|
14
|
+
*/
|
|
15
|
+
export declare class TokenCache implements ITokenCache {
|
|
16
|
+
isBrowserEnvironment: boolean;
|
|
17
|
+
protected config: BrowserConfiguration;
|
|
18
|
+
private storage;
|
|
19
|
+
private logger;
|
|
20
|
+
private cryptoObj;
|
|
21
|
+
constructor(configuration: BrowserConfiguration, storage: BrowserCacheManager, logger: Logger, cryptoObj: ICrypto);
|
|
22
|
+
/**
|
|
23
|
+
* API to load tokens to msal-browser cache.
|
|
24
|
+
* @param request
|
|
25
|
+
* @param response
|
|
26
|
+
* @param options
|
|
27
|
+
* @returns `AuthenticationResult` for the response that was loaded.
|
|
28
|
+
*/
|
|
29
|
+
loadExternalTokens(request: SilentRequest, response: ExternalTokenResponse, options: LoadTokenOptions): AuthenticationResult;
|
|
30
|
+
/**
|
|
31
|
+
* Helper function to load account to msal-browser cache
|
|
32
|
+
* @param idToken
|
|
33
|
+
* @param environment
|
|
34
|
+
* @param clientInfo
|
|
35
|
+
* @param authorityType
|
|
36
|
+
* @param requestHomeAccountId
|
|
37
|
+
* @returns `AccountEntity`
|
|
38
|
+
*/
|
|
39
|
+
private loadAccount;
|
|
40
|
+
/**
|
|
41
|
+
* Helper function to load id tokens to msal-browser cache
|
|
42
|
+
* @param idToken
|
|
43
|
+
* @param homeAccountId
|
|
44
|
+
* @param environment
|
|
45
|
+
* @param tenantId
|
|
46
|
+
* @returns `IdTokenEntity`
|
|
47
|
+
*/
|
|
48
|
+
private loadIdToken;
|
|
49
|
+
/**
|
|
50
|
+
* Helper function to load access tokens to msal-browser cache
|
|
51
|
+
* @param request
|
|
52
|
+
* @param response
|
|
53
|
+
* @param homeAccountId
|
|
54
|
+
* @param environment
|
|
55
|
+
* @param tenantId
|
|
56
|
+
* @returns `AccessTokenEntity`
|
|
57
|
+
*/
|
|
58
|
+
private loadAccessToken;
|
|
59
|
+
/**
|
|
60
|
+
* Helper function to load refresh tokens to msal-browser cache
|
|
61
|
+
* @param request
|
|
62
|
+
* @param response
|
|
63
|
+
* @param homeAccountId
|
|
64
|
+
* @param environment
|
|
65
|
+
* @returns `RefreshTokenEntity`
|
|
66
|
+
*/
|
|
67
|
+
private loadRefreshToken;
|
|
68
|
+
/**
|
|
69
|
+
* Helper function to generate an `AuthenticationResult` for the result.
|
|
70
|
+
* @param request
|
|
71
|
+
* @param idTokenObj
|
|
72
|
+
* @param cacheRecord
|
|
73
|
+
* @param authority
|
|
74
|
+
* @returns `AuthenticationResult`
|
|
75
|
+
*/
|
|
76
|
+
private generateAuthenticationResult;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=TokenCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/TokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,OAAO,EAEP,MAAM,EAIN,qBAAqB,EAQxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA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