@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
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { StringUtils } from '../utils/StringUtils.js';
|
|
4
|
+
import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
|
|
5
|
+
import { CodeChallengeMethodValues, PromptValue } from '../utils/Constants.js';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Validates server consumable params from the "request" objects
|
|
13
|
+
*/
|
|
14
|
+
class RequestValidator {
|
|
15
|
+
/**
|
|
16
|
+
* Utility to check if the `redirectUri` in the request is a non-null value
|
|
17
|
+
* @param redirectUri
|
|
18
|
+
*/
|
|
19
|
+
static validateRedirectUri(redirectUri) {
|
|
20
|
+
if (StringUtils.isEmpty(redirectUri)) {
|
|
21
|
+
throw ClientConfigurationError.createRedirectUriEmptyError();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Utility to validate prompt sent by the user in the request
|
|
26
|
+
* @param prompt
|
|
27
|
+
*/
|
|
28
|
+
static validatePrompt(prompt) {
|
|
29
|
+
const promptValues = [];
|
|
30
|
+
for (const value in PromptValue) {
|
|
31
|
+
promptValues.push(PromptValue[value]);
|
|
32
|
+
}
|
|
33
|
+
if (promptValues.indexOf(prompt) < 0) {
|
|
34
|
+
throw ClientConfigurationError.createInvalidPromptError(prompt);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
static validateClaims(claims) {
|
|
38
|
+
try {
|
|
39
|
+
JSON.parse(claims);
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
throw ClientConfigurationError.createInvalidClaimsRequestError();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Utility to validate code_challenge and code_challenge_method
|
|
47
|
+
* @param codeChallenge
|
|
48
|
+
* @param codeChallengeMethod
|
|
49
|
+
*/
|
|
50
|
+
static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) {
|
|
51
|
+
if (StringUtils.isEmpty(codeChallenge) ||
|
|
52
|
+
StringUtils.isEmpty(codeChallengeMethod)) {
|
|
53
|
+
throw ClientConfigurationError.createInvalidCodeChallengeParamsError();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.validateCodeChallengeMethod(codeChallengeMethod);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Utility to validate code_challenge_method
|
|
61
|
+
* @param codeChallengeMethod
|
|
62
|
+
*/
|
|
63
|
+
static validateCodeChallengeMethod(codeChallengeMethod) {
|
|
64
|
+
if ([
|
|
65
|
+
CodeChallengeMethodValues.PLAIN,
|
|
66
|
+
CodeChallengeMethodValues.S256,
|
|
67
|
+
].indexOf(codeChallengeMethod) < 0) {
|
|
68
|
+
throw ClientConfigurationError.createInvalidCodeChallengeMethodError();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
|
|
73
|
+
* @param request
|
|
74
|
+
*/
|
|
75
|
+
static sanitizeEQParams(eQParams, queryParams) {
|
|
76
|
+
if (!eQParams) {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
// Remove any query parameters already included in SSO params
|
|
80
|
+
queryParams.forEach((value, key) => {
|
|
81
|
+
if (eQParams[key]) {
|
|
82
|
+
delete eQParams[key];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
// remove empty string parameters
|
|
86
|
+
return Object.fromEntries(Object.entries(eQParams).filter(([key, value]) => value !== "") // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { RequestValidator };
|
|
92
|
+
//# sourceMappingURL=RequestValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestValidator.js","sources":["../../src/request/RequestValidator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAO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A,yBAAyB,CAAC,IAAI;AACjC,SAAA,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC,EACpC;AACE,YAAA,MAAM,wBAAwB,CAAC,qCAAqC,EAAE,CAAC;AAC1E,SAAA;KACJ;AAED;;;AAGG;AACH,IAAA,OAAO,gBAAgB,CACnB,QAAoB,EACpB,WAAgC,EAAA;QAEhC,IAAI,CAAC,QAAQ,EAAE;AACX,YAAA,OAAO,EAAE,CAAC;AACb,SAAA;;QAGD,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,KAAI;AAC/B,YAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;AACf,gBAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;AACxB,aAAA;AACL,SAAC,CAAC,CAAC;;QAGH,OAAO,MAAM,CAAC,WAAW,CACrB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;SAClE,CAAC;KACL;AACJ;;;;"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes
|
|
3
|
+
* the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions
|
|
4
|
+
* to ensure uniqueness of strings.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ScopeSet {
|
|
7
|
+
private scopes;
|
|
8
|
+
constructor(inputScopes: Array<string>);
|
|
9
|
+
/**
|
|
10
|
+
* Factory method to create ScopeSet from space-delimited string
|
|
11
|
+
* @param inputScopeString
|
|
12
|
+
* @param appClientId
|
|
13
|
+
* @param scopesRequired
|
|
14
|
+
*/
|
|
15
|
+
static fromString(inputScopeString: string): ScopeSet;
|
|
16
|
+
/**
|
|
17
|
+
* Creates the set of scopes to search for in cache lookups
|
|
18
|
+
* @param inputScopeString
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
static createSearchScopes(inputScopeString: Array<string>): ScopeSet;
|
|
22
|
+
/**
|
|
23
|
+
* Used to validate the scopes input parameter requested by the developer.
|
|
24
|
+
* @param {Array<string>} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.
|
|
25
|
+
* @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not
|
|
26
|
+
*/
|
|
27
|
+
private validateInputScopes;
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given scope is present in this set of scopes.
|
|
30
|
+
* @param scope
|
|
31
|
+
*/
|
|
32
|
+
containsScope(scope: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Check if a set of scopes is present in this set of scopes.
|
|
35
|
+
* @param scopeSet
|
|
36
|
+
*/
|
|
37
|
+
containsScopeSet(scopeSet: ScopeSet): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Check if set of scopes contains only the defaults
|
|
40
|
+
*/
|
|
41
|
+
containsOnlyOIDCScopes(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Appends single scope if passed
|
|
44
|
+
* @param newScope
|
|
45
|
+
*/
|
|
46
|
+
appendScope(newScope: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Appends multiple scopes if passed
|
|
49
|
+
* @param newScopes
|
|
50
|
+
*/
|
|
51
|
+
appendScopes(newScopes: Array<string>): void;
|
|
52
|
+
/**
|
|
53
|
+
* Removes element from set of scopes.
|
|
54
|
+
* @param scope
|
|
55
|
+
*/
|
|
56
|
+
removeScope(scope: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Removes default scopes from set of scopes
|
|
59
|
+
* Primarily used to prevent cache misses if the default scopes are not returned from the server
|
|
60
|
+
*/
|
|
61
|
+
removeOIDCScopes(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Combines an array of scopes with the current set of scopes.
|
|
64
|
+
* @param otherScopes
|
|
65
|
+
*/
|
|
66
|
+
unionScopeSets(otherScopes: ScopeSet): Set<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Check if scopes intersect between this set and another.
|
|
69
|
+
* @param otherScopes
|
|
70
|
+
*/
|
|
71
|
+
intersectingScopeSets(otherScopes: ScopeSet): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Returns size of set of scopes.
|
|
74
|
+
*/
|
|
75
|
+
getScopeCount(): number;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the scopes as an array of string values
|
|
78
|
+
*/
|
|
79
|
+
asArray(): Array<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Prints scopes into a space-delimited string
|
|
82
|
+
*/
|
|
83
|
+
printScopes(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Prints scopes into a space-delimited lower-case string (used for caching)
|
|
86
|
+
*/
|
|
87
|
+
printScopesLowerCase(): string;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=ScopeSet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScopeSet.d.ts","sourceRoot":"","sources":["../../src/request/ScopeSet.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qBAAa,QAAQ;IAEjB,OAAO,CAAC,MAAM,CAAc;gBAEhB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;IAgBtC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ;IAMrD;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ;IAWpE;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IASrC;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAW7C;;OAEG;IACH,sBAAsB,IAAI,OAAO;IAWjC;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMnC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAQ5C;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOhC;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAMxB;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC;IAYlD;;;OAGG;IACH,qBAAqB,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO;IAgBrD;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;IAMxB;;OAEG;IACH,WAAW,IAAI,MAAM;IAQrB;;OAEG;IACH,oBAAoB,IAAI,MAAM;CAGjC"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
|
|
4
|
+
import { StringUtils } from '../utils/StringUtils.js';
|
|
5
|
+
import { ClientAuthError } from '../error/ClientAuthError.js';
|
|
6
|
+
import { Constants, OIDC_SCOPES } from '../utils/Constants.js';
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
+
* Licensed under the MIT License.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes
|
|
14
|
+
* the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions
|
|
15
|
+
* to ensure uniqueness of strings.
|
|
16
|
+
*/
|
|
17
|
+
class ScopeSet {
|
|
18
|
+
constructor(inputScopes) {
|
|
19
|
+
// Filter empty string and null/undefined array items
|
|
20
|
+
const scopeArr = inputScopes
|
|
21
|
+
? StringUtils.trimArrayEntries([...inputScopes])
|
|
22
|
+
: [];
|
|
23
|
+
const filteredInput = scopeArr
|
|
24
|
+
? StringUtils.removeEmptyStringsFromArray(scopeArr)
|
|
25
|
+
: [];
|
|
26
|
+
// Validate and filter scopes (validate function throws if validation fails)
|
|
27
|
+
this.validateInputScopes(filteredInput);
|
|
28
|
+
this.scopes = new Set(); // Iterator in constructor not supported by IE11
|
|
29
|
+
filteredInput.forEach((scope) => this.scopes.add(scope));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Factory method to create ScopeSet from space-delimited string
|
|
33
|
+
* @param inputScopeString
|
|
34
|
+
* @param appClientId
|
|
35
|
+
* @param scopesRequired
|
|
36
|
+
*/
|
|
37
|
+
static fromString(inputScopeString) {
|
|
38
|
+
const scopeString = inputScopeString || Constants.EMPTY_STRING;
|
|
39
|
+
const inputScopes = scopeString.split(" ");
|
|
40
|
+
return new ScopeSet(inputScopes);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates the set of scopes to search for in cache lookups
|
|
44
|
+
* @param inputScopeString
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
static createSearchScopes(inputScopeString) {
|
|
48
|
+
const scopeSet = new ScopeSet(inputScopeString);
|
|
49
|
+
if (!scopeSet.containsOnlyOIDCScopes()) {
|
|
50
|
+
scopeSet.removeOIDCScopes();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
scopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE);
|
|
54
|
+
}
|
|
55
|
+
return scopeSet;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Used to validate the scopes input parameter requested by the developer.
|
|
59
|
+
* @param {Array<string>} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.
|
|
60
|
+
* @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not
|
|
61
|
+
*/
|
|
62
|
+
validateInputScopes(inputScopes) {
|
|
63
|
+
// Check if scopes are required but not given or is an empty array
|
|
64
|
+
if (!inputScopes || inputScopes.length < 1) {
|
|
65
|
+
throw ClientConfigurationError.createEmptyScopesArrayError();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given scope is present in this set of scopes.
|
|
70
|
+
* @param scope
|
|
71
|
+
*/
|
|
72
|
+
containsScope(scope) {
|
|
73
|
+
const lowerCaseScopes = this.printScopesLowerCase().split(" ");
|
|
74
|
+
const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes);
|
|
75
|
+
// compare lowercase scopes
|
|
76
|
+
return !StringUtils.isEmpty(scope)
|
|
77
|
+
? lowerCaseScopesSet.scopes.has(scope.toLowerCase())
|
|
78
|
+
: false;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if a set of scopes is present in this set of scopes.
|
|
82
|
+
* @param scopeSet
|
|
83
|
+
*/
|
|
84
|
+
containsScopeSet(scopeSet) {
|
|
85
|
+
if (!scopeSet || scopeSet.scopes.size <= 0) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return (this.scopes.size >= scopeSet.scopes.size &&
|
|
89
|
+
scopeSet.asArray().every((scope) => this.containsScope(scope)));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check if set of scopes contains only the defaults
|
|
93
|
+
*/
|
|
94
|
+
containsOnlyOIDCScopes() {
|
|
95
|
+
let defaultScopeCount = 0;
|
|
96
|
+
OIDC_SCOPES.forEach((defaultScope) => {
|
|
97
|
+
if (this.containsScope(defaultScope)) {
|
|
98
|
+
defaultScopeCount += 1;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return this.scopes.size === defaultScopeCount;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Appends single scope if passed
|
|
105
|
+
* @param newScope
|
|
106
|
+
*/
|
|
107
|
+
appendScope(newScope) {
|
|
108
|
+
if (!StringUtils.isEmpty(newScope)) {
|
|
109
|
+
this.scopes.add(newScope.trim());
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Appends multiple scopes if passed
|
|
114
|
+
* @param newScopes
|
|
115
|
+
*/
|
|
116
|
+
appendScopes(newScopes) {
|
|
117
|
+
try {
|
|
118
|
+
newScopes.forEach((newScope) => this.appendScope(newScope));
|
|
119
|
+
}
|
|
120
|
+
catch (e) {
|
|
121
|
+
throw ClientAuthError.createAppendScopeSetError(e);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Removes element from set of scopes.
|
|
126
|
+
* @param scope
|
|
127
|
+
*/
|
|
128
|
+
removeScope(scope) {
|
|
129
|
+
if (StringUtils.isEmpty(scope)) {
|
|
130
|
+
throw ClientAuthError.createRemoveEmptyScopeFromSetError(scope);
|
|
131
|
+
}
|
|
132
|
+
this.scopes.delete(scope.trim());
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Removes default scopes from set of scopes
|
|
136
|
+
* Primarily used to prevent cache misses if the default scopes are not returned from the server
|
|
137
|
+
*/
|
|
138
|
+
removeOIDCScopes() {
|
|
139
|
+
OIDC_SCOPES.forEach((defaultScope) => {
|
|
140
|
+
this.scopes.delete(defaultScope);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Combines an array of scopes with the current set of scopes.
|
|
145
|
+
* @param otherScopes
|
|
146
|
+
*/
|
|
147
|
+
unionScopeSets(otherScopes) {
|
|
148
|
+
if (!otherScopes) {
|
|
149
|
+
throw ClientAuthError.createEmptyInputScopeSetError();
|
|
150
|
+
}
|
|
151
|
+
const unionScopes = new Set(); // Iterator in constructor not supported in IE11
|
|
152
|
+
otherScopes.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase()));
|
|
153
|
+
this.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase()));
|
|
154
|
+
return unionScopes;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Check if scopes intersect between this set and another.
|
|
158
|
+
* @param otherScopes
|
|
159
|
+
*/
|
|
160
|
+
intersectingScopeSets(otherScopes) {
|
|
161
|
+
if (!otherScopes) {
|
|
162
|
+
throw ClientAuthError.createEmptyInputScopeSetError();
|
|
163
|
+
}
|
|
164
|
+
// Do not allow OIDC scopes to be the only intersecting scopes
|
|
165
|
+
if (!otherScopes.containsOnlyOIDCScopes()) {
|
|
166
|
+
otherScopes.removeOIDCScopes();
|
|
167
|
+
}
|
|
168
|
+
const unionScopes = this.unionScopeSets(otherScopes);
|
|
169
|
+
const sizeOtherScopes = otherScopes.getScopeCount();
|
|
170
|
+
const sizeThisScopes = this.getScopeCount();
|
|
171
|
+
const sizeUnionScopes = unionScopes.size;
|
|
172
|
+
return sizeUnionScopes < sizeThisScopes + sizeOtherScopes;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Returns size of set of scopes.
|
|
176
|
+
*/
|
|
177
|
+
getScopeCount() {
|
|
178
|
+
return this.scopes.size;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Returns the scopes as an array of string values
|
|
182
|
+
*/
|
|
183
|
+
asArray() {
|
|
184
|
+
const array = [];
|
|
185
|
+
this.scopes.forEach((val) => array.push(val));
|
|
186
|
+
return array;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Prints scopes into a space-delimited string
|
|
190
|
+
*/
|
|
191
|
+
printScopes() {
|
|
192
|
+
if (this.scopes) {
|
|
193
|
+
const scopeArr = this.asArray();
|
|
194
|
+
return scopeArr.join(" ");
|
|
195
|
+
}
|
|
196
|
+
return Constants.EMPTY_STRING;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Prints scopes into a space-delimited lower-case string (used for caching)
|
|
200
|
+
*/
|
|
201
|
+
printScopesLowerCase() {
|
|
202
|
+
return this.printScopes().toLowerCase();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { ScopeSet };
|
|
207
|
+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YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;AAChC,YAAA,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,SAAA;QACD,OAAO,SAAS,CAAC,YAAY,CAAC;KACjC;AAED;;AAEG;IACH,oBAAoB,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;KAC3C;AACJ;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AccountInfo } from "../account/AccountInfo";
|
|
2
|
+
/**
|
|
3
|
+
* Result returned from the authority's token endpoint.
|
|
4
|
+
* - uniqueId - `oid` or `sub` claim from ID token
|
|
5
|
+
* - tenantId - `tid` claim from ID token
|
|
6
|
+
* - scopes - Scopes that are validated for the respective token
|
|
7
|
+
* - account - An account object representation of the currently signed-in user
|
|
8
|
+
* - idToken - Id token received as part of the response
|
|
9
|
+
* - idTokenClaims - MSAL-relevant ID token claims
|
|
10
|
+
* - accessToken - Access token or SSH certificate received as part of the response
|
|
11
|
+
* - fromCache - Boolean denoting whether token came from cache
|
|
12
|
+
* - expiresOn - Javascript Date object representing relative expiration of access token
|
|
13
|
+
* - extExpiresOn - Javascript Date object representing extended relative expiration of access token in case of server outage
|
|
14
|
+
* - state - Value passed in by user in request
|
|
15
|
+
* - familyId - Family ID identifier, usually only used for refresh tokens
|
|
16
|
+
* - requestId - Request ID returned as part of the response
|
|
17
|
+
*/
|
|
18
|
+
export type AuthenticationResult = {
|
|
19
|
+
authority: string;
|
|
20
|
+
uniqueId: string;
|
|
21
|
+
tenantId: string;
|
|
22
|
+
scopes: Array<string>;
|
|
23
|
+
account: AccountInfo | null;
|
|
24
|
+
idToken: string;
|
|
25
|
+
idTokenClaims: object;
|
|
26
|
+
accessToken: string;
|
|
27
|
+
fromCache: boolean;
|
|
28
|
+
expiresOn: Date | null;
|
|
29
|
+
tokenType: string;
|
|
30
|
+
correlationId: string;
|
|
31
|
+
requestId?: string;
|
|
32
|
+
extExpiresOn?: Date;
|
|
33
|
+
state?: string;
|
|
34
|
+
familyId?: string;
|
|
35
|
+
cloudGraphHostName?: string;
|
|
36
|
+
msGraphHost?: string;
|
|
37
|
+
code?: string;
|
|
38
|
+
fromNativeBroker?: boolean;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=AuthenticationResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthenticationResult.d.ts","sourceRoot":"","sources":["../../src/response/AuthenticationResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response returned after processing the code response query string or fragment.
|
|
3
|
+
*/
|
|
4
|
+
export type AuthorizationCodePayload = {
|
|
5
|
+
code: string;
|
|
6
|
+
cloud_instance_name?: string;
|
|
7
|
+
cloud_instance_host_name?: string;
|
|
8
|
+
cloud_graph_host_name?: string;
|
|
9
|
+
msgraph_host?: string;
|
|
10
|
+
state?: string;
|
|
11
|
+
nonce?: string;
|
|
12
|
+
client_info?: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=AuthorizationCodePayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthorizationCodePayload.d.ts","sourceRoot":"","sources":["../../src/response/AuthorizationCodePayload.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeviceCode returned by the security token service device code endpoint containing information necessary for device code flow.
|
|
3
|
+
* - userCode: code which user needs to provide when authenticating at the verification URI
|
|
4
|
+
* - deviceCode: code which should be included in the request for the access token
|
|
5
|
+
* - verificationUri: URI where user can authenticate
|
|
6
|
+
* - expiresIn: expiration time of the device code in seconds
|
|
7
|
+
* - interval: interval at which the STS should be polled at
|
|
8
|
+
* - message: message which should be displayed to the user
|
|
9
|
+
*/
|
|
10
|
+
export type DeviceCodeResponse = {
|
|
11
|
+
userCode: string;
|
|
12
|
+
deviceCode: string;
|
|
13
|
+
verificationUri: string;
|
|
14
|
+
expiresIn: number;
|
|
15
|
+
interval: number;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
export type ServerDeviceCodeResponse = {
|
|
19
|
+
user_code: string;
|
|
20
|
+
device_code: string;
|
|
21
|
+
verification_uri: string;
|
|
22
|
+
expires_in: number;
|
|
23
|
+
interval: number;
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=DeviceCodeResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceCodeResponse.d.ts","sourceRoot":"","sources":["../../src/response/DeviceCodeResponse.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse";
|
|
2
|
+
/**
|
|
3
|
+
* Response object used for loading external tokens to cache.
|
|
4
|
+
* - token_type: Indicates the token type value. The only type that Azure AD supports is Bearer.
|
|
5
|
+
* - scope: The scopes that the access_token is valid for.
|
|
6
|
+
* - expires_in: How long the access token is valid (in seconds).
|
|
7
|
+
* - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in.
|
|
8
|
+
* - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires.
|
|
9
|
+
* - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API.
|
|
10
|
+
* - client_info: Client info object
|
|
11
|
+
*/
|
|
12
|
+
export type ExternalTokenResponse = Pick<ServerAuthorizationTokenResponse, "token_type" | "scope" | "expires_in" | "id_token" | "refresh_token"> & {
|
|
13
|
+
access_token?: string;
|
|
14
|
+
client_info?: string;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=ExternalTokenResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalTokenResponse.d.ts","sourceRoot":"","sources":["../../src/response/ExternalTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACpC,gCAAgC,EAChC,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,eAAe,CACvE,GAAG;IACA,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMDSBadResponse.d.ts","sourceRoot":"","sources":["../../src/response/IMDSBadResponse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse";
|
|
2
|
+
import { ICrypto } from "../crypto/ICrypto";
|
|
3
|
+
import { ServerAuthorizationCodeResponse } from "./ServerAuthorizationCodeResponse";
|
|
4
|
+
import { Logger } from "../logger/Logger";
|
|
5
|
+
import { AuthToken } from "../account/AuthToken";
|
|
6
|
+
import { AuthenticationResult } from "./AuthenticationResult";
|
|
7
|
+
import { Authority } from "../authority/Authority";
|
|
8
|
+
import { CacheRecord } from "../cache/entities/CacheRecord";
|
|
9
|
+
import { CacheManager } from "../cache/CacheManager";
|
|
10
|
+
import { RequestStateObject } from "../utils/ProtocolUtils";
|
|
11
|
+
import { ICachePlugin } from "../cache/interface/ICachePlugin";
|
|
12
|
+
import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache";
|
|
13
|
+
import { AuthorizationCodePayload } from "./AuthorizationCodePayload";
|
|
14
|
+
import { BaseAuthRequest } from "../request/BaseAuthRequest";
|
|
15
|
+
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
|
|
16
|
+
/**
|
|
17
|
+
* Class that handles response parsing.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ResponseHandler {
|
|
20
|
+
private clientId;
|
|
21
|
+
private cacheStorage;
|
|
22
|
+
private cryptoObj;
|
|
23
|
+
private logger;
|
|
24
|
+
private homeAccountIdentifier;
|
|
25
|
+
private serializableCache;
|
|
26
|
+
private persistencePlugin;
|
|
27
|
+
private performanceClient?;
|
|
28
|
+
constructor(clientId: string, cacheStorage: CacheManager, cryptoObj: ICrypto, logger: Logger, serializableCache: ISerializableTokenCache | null, persistencePlugin: ICachePlugin | null, performanceClient?: IPerformanceClient);
|
|
29
|
+
/**
|
|
30
|
+
* Function which validates server authorization code response.
|
|
31
|
+
* @param serverResponseHash
|
|
32
|
+
* @param cachedState
|
|
33
|
+
* @param cryptoObj
|
|
34
|
+
*/
|
|
35
|
+
validateServerAuthorizationCodeResponse(serverResponseHash: ServerAuthorizationCodeResponse, cachedState: string, cryptoObj: ICrypto): void;
|
|
36
|
+
/**
|
|
37
|
+
* Function which validates server authorization token response.
|
|
38
|
+
* @param serverResponse
|
|
39
|
+
*/
|
|
40
|
+
validateTokenResponse(serverResponse: ServerAuthorizationTokenResponse): void;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a constructed token response based on given string. Also manages the cache updates and cleanups.
|
|
43
|
+
* @param serverTokenResponse
|
|
44
|
+
* @param authority
|
|
45
|
+
*/
|
|
46
|
+
handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, authCodePayload?: AuthorizationCodePayload, userAssertionHash?: string, handlingRefreshTokenResponse?: boolean, forceCacheRefreshTokenResponse?: boolean, serverRequestId?: string): Promise<AuthenticationResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Generates CacheRecord
|
|
49
|
+
* @param serverTokenResponse
|
|
50
|
+
* @param idTokenObj
|
|
51
|
+
* @param authority
|
|
52
|
+
*/
|
|
53
|
+
private generateCacheRecord;
|
|
54
|
+
/**
|
|
55
|
+
* Generate Account
|
|
56
|
+
* @param serverTokenResponse
|
|
57
|
+
* @param idToken
|
|
58
|
+
* @param authority
|
|
59
|
+
*/
|
|
60
|
+
private generateAccountEntity;
|
|
61
|
+
/**
|
|
62
|
+
* Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache.
|
|
63
|
+
*
|
|
64
|
+
* Optionally takes a state string that is set as-is in the response.
|
|
65
|
+
*
|
|
66
|
+
* @param cacheRecord
|
|
67
|
+
* @param idTokenObj
|
|
68
|
+
* @param fromTokenCache
|
|
69
|
+
* @param stateString
|
|
70
|
+
*/
|
|
71
|
+
static generateAuthenticationResult(cryptoObj: ICrypto, authority: Authority, cacheRecord: CacheRecord, fromTokenCache: boolean, request: BaseAuthRequest, idTokenObj?: AuthToken, requestState?: RequestStateObject, serverTokenResponse?: ServerAuthorizationTokenResponse, requestId?: string): Promise<AuthenticationResult>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=ResponseHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseHandler.d.ts","sourceRoot":"","sources":["../../src/response/ResponseHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE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