@azure/msal-browser 2.36.0 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +213 -213
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.js +33 -33
- package/dist/app/IPublicClientApplication.js.map +1 -1
- package/dist/app/PublicClientApplication.d.ts +198 -24
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.js +263 -220
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +5 -4
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js +118 -124
- package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
- package/dist/broker/nativeBroker/NativeRequest.d.ts +4 -4
- package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeResponse.d.ts +4 -4
- package/dist/broker/nativeBroker/NativeResponse.d.ts.map +1 -1
- package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -1
- package/dist/cache/AsyncMemoryStorage.js +83 -152
- package/dist/cache/AsyncMemoryStorage.js.map +1 -1
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.js +420 -412
- package/dist/cache/BrowserCacheManager.js.map +1 -1
- package/dist/cache/BrowserStorage.d.ts.map +1 -1
- package/dist/cache/BrowserStorage.js +19 -19
- package/dist/cache/BrowserStorage.js.map +1 -1
- package/dist/cache/CryptoKeyStore.d.ts.map +1 -1
- package/dist/cache/CryptoKeyStore.js +26 -36
- package/dist/cache/CryptoKeyStore.js.map +1 -1
- package/dist/cache/DatabaseStorage.d.ts.map +1 -1
- package/dist/cache/DatabaseStorage.js +127 -191
- package/dist/cache/DatabaseStorage.js.map +1 -1
- package/dist/cache/ITokenCache.d.ts.map +1 -1
- package/dist/cache/MemoryStorage.d.ts.map +1 -1
- package/dist/cache/MemoryStorage.js +18 -19
- package/dist/cache/MemoryStorage.js.map +1 -1
- package/dist/cache/TokenCache.d.ts +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.js +55 -49
- package/dist/cache/TokenCache.js.map +1 -1
- package/dist/config/Configuration.d.ts +8 -8
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.js +53 -31
- package/dist/config/Configuration.js.map +1 -1
- package/dist/controllers/ControllerFactory.d.ts +10 -0
- package/dist/controllers/ControllerFactory.d.ts.map +1 -0
- package/dist/controllers/ControllerFactory.js +47 -0
- package/dist/controllers/ControllerFactory.js.map +1 -0
- package/dist/controllers/IController.d.ts +67 -0
- package/dist/controllers/IController.d.ts.map +1 -0
- package/dist/{app/ClientApplication.d.ts → controllers/StandardController.d.ts} +96 -15
- package/dist/controllers/StandardController.d.ts.map +1 -0
- package/dist/controllers/StandardController.js +1299 -0
- package/dist/controllers/StandardController.js.map +1 -0
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.js +36 -60
- package/dist/crypto/BrowserCrypto.js.map +1 -1
- package/dist/crypto/CryptoOps.d.ts +1 -1
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.js +93 -151
- package/dist/crypto/CryptoOps.js.map +1 -1
- package/dist/crypto/GuidGenerator.d.ts.map +1 -1
- package/dist/crypto/GuidGenerator.js +36 -25
- package/dist/crypto/GuidGenerator.js.map +1 -1
- package/dist/crypto/ISubtleCrypto.d.ts.map +1 -1
- package/dist/crypto/ModernBrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/ModernBrowserCrypto.js +20 -44
- package/dist/crypto/ModernBrowserCrypto.js.map +1 -1
- package/dist/crypto/MsBrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/MsBrowserCrypto.js +65 -89
- package/dist/crypto/MsBrowserCrypto.js.map +1 -1
- package/dist/crypto/MsrBrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/MsrBrowserCrypto.js +23 -47
- package/dist/crypto/MsrBrowserCrypto.js.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.js +28 -49
- package/dist/crypto/PkceGenerator.js.map +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
- package/dist/crypto/SignedHttpRequest.js +15 -37
- package/dist/crypto/SignedHttpRequest.js.map +1 -1
- package/dist/encode/Base64Decode.d.ts.map +1 -1
- package/dist/encode/Base64Decode.js +32 -33
- package/dist/encode/Base64Decode.js.map +1 -1
- package/dist/encode/Base64Encode.d.ts.map +1 -1
- package/dist/encode/Base64Encode.js +34 -35
- package/dist/encode/Base64Encode.js.map +1 -1
- package/dist/error/BrowserAuthError.d.ts +1 -1
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.js +161 -163
- package/dist/error/BrowserAuthError.js.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +32 -36
- package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
- package/dist/error/NativeAuthError.d.ts +1 -1
- package/dist/error/NativeAuthError.d.ts.map +1 -1
- package/dist/error/NativeAuthError.js +26 -27
- package/dist/error/NativeAuthError.js.map +1 -1
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.js +33 -33
- package/dist/event/EventHandler.js.map +1 -1
- package/dist/event/EventMessage.d.ts +5 -5
- package/dist/event/EventMessage.d.ts.map +1 -1
- package/dist/event/EventMessage.js +18 -14
- package/dist/event/EventMessage.js.map +1 -1
- package/dist/event/EventType.js +1 -1
- package/dist/event/EventType.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +92 -123
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +6 -10
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.js +336 -393
- package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts +1 -1
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.js +224 -246
- package/dist/interaction_client/PopupClient.js.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.js +244 -292
- package/dist/interaction_client/RedirectClient.js.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js +50 -63
- package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentCacheClient.js +50 -81
- package/dist/interaction_client/SilentCacheClient.js.map +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.js +107 -125
- package/dist/interaction_client/SilentIframeClient.js.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.js +44 -72
- package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +144 -180
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +84 -110
- package/dist/interaction_handler/InteractionHandler.js.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.js +105 -122
- package/dist/interaction_handler/RedirectHandler.js.map +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.js +76 -65
- package/dist/interaction_handler/SilentHandler.js.map +1 -1
- package/dist/internals.js +1 -1
- package/dist/internals.js.map +1 -1
- package/dist/navigation/NavigationClient.d.ts.map +1 -1
- package/dist/navigation/NavigationClient.js +11 -14
- package/dist/navigation/NavigationClient.js.map +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.map +1 -1
- package/dist/network/FetchClient.js +66 -96
- package/dist/network/FetchClient.js.map +1 -1
- package/dist/network/XhrClient.d.ts.map +1 -1
- package/dist/network/XhrClient.js +38 -51
- package/dist/network/XhrClient.js.map +1 -1
- package/dist/operatingcontext/BaseOperatingContext.d.ts +41 -0
- package/dist/operatingcontext/BaseOperatingContext.d.ts.map +1 -0
- package/dist/operatingcontext/BaseOperatingContext.js +53 -0
- package/dist/operatingcontext/BaseOperatingContext.js.map +1 -0
- package/dist/operatingcontext/StandardOperatingContext.d.ts +26 -0
- package/dist/operatingcontext/StandardOperatingContext.d.ts.map +1 -0
- package/dist/operatingcontext/StandardOperatingContext.js +50 -0
- package/dist/operatingcontext/StandardOperatingContext.js.map +1 -0
- package/dist/operatingcontext/TeamsAppOperatingContext.d.ts +26 -0
- package/dist/operatingcontext/TeamsAppOperatingContext.d.ts.map +1 -0
- package/dist/operatingcontext/TeamsAppOperatingContext.js +49 -0
- package/dist/operatingcontext/TeamsAppOperatingContext.js.map +1 -0
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.js +3 -3
- package/dist/packageMetadata.js.map +1 -1
- 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/EndSessionPopupRequest.d.ts +1 -1
- 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 +1 -1
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/PopupWindowAttributes.d.ts +3 -3
- package/dist/request/PopupWindowAttributes.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/SilentRequest.d.ts +1 -1
- 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/telemetry/BrowserPerformanceClient.d.ts +1 -1
- package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.js +62 -57
- package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js +30 -31
- package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.js +10 -10
- package/dist/utils/BrowserConstants.js.map +1 -1
- package/dist/utils/BrowserProtocolUtils.d.ts +1 -1
- package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
- package/dist/utils/BrowserProtocolUtils.js +9 -12
- package/dist/utils/BrowserProtocolUtils.js.map +1 -1
- package/dist/utils/BrowserStringUtils.d.ts.map +1 -1
- package/dist/utils/BrowserStringUtils.js +83 -49
- package/dist/utils/BrowserStringUtils.js.map +1 -1
- package/dist/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/utils/BrowserUtils.js +51 -49
- package/dist/utils/BrowserUtils.js.map +1 -1
- package/dist/utils/MathUtils.d.ts.map +1 -1
- package/dist/utils/MathUtils.js +6 -9
- package/dist/utils/MathUtils.js.map +1 -1
- package/node_modules/@azure/msal-common/LICENSE +21 -0
- package/node_modules/@azure/msal-common/README.md +62 -0
- package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts +32 -0
- package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts +21 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.js +56 -0
- package/node_modules/@azure/msal-common/dist/account/AuthToken.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts +9 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.js +14 -0
- package/node_modules/@azure/msal-common/dist/account/CcsCredential.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts +15 -0
- package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.js +46 -0
- package/node_modules/@azure/msal-common/dist/account/ClientInfo.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts +9 -0
- package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts +66 -0
- package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts +216 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.js +688 -0
- package/node_modules/@azure/msal-common/dist/authority/Authority.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts +31 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js +58 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts +623 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js +881 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts +19 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js +24 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts +10 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js +19 -0
- package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts +2 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js +13 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js +13 -0
- package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts +12 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js +15 -0
- package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts +8 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js +17 -0
- package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts +31 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js +116 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts +7 -0
- package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
- package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts +444 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.js +1024 -0
- package/node_modules/@azure/msal-common/dist/cache/CacheManager.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts +57 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js +123 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts +100 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js +259 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts +40 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js +73 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js +85 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js +18 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts +89 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js +144 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts +35 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js +64 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts +37 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js +67 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts +13 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js +34 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js +30 -0
- package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts +166 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts +5 -0
- package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts +24 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js +30 -0
- package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts +63 -0
- package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts +72 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js +453 -0
- package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts +51 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.js +107 -0
- package/node_modules/@azure/msal-common/dist/client/BaseClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts +35 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js +260 -0
- package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts +25 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js +108 -0
- package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts +39 -0
- package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts +134 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js +101 -0
- package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts +63 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js +49 -0
- package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts +5 -0
- package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts +22 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js +44 -0
- package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts +58 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js +92 -0
- package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts +12 -0
- package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts +48 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.js +58 -0
- package/node_modules/@azure/msal-common/dist/error/AuthError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts +413 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js +526 -0
- package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts +199 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js +256 -0
- package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts +60 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js +86 -0
- package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts +29 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js +46 -0
- package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts +8 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.js +21 -0
- package/node_modules/@azure/msal-common/dist/error/ServerError.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/index.cjs.js +8975 -0
- package/node_modules/@azure/msal-common/dist/index.cjs.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/index.d.ts +94 -0
- package/node_modules/@azure/msal-common/dist/index.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/index.js +54 -0
- package/node_modules/@azure/msal-common/dist/index.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts +96 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.js +205 -0
- package/node_modules/@azure/msal-common/dist/logger/Logger.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts +30 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.js +21 -0
- package/node_modules/@azure/msal-common/dist/network/INetworkModule.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts +33 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.js +42 -0
- package/node_modules/@azure/msal-common/dist/network/NetworkManager.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts +17 -0
- package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts +42 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js +102 -0
- package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts +3 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.js +8 -0
- package/node_modules/@azure/msal-common/dist/packageMetadata.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js +63 -0
- package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts +38 -0
- package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts +28 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts +51 -0
- package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts +18 -0
- package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts +22 -0
- package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts +22 -0
- package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts +19 -0
- package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts +18 -0
- package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts +217 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js +385 -0
- package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts +34 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.js +92 -0
- package/node_modules/@azure/msal-common/dist/request/RequestValidator.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts +89 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.js +207 -0
- package/node_modules/@azure/msal-common/dist/request/ScopeSet.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts +40 -0
- package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts +14 -0
- package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts +26 -0
- package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts +16 -0
- package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts +5 -0
- package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts +73 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js +325 -0
- package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts +26 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts +45 -0
- package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts +43 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts +190 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js +413 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts +440 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js +232 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts +20 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js +43 -0
- package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts +66 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js +206 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
- package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/url/IUri.d.ts +13 -0
- package/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts +71 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.js +252 -0
- package/node_modules/@azure/msal-common/dist/url/UrlString.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts +332 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.js +378 -0
- package/node_modules/@azure/msal-common/dist/utils/Constants.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts +7 -0
- package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts +43 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js +80 -0
- package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts +54 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.js +131 -0
- package/node_modules/@azure/msal-common/dist/utils/StringUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts +28 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map +1 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js +50 -0
- package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js.map +1 -0
- package/node_modules/@azure/msal-common/package.json +79 -0
- package/package.json +99 -95
- package/dist/_virtual/_tslib.js +0 -117
- package/dist/_virtual/_tslib.js.map +0 -1
- package/dist/app/ClientApplication.d.ts.map +0 -1
- package/dist/app/ClientApplication.js +0 -1053
- package/dist/app/ClientApplication.js.map +0 -1
- package/dist/index.cjs.js +0 -18045
- package/dist/index.cjs.js.map +0 -1
- package/lib/msal-browser.js +0 -18051
- package/lib/msal-browser.js.map +0 -1
- package/lib/msal-browser.min.js +0 -70
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/*! @azure/msal-browser
|
|
1
|
+
/*! @azure/msal-browser v3.0.0-alpha.0 2023-05-03 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
4
3
|
import { PerformanceEvents, StringUtils, Constants, UrlString } from '@azure/msal-common';
|
|
5
4
|
import { InteractionHandler } from './InteractionHandler.js';
|
|
6
5
|
import { BrowserAuthError } from '../error/BrowserAuthError.js';
|
|
@@ -10,113 +9,126 @@ import { DEFAULT_IFRAME_TIMEOUT_MS } from '../config/Configuration.js';
|
|
|
10
9
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
10
|
* Licensed under the MIT License.
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
_this.pollIntervalMilliseconds = systemOptions.pollIntervalMilliseconds;
|
|
19
|
-
return _this;
|
|
12
|
+
class SilentHandler extends InteractionHandler {
|
|
13
|
+
constructor(authCodeModule, storageImpl, authCodeRequest, logger, systemOptions, performanceClient) {
|
|
14
|
+
super(authCodeModule, storageImpl, authCodeRequest, logger, performanceClient);
|
|
15
|
+
this.navigateFrameWait = systemOptions.navigateFrameWait;
|
|
16
|
+
this.pollIntervalMilliseconds = systemOptions.pollIntervalMilliseconds;
|
|
20
17
|
}
|
|
21
18
|
/**
|
|
22
19
|
* Creates a hidden iframe to given URL using user-requested scopes as an id.
|
|
23
20
|
* @param urlNavigate
|
|
24
21
|
* @param userRequestScopes
|
|
25
22
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return [4 /*yield*/, this.loadFrame(requestUrl)];
|
|
40
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
41
|
-
case 2: return [2 /*return*/, this.loadFrameSync(requestUrl)];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
};
|
|
23
|
+
async initiateAuthRequest(requestUrl) {
|
|
24
|
+
this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentHandlerInitiateAuthRequest, this.authCodeRequest.correlationId);
|
|
25
|
+
if (StringUtils.isEmpty(requestUrl)) {
|
|
26
|
+
// Throw error if request URL is empty.
|
|
27
|
+
this.logger.info("Navigate url is empty");
|
|
28
|
+
throw BrowserAuthError.createEmptyNavigationUriError();
|
|
29
|
+
}
|
|
30
|
+
if (this.navigateFrameWait) {
|
|
31
|
+
this.performanceClient.setPreQueueTime(PerformanceEvents.SilentHandlerLoadFrame, this.authCodeRequest.correlationId);
|
|
32
|
+
return await this.loadFrame(requestUrl);
|
|
33
|
+
}
|
|
34
|
+
return this.loadFrameSync(requestUrl);
|
|
35
|
+
}
|
|
46
36
|
/**
|
|
47
37
|
* Monitors an iframe content window until it loads a url with a known hash, or hits a specified timeout.
|
|
48
38
|
* @param iframe
|
|
49
39
|
* @param timeout
|
|
50
40
|
*/
|
|
51
|
-
|
|
52
|
-
var _this = this;
|
|
41
|
+
monitorIframeForHash(iframe, timeout) {
|
|
53
42
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentHandlerMonitorIframeForHash, this.authCodeRequest.correlationId);
|
|
54
|
-
return new Promise(
|
|
43
|
+
return new Promise((resolve, reject) => {
|
|
55
44
|
if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {
|
|
56
|
-
|
|
45
|
+
this.logger.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${timeout}ms) than the default (${DEFAULT_IFRAME_TIMEOUT_MS}ms). This may result in timeouts.`);
|
|
57
46
|
}
|
|
58
47
|
/*
|
|
59
48
|
* Polling for iframes can be purely timing based,
|
|
60
49
|
* since we don't need to account for interaction.
|
|
61
50
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
const nowMark = window.performance.now();
|
|
52
|
+
const timeoutMark = nowMark + timeout;
|
|
53
|
+
const intervalId = setInterval(() => {
|
|
65
54
|
if (window.performance.now() > timeoutMark) {
|
|
66
|
-
|
|
55
|
+
this.removeHiddenIframe(iframe);
|
|
67
56
|
clearInterval(intervalId);
|
|
68
57
|
reject(BrowserAuthError.createMonitorIframeTimeoutError());
|
|
69
58
|
return;
|
|
70
59
|
}
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
let href = Constants.EMPTY_STRING;
|
|
61
|
+
const contentWindow = iframe.contentWindow;
|
|
73
62
|
try {
|
|
74
63
|
/*
|
|
75
64
|
* Will throw if cross origin,
|
|
76
65
|
* which should be caught and ignored
|
|
77
66
|
* since we need the interval to keep running while on STS UI.
|
|
78
67
|
*/
|
|
79
|
-
href = contentWindow
|
|
68
|
+
href = contentWindow
|
|
69
|
+
? contentWindow.location.href
|
|
70
|
+
: Constants.EMPTY_STRING;
|
|
80
71
|
}
|
|
81
72
|
catch (e) { }
|
|
82
|
-
if (StringUtils.isEmpty(href)) {
|
|
73
|
+
if (StringUtils.isEmpty(href) || href === "about:blank") {
|
|
83
74
|
return;
|
|
84
75
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
const contentHash = contentWindow
|
|
77
|
+
? contentWindow.location.hash
|
|
78
|
+
: Constants.EMPTY_STRING;
|
|
79
|
+
if (contentHash) {
|
|
80
|
+
if (UrlString.hashContainsKnownProperties(contentHash)) {
|
|
81
|
+
// Success case
|
|
82
|
+
this.removeHiddenIframe(iframe);
|
|
83
|
+
clearInterval(intervalId);
|
|
84
|
+
resolve(contentHash);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// Hash is present but incorrect
|
|
89
|
+
this.logger.error("SilentHandler:monitorIFrameForHash - a hash is present in the iframe but it does not contain known properties. It's likely that the hash has been replaced by code running on the redirectUri page.");
|
|
90
|
+
this.logger.errorPii(`SilentHandler:monitorIFrameForHash - the url detected in the iframe is: ${href}`);
|
|
91
|
+
this.removeHiddenIframe(iframe);
|
|
92
|
+
clearInterval(intervalId);
|
|
93
|
+
reject(BrowserAuthError.createHashDoesNotContainKnownPropertiesError());
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
// No hash is present
|
|
99
|
+
this.logger.error("SilentHandler:monitorIFrameForHash - the request has returned to the redirectUri but a hash is not present in the iframe. It's likely that the hash has been removed or the page has been redirected by code running on the redirectUri page.");
|
|
100
|
+
this.logger.errorPii(`SilentHandler:monitorIFrameForHash - the url detected in the iframe is: ${href}`);
|
|
101
|
+
this.removeHiddenIframe(iframe);
|
|
89
102
|
clearInterval(intervalId);
|
|
90
|
-
|
|
103
|
+
reject(BrowserAuthError.createEmptyHashError());
|
|
91
104
|
return;
|
|
92
105
|
}
|
|
93
|
-
},
|
|
106
|
+
}, this.pollIntervalMilliseconds);
|
|
94
107
|
});
|
|
95
|
-
}
|
|
108
|
+
}
|
|
96
109
|
/**
|
|
97
110
|
* @hidden
|
|
98
111
|
* Loads iframe with authorization endpoint URL
|
|
99
112
|
* @ignore
|
|
100
113
|
*/
|
|
101
|
-
|
|
102
|
-
var _this = this;
|
|
114
|
+
loadFrame(urlNavigate) {
|
|
103
115
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentHandlerLoadFrame, this.authCodeRequest.correlationId);
|
|
104
116
|
/*
|
|
105
117
|
* This trick overcomes iframe navigation in IE
|
|
106
118
|
* IE does not load the page consistently in iframe
|
|
107
119
|
*/
|
|
108
|
-
return new Promise(
|
|
109
|
-
|
|
110
|
-
setTimeout(
|
|
120
|
+
return new Promise((resolve, reject) => {
|
|
121
|
+
const frameHandle = this.createHiddenIframe();
|
|
122
|
+
setTimeout(() => {
|
|
111
123
|
if (!frameHandle) {
|
|
112
124
|
reject("Unable to load iframe");
|
|
113
125
|
return;
|
|
114
126
|
}
|
|
115
127
|
frameHandle.src = urlNavigate;
|
|
116
128
|
resolve(frameHandle);
|
|
117
|
-
},
|
|
129
|
+
}, this.navigateFrameWait);
|
|
118
130
|
});
|
|
119
|
-
}
|
|
131
|
+
}
|
|
120
132
|
/**
|
|
121
133
|
* @hidden
|
|
122
134
|
* Loads the iframe synchronously when the navigateTimeFrame is set to `0`
|
|
@@ -124,18 +136,18 @@ var SilentHandler = /** @class */ (function (_super) {
|
|
|
124
136
|
* @param frameName
|
|
125
137
|
* @param logger
|
|
126
138
|
*/
|
|
127
|
-
|
|
128
|
-
|
|
139
|
+
loadFrameSync(urlNavigate) {
|
|
140
|
+
const frameHandle = this.createHiddenIframe();
|
|
129
141
|
frameHandle.src = urlNavigate;
|
|
130
142
|
return frameHandle;
|
|
131
|
-
}
|
|
143
|
+
}
|
|
132
144
|
/**
|
|
133
145
|
* @hidden
|
|
134
146
|
* Creates a new hidden iframe or gets an existing one for silent token renewal.
|
|
135
147
|
* @ignore
|
|
136
148
|
*/
|
|
137
|
-
|
|
138
|
-
|
|
149
|
+
createHiddenIframe() {
|
|
150
|
+
const authFrame = document.createElement("iframe");
|
|
139
151
|
authFrame.style.visibility = "hidden";
|
|
140
152
|
authFrame.style.position = "absolute";
|
|
141
153
|
authFrame.style.width = authFrame.style.height = "0";
|
|
@@ -143,19 +155,18 @@ var SilentHandler = /** @class */ (function (_super) {
|
|
|
143
155
|
authFrame.setAttribute("sandbox", "allow-scripts allow-same-origin allow-forms");
|
|
144
156
|
document.getElementsByTagName("body")[0].appendChild(authFrame);
|
|
145
157
|
return authFrame;
|
|
146
|
-
}
|
|
158
|
+
}
|
|
147
159
|
/**
|
|
148
160
|
* @hidden
|
|
149
161
|
* Removes a hidden iframe from the page.
|
|
150
162
|
* @ignore
|
|
151
163
|
*/
|
|
152
|
-
|
|
164
|
+
removeHiddenIframe(iframe) {
|
|
153
165
|
if (document.body === iframe.parentNode) {
|
|
154
166
|
document.body.removeChild(iframe);
|
|
155
167
|
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
}(InteractionHandler));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
159
170
|
|
|
160
171
|
export { SilentHandler };
|
|
161
172
|
//# sourceMappingURL=SilentHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SilentHandler.js","sources":["../../src/interaction_handler/SilentHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UrlString, StringUtils, CommonAuthorizationCodeRequest, AuthorizationCodeClient, Constants, Logger, IPerformanceClient, PerformanceEvents } from \"@azure/msal-common\";\nimport { InteractionHandler } from \"./InteractionHandler\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { BrowserSystemOptions, DEFAULT_IFRAME_TIMEOUT_MS } from \"../config/Configuration\";\n\nexport class SilentHandler extends InteractionHandler {\n\n private navigateFrameWait: number;\n private pollIntervalMilliseconds: number;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, logger: Logger, systemOptions: Required<Pick<BrowserSystemOptions, \"navigateFrameWait\" | \"pollIntervalMilliseconds\">>, performanceClient: IPerformanceClient) {\n super(authCodeModule, storageImpl, authCodeRequest, logger, performanceClient);\n this.navigateFrameWait = systemOptions.navigateFrameWait;\n this.pollIntervalMilliseconds = systemOptions.pollIntervalMilliseconds;\n }\n\n /**\n * Creates a hidden iframe to given URL using user-requested scopes as an id.\n * @param urlNavigate\n * @param userRequestScopes\n */\n async initiateAuthRequest(requestUrl: string): Promise<HTMLIFrameElement> {\n this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentHandlerInitiateAuthRequest, this.authCodeRequest.correlationId);\n\n if (StringUtils.isEmpty(requestUrl)) {\n // Throw error if request URL is empty.\n this.logger.info(\"Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n\n if (this.navigateFrameWait) {\n this.performanceClient.setPreQueueTime(PerformanceEvents.SilentHandlerLoadFrame, this.authCodeRequest.correlationId);\n return await this.loadFrame(requestUrl);\n }\n return this.loadFrameSync(requestUrl);\n }\n\n /**\n * Monitors an iframe content window until it loads a url with a known hash, or hits a specified timeout.\n * @param iframe\n * @param timeout\n */\n monitorIframeForHash(iframe: HTMLIFrameElement, timeout: number): Promise<string> {\n this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentHandlerMonitorIframeForHash, this.authCodeRequest.correlationId);\n\n return new Promise((resolve, reject) => {\n if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {\n this.logger.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${timeout}ms) than the default (${DEFAULT_IFRAME_TIMEOUT_MS}ms). This may result in timeouts.`);\n }\n\n /*\n * Polling for iframes can be purely timing based,\n * since we don't need to account for interaction.\n */\n const nowMark = window.performance.now();\n const timeoutMark = nowMark + timeout;\n\n const intervalId = setInterval(() => {\n if (window.performance.now() > timeoutMark) {\n this.removeHiddenIframe(iframe);\n clearInterval(intervalId);\n reject(BrowserAuthError.createMonitorIframeTimeoutError());\n return;\n }\n\n let href: string = Constants.EMPTY_STRING;\n const contentWindow = iframe.contentWindow;\n try {\n /*\n * Will throw if cross origin,\n * which should be caught and ignored\n * since we need the interval to keep running while on STS UI.\n */\n href = contentWindow ? contentWindow.location.href : Constants.EMPTY_STRING;\n } catch (e) {}\n\n if (StringUtils.isEmpty(href)) {\n return;\n }\n\n const contentHash = contentWindow ? contentWindow.location.hash: Constants.EMPTY_STRING;\n if (UrlString.hashContainsKnownProperties(contentHash)) {\n // Success case\n this.removeHiddenIframe(iframe);\n clearInterval(intervalId);\n resolve(contentHash);\n return;\n }\n }, this.pollIntervalMilliseconds);\n });\n }\n\n /**\n * @hidden\n * Loads iframe with authorization endpoint URL\n * @ignore\n */\n private loadFrame(urlNavigate: string): Promise<HTMLIFrameElement> {\n this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentHandlerLoadFrame, this.authCodeRequest.correlationId);\n\n /*\n * This trick overcomes iframe navigation in IE\n * IE does not load the page consistently in iframe\n */\n\n return new Promise((resolve, reject) => {\n const frameHandle = this.createHiddenIframe();\n\n setTimeout(() => {\n if (!frameHandle) {\n reject(\"Unable to load iframe\");\n return;\n }\n\n frameHandle.src = urlNavigate;\n\n resolve(frameHandle);\n }, this.navigateFrameWait);\n });\n }\n\n /**\n * @hidden\n * Loads the iframe synchronously when the navigateTimeFrame is set to `0`\n * @param urlNavigate\n * @param frameName\n * @param logger\n */\n private loadFrameSync(urlNavigate: string): HTMLIFrameElement{\n const frameHandle = this.createHiddenIframe();\n\n frameHandle.src = urlNavigate;\n\n return frameHandle;\n }\n\n /**\n * @hidden\n * Creates a new hidden iframe or gets an existing one for silent token renewal.\n * @ignore\n */\n private createHiddenIframe(): HTMLIFrameElement {\n const authFrame = document.createElement(\"iframe\");\n\n authFrame.style.visibility = \"hidden\";\n authFrame.style.position = \"absolute\";\n authFrame.style.width = authFrame.style.height = \"0\";\n authFrame.style.border = \"0\";\n authFrame.setAttribute(\"sandbox\", \"allow-scripts allow-same-origin allow-forms\");\n document.getElementsByTagName(\"body\")[0].appendChild(authFrame);\n\n return authFrame;\n }\n\n /**\n * @hidden\n * Removes a hidden iframe from the page.\n * @ignore\n */\n private removeHiddenIframe(iframe: HTMLIFrameElement): void {\n if (document.body === iframe.parentNode) {\n document.body.removeChild(iframe);\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAWmC,iCAAkB;IAKjD,uBAAY,cAAuC,EAAE,WAAgC,EAAE,eAA+C,EAAE,MAAc,EAAE,aAAqG,EAAE,iBAAqC;QAApS,YACI,kBAAM,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,CAAC,SAGjF;QAFG,KAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,iBAAiB,CAAC;QACzD,KAAI,CAAC,wBAAwB,GAAG,aAAa,CAAC,wBAAwB,CAAC;;KAC1E;;;;;;IAOK,2CAAmB,GAAzB,UAA0B,UAAkB;;;;;wBACxC,IAAI,CAAC,iBAAiB,CAAC,mBA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KAAK,MAAM,CAAC,UAAU,EAAE;AACrC,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACrC,SAAA;KACJ;AACJ;;;;"}
|
package/dist/internals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser
|
|
1
|
+
/*! @azure/msal-browser v3.0.0-alpha.0 2023-05-03 */
|
|
2
2
|
'use strict';
|
|
3
3
|
export { BrowserCacheManager } from './cache/BrowserCacheManager.js';
|
|
4
4
|
export { StandardInteractionClient } from './interaction_client/StandardInteractionClient.js';
|
package/dist/internals.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internals.js","sources":["../src/internals.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"internals.js","sources":["../src/internals.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;AAGG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationClient.d.ts","sourceRoot":"","sources":["../../src/navigation/NavigationClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,gBAAiB,YAAW,iBAAiB;IACtD;;;;OAIG;IACH,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NavigationClient.d.ts","sourceRoot":"","sources":["../../src/navigation/NavigationClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,gBAAiB,YAAW,iBAAiB;IACtD;;;;OAIG;IACH,gBAAgB,CACZ,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,OAAO,CAAC;IAInB;;;;OAIG;IACH,gBAAgB,CACZ,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,OAAO,CAAC;IAInB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;CAgBvC"}
|
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
/*! @azure/msal-browser
|
|
1
|
+
/*! @azure/msal-browser v3.0.0-alpha.0 2023-05-03 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/*
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
5
|
* Licensed under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
function NavigationClient() {
|
|
9
|
-
}
|
|
7
|
+
class NavigationClient {
|
|
10
8
|
/**
|
|
11
9
|
* Navigates to other pages within the same web application
|
|
12
10
|
* @param url
|
|
13
11
|
* @param options
|
|
14
12
|
*/
|
|
15
|
-
|
|
13
|
+
navigateInternal(url, options) {
|
|
16
14
|
return NavigationClient.defaultNavigateWindow(url, options);
|
|
17
|
-
}
|
|
15
|
+
}
|
|
18
16
|
/**
|
|
19
17
|
* Navigates to other pages outside the web application i.e. the Identity Provider
|
|
20
18
|
* @param url
|
|
21
19
|
* @param options
|
|
22
20
|
*/
|
|
23
|
-
|
|
21
|
+
navigateExternal(url, options) {
|
|
24
22
|
return NavigationClient.defaultNavigateWindow(url, options);
|
|
25
|
-
}
|
|
23
|
+
}
|
|
26
24
|
/**
|
|
27
25
|
* Default navigation implementation invoked by the internal and external functions
|
|
28
26
|
* @param url
|
|
29
27
|
* @param options
|
|
30
28
|
*/
|
|
31
|
-
|
|
29
|
+
static defaultNavigateWindow(url, options) {
|
|
32
30
|
if (options.noHistory) {
|
|
33
31
|
window.location.replace(url);
|
|
34
32
|
}
|
|
35
33
|
else {
|
|
36
34
|
window.location.assign(url);
|
|
37
35
|
}
|
|
38
|
-
return new Promise(
|
|
39
|
-
setTimeout(
|
|
36
|
+
return new Promise((resolve) => {
|
|
37
|
+
setTimeout(() => {
|
|
40
38
|
resolve(true);
|
|
41
39
|
}, options.timeout);
|
|
42
40
|
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}());
|
|
41
|
+
}
|
|
42
|
+
}
|
|
46
43
|
|
|
47
44
|
export { NavigationClient };
|
|
48
45
|
//# sourceMappingURL=NavigationClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationClient.js","sources":["../../src/navigation/NavigationClient.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"NavigationClient.js","sources":["../../src/navigation/NavigationClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;MAKU,gBAAgB,CAAA;AACzB;;;;AAIG;IACH,gBAAgB,CACZ,GAAW,EACX,OAA0B,EAAA;QAE1B,OAAO,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KAC/D;AAED;;;;AAIG;IACH,gBAAgB,CACZ,GAAW,EACX,OAA0B,EAAA;QAE1B,OAAO,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KAC/D;AAED;;;;AAIG;AACK,IAAA,OAAO,qBAAqB,CAChC,GAAW,EACX,OAA0B,EAAA;QAE1B,IAAI,OAAO,CAAC,SAAS,EAAE;AACnB,YAAA,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAChC,SAAA;AAAM,aAAA;AACH,YAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,SAAA;AAED,QAAA,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;YAC3B,UAAU,CAAC,MAAK;gBACZ,OAAO,CAAC,IAAI,CAAC,CAAC;AAClB,aAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACxB,SAAC,CAAC,CAAC;KACN;AACJ;;;;"}
|
|
@@ -2,7 +2,7 @@ import { ApiId } from "../utils/BrowserConstants";
|
|
|
2
2
|
/**
|
|
3
3
|
* Additional information passed to the navigateInternal and navigateExternal functions
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type NavigationOptions = {
|
|
6
6
|
/** The Id of the API that initiated navigation */
|
|
7
7
|
apiId: ApiId;
|
|
8
8
|
/** Suggested timeout (ms) based on the configuration provided to PublicClientApplication */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationOptions.d.ts","sourceRoot":"","sources":["../../src/navigation/NavigationOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"NavigationOptions.d.ts","sourceRoot":"","sources":["../../src/navigation/NavigationOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,kDAAkD;IAClD,KAAK,EAAE,KAAK,CAAC;IACb,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchClient.d.ts","sourceRoot":"","sources":["../../src/network/FetchClient.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"FetchClient.d.ts","sourceRoot":"","sources":["../../src/network/FetchClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAClB,MAAM,oBAAoB,CAAC;AAI5B;;GAEG;AACH,qBAAa,WAAY,YAAW,cAAc;IAC9C;;;;;OAKG;IACG,mBAAmB,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IA6B9B;;;;;OAKG;IACG,oBAAoB,CAAC,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAgC9B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,aAAa;CAOxB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/*! @azure/msal-browser
|
|
1
|
+
/*! @azure/msal-browser v3.0.0-alpha.0 2023-05-03 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
4
3
|
import { Constants } from '@azure/msal-common';
|
|
5
4
|
import { BrowserAuthError } from '../error/BrowserAuthError.js';
|
|
6
5
|
import { HTTP_REQUEST_TYPE } from '../utils/BrowserConstants.js';
|
|
@@ -12,127 +11,98 @@ import { HTTP_REQUEST_TYPE } from '../utils/BrowserConstants.js';
|
|
|
12
11
|
/**
|
|
13
12
|
* 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
|
|
14
13
|
*/
|
|
15
|
-
|
|
16
|
-
function FetchClient() {
|
|
17
|
-
}
|
|
14
|
+
class FetchClient {
|
|
18
15
|
/**
|
|
19
16
|
* Fetch Client for REST endpoints - Get request
|
|
20
17
|
* @param url
|
|
21
18
|
* @param headers
|
|
22
19
|
* @param body
|
|
23
20
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_b.trys.push([0, 2, , 3]);
|
|
31
|
-
return [4 /*yield*/, fetch(url, {
|
|
32
|
-
method: HTTP_REQUEST_TYPE.GET,
|
|
33
|
-
headers: this.getFetchHeaders(options)
|
|
34
|
-
})];
|
|
35
|
-
case 1:
|
|
36
|
-
response = _b.sent();
|
|
37
|
-
return [3 /*break*/, 3];
|
|
38
|
-
case 2:
|
|
39
|
-
e_1 = _b.sent();
|
|
40
|
-
if (window.navigator.onLine) {
|
|
41
|
-
throw BrowserAuthError.createGetRequestFailedError(e_1, url);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
throw BrowserAuthError.createNoNetworkConnectivityError();
|
|
45
|
-
}
|
|
46
|
-
case 3:
|
|
47
|
-
_b.trys.push([3, 5, , 6]);
|
|
48
|
-
_a = {
|
|
49
|
-
headers: this.getHeaderDict(response.headers)
|
|
50
|
-
};
|
|
51
|
-
return [4 /*yield*/, response.json()];
|
|
52
|
-
case 4: return [2 /*return*/, (_a.body = (_b.sent()),
|
|
53
|
-
_a.status = response.status,
|
|
54
|
-
_a)];
|
|
55
|
-
case 5:
|
|
56
|
-
_b.sent();
|
|
57
|
-
throw BrowserAuthError.createFailedToParseNetworkResponseError(url);
|
|
58
|
-
case 6: return [2 /*return*/];
|
|
59
|
-
}
|
|
21
|
+
async sendGetRequestAsync(url, options) {
|
|
22
|
+
let response;
|
|
23
|
+
try {
|
|
24
|
+
response = await fetch(url, {
|
|
25
|
+
method: HTTP_REQUEST_TYPE.GET,
|
|
26
|
+
headers: this.getFetchHeaders(options),
|
|
60
27
|
});
|
|
61
|
-
}
|
|
62
|
-
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
if (window.navigator.onLine) {
|
|
31
|
+
throw BrowserAuthError.createGetRequestFailedError(e, url);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw BrowserAuthError.createNoNetworkConnectivityError();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
return {
|
|
39
|
+
headers: this.getHeaderDict(response.headers),
|
|
40
|
+
body: (await response.json()),
|
|
41
|
+
status: response.status,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
throw BrowserAuthError.createFailedToParseNetworkResponseError(url);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
63
48
|
/**
|
|
64
49
|
* Fetch Client for REST endpoints - Post request
|
|
65
50
|
* @param url
|
|
66
51
|
* @param headers
|
|
67
52
|
* @param body
|
|
68
53
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
case 1:
|
|
78
|
-
_b.trys.push([1, 3, , 4]);
|
|
79
|
-
return [4 /*yield*/, fetch(url, {
|
|
80
|
-
method: HTTP_REQUEST_TYPE.POST,
|
|
81
|
-
headers: this.getFetchHeaders(options),
|
|
82
|
-
body: reqBody
|
|
83
|
-
})];
|
|
84
|
-
case 2:
|
|
85
|
-
response = _b.sent();
|
|
86
|
-
return [3 /*break*/, 4];
|
|
87
|
-
case 3:
|
|
88
|
-
e_3 = _b.sent();
|
|
89
|
-
if (window.navigator.onLine) {
|
|
90
|
-
throw BrowserAuthError.createPostRequestFailedError(e_3, url);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
throw BrowserAuthError.createNoNetworkConnectivityError();
|
|
94
|
-
}
|
|
95
|
-
case 4:
|
|
96
|
-
_b.trys.push([4, 6, , 7]);
|
|
97
|
-
_a = {
|
|
98
|
-
headers: this.getHeaderDict(response.headers)
|
|
99
|
-
};
|
|
100
|
-
return [4 /*yield*/, response.json()];
|
|
101
|
-
case 5: return [2 /*return*/, (_a.body = (_b.sent()),
|
|
102
|
-
_a.status = response.status,
|
|
103
|
-
_a)];
|
|
104
|
-
case 6:
|
|
105
|
-
_b.sent();
|
|
106
|
-
throw BrowserAuthError.createFailedToParseNetworkResponseError(url);
|
|
107
|
-
case 7: return [2 /*return*/];
|
|
108
|
-
}
|
|
54
|
+
async sendPostRequestAsync(url, options) {
|
|
55
|
+
const reqBody = (options && options.body) || Constants.EMPTY_STRING;
|
|
56
|
+
let response;
|
|
57
|
+
try {
|
|
58
|
+
response = await fetch(url, {
|
|
59
|
+
method: HTTP_REQUEST_TYPE.POST,
|
|
60
|
+
headers: this.getFetchHeaders(options),
|
|
61
|
+
body: reqBody,
|
|
109
62
|
});
|
|
110
|
-
}
|
|
111
|
-
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
if (window.navigator.onLine) {
|
|
66
|
+
throw BrowserAuthError.createPostRequestFailedError(e, url);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
throw BrowserAuthError.createNoNetworkConnectivityError();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
return {
|
|
74
|
+
headers: this.getHeaderDict(response.headers),
|
|
75
|
+
body: (await response.json()),
|
|
76
|
+
status: response.status,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
throw BrowserAuthError.createFailedToParseNetworkResponseError(url);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
112
83
|
/**
|
|
113
84
|
* Get Fetch API Headers object from string map
|
|
114
85
|
* @param inputHeaders
|
|
115
86
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
87
|
+
getFetchHeaders(options) {
|
|
88
|
+
const headers = new Headers();
|
|
118
89
|
if (!(options && options.headers)) {
|
|
119
90
|
return headers;
|
|
120
91
|
}
|
|
121
|
-
|
|
122
|
-
Object.keys(optionsHeaders).forEach(
|
|
92
|
+
const optionsHeaders = options.headers;
|
|
93
|
+
Object.keys(optionsHeaders).forEach((key) => {
|
|
123
94
|
headers.append(key, optionsHeaders[key]);
|
|
124
95
|
});
|
|
125
96
|
return headers;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
headers.forEach(
|
|
97
|
+
}
|
|
98
|
+
getHeaderDict(headers) {
|
|
99
|
+
const headerDict = {};
|
|
100
|
+
headers.forEach((value, key) => {
|
|
130
101
|
headerDict[key] = value;
|
|
131
102
|
});
|
|
132
103
|
return headerDict;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
}());
|
|
104
|
+
}
|
|
105
|
+
}
|
|
136
106
|
|
|
137
107
|
export { FetchClient };
|
|
138
108
|
//# sourceMappingURL=FetchClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchClient.js","sources":["../../src/network/FetchClient.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"FetchClient.js","sources":["../../src/network/FetchClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAWH;;AAEG;MACU,WAAW,CAAA;AACpB;;;;;AAKG;AACH,IAAA,MAAM,mBAAmB,CACrB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,IAAI,QAAQ,CAAC;QACb,IAAI;AACA,YAAA,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBACxB,MAAM,EAAE,iBAAiB,CAAC,GAAG;AAC7B,gBAAA,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;AACzC,aAAA,CAAC,CAAC;AACN,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE;gBACzB,MAAM,gBAAgB,CAAC,2BAA2B,CAC9C,CAAW,EACX,GAAG,CACN,CAAC;AACL,aAAA;AAAM,iBAAA;AACH,gBAAA,MAAM,gBAAgB,CAAC,gCAAgC,EAAE,CAAC;AAC7D,aAAA;AACJ,SAAA;QAED,IAAI;YACA,OAAO;gBACH,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC7C,gBAAA,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAM;gBAClC,MAAM,EAAE,QAAQ,CAAC,MAAM;aAC1B,CAAC;AACL,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,MAAM,gBAAgB,CAAC,uCAAuC,CAAC,GAAG,CAAC,CAAC;AACvE,SAAA;KACJ;AAED;;;;;AAKG;AACH,IAAA,MAAM,oBAAoB,CACtB,GAAW,EACX,OAA+B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,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;YACxC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7C,SAAC,CAAC,CAAC;AACH,QAAA,OAAO,OAAO,CAAC;KAClB;AAEO,IAAA,aAAa,CAAC,OAAgB,EAAA;QAClC,MAAM,UAAU,GAA2B,EAAE,CAAC;QAC9C,OAAO,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,GAAW,KAAI;AAC3C,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5B,SAAC,CAAC,CAAC;AACH,QAAA,OAAO,UAAU,CAAC;KACrB;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XhrClient.d.ts","sourceRoot":"","sources":["../../src/network/XhrClient.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"XhrClient.d.ts","sourceRoot":"","sources":["../../src/network/XhrClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAClB,MAAM,oBAAoB,CAAC;AAI5B;;GAEG;AACH,qBAAa,SAAU,YAAW,cAAc;IAC5C;;;;;OAKG;IACG,mBAAmB,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAI9B;;;;;OAKG;IACG,oBAAoB,CAAC,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAI9B;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IA8ExB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAYrB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;CAexB"}
|