@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,101 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.js';
|
|
4
|
+
import { AuthError } from '../error/AuthError.js';
|
|
5
|
+
import { Logger, LogLevel } from '../logger/Logger.js';
|
|
6
|
+
import { Constants } from '../utils/Constants.js';
|
|
7
|
+
import { version } from '../packageMetadata.js';
|
|
8
|
+
import { AzureCloudInstance } from '../authority/AuthorityOptions.js';
|
|
9
|
+
import { DefaultStorageClass } from '../cache/CacheManager.js';
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13
|
+
* Licensed under the MIT License.
|
|
14
|
+
*/
|
|
15
|
+
// Token renewal offset default in seconds
|
|
16
|
+
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
17
|
+
const DEFAULT_SYSTEM_OPTIONS = {
|
|
18
|
+
tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
|
|
19
|
+
preventCorsPreflight: false,
|
|
20
|
+
};
|
|
21
|
+
const DEFAULT_LOGGER_IMPLEMENTATION = {
|
|
22
|
+
loggerCallback: () => {
|
|
23
|
+
// allow users to not set loggerCallback
|
|
24
|
+
},
|
|
25
|
+
piiLoggingEnabled: false,
|
|
26
|
+
logLevel: LogLevel.Info,
|
|
27
|
+
correlationId: Constants.EMPTY_STRING,
|
|
28
|
+
};
|
|
29
|
+
const DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
30
|
+
async sendGetRequestAsync() {
|
|
31
|
+
const notImplErr = "Network interface - sendGetRequestAsync() has not been implemented";
|
|
32
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
33
|
+
},
|
|
34
|
+
async sendPostRequestAsync() {
|
|
35
|
+
const notImplErr = "Network interface - sendPostRequestAsync() has not been implemented";
|
|
36
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const DEFAULT_LIBRARY_INFO = {
|
|
40
|
+
sku: Constants.SKU,
|
|
41
|
+
version: version,
|
|
42
|
+
cpu: Constants.EMPTY_STRING,
|
|
43
|
+
os: Constants.EMPTY_STRING,
|
|
44
|
+
};
|
|
45
|
+
const DEFAULT_CLIENT_CREDENTIALS = {
|
|
46
|
+
clientSecret: Constants.EMPTY_STRING,
|
|
47
|
+
clientAssertion: undefined,
|
|
48
|
+
};
|
|
49
|
+
const DEFAULT_AZURE_CLOUD_OPTIONS = {
|
|
50
|
+
azureCloudInstance: AzureCloudInstance.None,
|
|
51
|
+
tenant: `${Constants.DEFAULT_COMMON_TENANT}`,
|
|
52
|
+
};
|
|
53
|
+
const DEFAULT_TELEMETRY_OPTIONS = {
|
|
54
|
+
application: {
|
|
55
|
+
appName: "",
|
|
56
|
+
appVersion: "",
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Function that sets the default options when not explicitly configured from app developer
|
|
61
|
+
*
|
|
62
|
+
* @param Configuration
|
|
63
|
+
*
|
|
64
|
+
* @returns Configuration
|
|
65
|
+
*/
|
|
66
|
+
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
|
|
67
|
+
const loggerOptions = {
|
|
68
|
+
...DEFAULT_LOGGER_IMPLEMENTATION,
|
|
69
|
+
...userLoggerOption,
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
authOptions: buildAuthOptions(userAuthOptions),
|
|
73
|
+
systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },
|
|
74
|
+
loggerOptions: loggerOptions,
|
|
75
|
+
storageInterface: storageImplementation ||
|
|
76
|
+
new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)),
|
|
77
|
+
networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
|
|
78
|
+
cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
|
|
79
|
+
clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
|
|
80
|
+
libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
|
|
81
|
+
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
|
|
82
|
+
serverTelemetryManager: serverTelemetryManager || null,
|
|
83
|
+
persistencePlugin: persistencePlugin || null,
|
|
84
|
+
serializableCache: serializableCache || null,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Construct authoptions from the client and platform passed values
|
|
89
|
+
* @param authOptions
|
|
90
|
+
*/
|
|
91
|
+
function buildAuthOptions(authOptions) {
|
|
92
|
+
return {
|
|
93
|
+
clientCapabilities: [],
|
|
94
|
+
azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
|
|
95
|
+
skipAuthorityMetadataCache: false,
|
|
96
|
+
...authOptions,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration };
|
|
101
|
+
//# sourceMappingURL=ClientConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientConfiguration.js","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;;;AAGG;AAgBH;AACA,MAAM,gCAAgC,GAAG,GAAG,CAAC;AA6HhC,MAAA,sBAAsB,GAA4B;AAC3D,IAAA,yBAAyB,EAAE,gCAAgC;AAC3D,IAAA,oBAAoB,EAAE,KAAK;EAC7B;AAEF,MAAM,6BAA6B,GAA4B;IAC3D,cAAc,EAAE,MAAK;;KAEpB;AACD,IAAA,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,QAAQ,CAAC,IAAI;IACvB,aAAa,EAAE,SAAS,CAAC,YAAY;CACxC,CAAC;AAEF,MAAM,8BAA8B,GAAmB;AACnD,IAAA,MAAM,mBAAmB,GAAA;QACrB,MAAM,UAAU,GACZ,oEAAoE,CAAC;AACzE,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,oBAAoB,GAAA;QACtB,MAAM,UAAU,GACZ,qEAAqE,CAAC;AAC1E,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;CACJ,CAAC;AAEF,MAAM,oBAAoB,GAAgB;IACtC,GAAG,EAAE,SAAS,CAAC,GAAG;AAClB,IAAA,OAAO,EAAE,OAAO;IAChB,GAAG,EAAE,SAAS,CAAC,YAAY;IAC3B,EAAE,EAAE,SAAS,CAAC,YAAY;CAC7B,CAAC;AAEF,MAAM,0BAA0B,GAAsB;IAClD,YAAY,EAAE,SAAS,CAAC,YAAY;AACpC,IAAA,eAAe,EAAE,SAAS;CAC7B,CAAC;AAEF,MAAM,2BAA2B,GAAsB;IACnD,kBAAkB,EAAE,kBAAkB,CAAC,IAAI;AAC3C,IAAA,MAAM,EAAE,CAAA,EAAG,SAAS,CAAC,qBAAqB,CAAE,CAAA;CAC/C,CAAC;AAEF,MAAM,yBAAyB,GAA+B;AAC1D,IAAA,WAAW,EAAE;AACT,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,UAAU,EAAE,EAAE;AACjB,KAAA;CACJ,CAAC;AAEF;;;;;;AAMG;AACG,SAAU,wBAAwB,CAAC,EACrC,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAE,gBAAgB,EAC/B,gBAAgB,EAAE,qBAAqB,EACvC,gBAAgB,EAAE,qBAAqB,EACvC,eAAe,EAAE,oBAAoB,EACrC,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,GAClB,EAAA;AAClB,IAAA,MAAM,aAAa,GAAG;AAClB,QAAA,GAAG,6BAA6B;AAChC,QAAA,GAAG,gBAAgB;KACtB,CAAC;IAEF,OAAO;AACH,QAAA,WAAW,EAAE,gBAAgB,CAAC,eAAe,CAAC;AAC9C,QAAA,aAAa,EAAE,EAAE,GAAG,sBAAsB,EAAE,GAAG,iBAAiB,EAAE;AAClE,QAAA,aAAa,EAAE,aAAa;AAC5B,QAAA,gBAAgB,EACZ,qBAAqB;AACrB,YAAA,IAAI,mBAAmB,CACnB,eAAe,CAAC,QAAQ,EACxB,6BAA6B,EAC7B,IAAI,MAAM,CAAC,aAAa,CAAC,CAC5B;QACL,gBAAgB,EACZ,qBAAqB,IAAI,8BAA8B;QAC3D,eAAe,EAAE,oBAAoB,IAAI,6BAA6B;QACtE,iBAAiB,EAAE,iBAAiB,IAAI,0BAA0B;AAClE,QAAA,WAAW,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,WAAW,EAAE;AACxD,QAAA,SAAS,EAAE,EAAE,GAAG,yBAAyB,EAAE,GAAG,SAAS,EAAE;QACzD,sBAAsB,EAAE,sBAAsB,IAAI,IAAI;QACtD,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;QAC5C,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;KAC/C,CAAC;AACN,CAAC;AAED;;;AAGG;AACH,SAAS,gBAAgB,CAAC,WAAwB,EAAA;IAC9C,OAAO;AACH,QAAA,kBAAkB,EAAE,EAAE;AACtB,QAAA,iBAAiB,EAAE,2BAA2B;AAC9C,QAAA,0BAA0B,EAAE,KAAK;AACjC,QAAA,GAAG,WAAW;KACjB,CAAC;AACN;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BaseAuthRequest } from "../request/BaseAuthRequest";
|
|
2
|
+
import { SignedHttpRequest } from "./SignedHttpRequest";
|
|
3
|
+
/**
|
|
4
|
+
* The PkceCodes type describes the structure
|
|
5
|
+
* of objects that contain PKCE code
|
|
6
|
+
* challenge and verifier pairs
|
|
7
|
+
*/
|
|
8
|
+
export type PkceCodes = {
|
|
9
|
+
verifier: string;
|
|
10
|
+
challenge: string;
|
|
11
|
+
};
|
|
12
|
+
export type SignedHttpRequestParameters = Pick<BaseAuthRequest, "resourceRequestMethod" | "resourceRequestUri" | "shrClaims" | "shrNonce"> & {
|
|
13
|
+
correlationId?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Interface for crypto functions used by library
|
|
17
|
+
*/
|
|
18
|
+
export interface ICrypto {
|
|
19
|
+
/**
|
|
20
|
+
* Creates a guid randomly.
|
|
21
|
+
*/
|
|
22
|
+
createNewGuid(): string;
|
|
23
|
+
/**
|
|
24
|
+
* base64 Encode string
|
|
25
|
+
* @param input
|
|
26
|
+
*/
|
|
27
|
+
base64Encode(input: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* base64 decode string
|
|
30
|
+
* @param input
|
|
31
|
+
*/
|
|
32
|
+
base64Decode(input: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Generate PKCE codes for OAuth. See RFC here: https://tools.ietf.org/html/rfc7636
|
|
35
|
+
*/
|
|
36
|
+
generatePkceCodes(): Promise<PkceCodes>;
|
|
37
|
+
/**
|
|
38
|
+
* Generates an JWK RSA S256 Thumbprint
|
|
39
|
+
* @param request
|
|
40
|
+
*/
|
|
41
|
+
getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Removes cryptographic keypair from key store matching the keyId passed in
|
|
44
|
+
* @param kid
|
|
45
|
+
*/
|
|
46
|
+
removeTokenBindingKey(kid: string): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Removes all cryptographic keys from IndexedDB storage
|
|
49
|
+
*/
|
|
50
|
+
clearKeystore(): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.
|
|
53
|
+
* @param accessToken
|
|
54
|
+
*/
|
|
55
|
+
signJwt(payload: SignedHttpRequest, kid: string, correlationId?: string): Promise<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Returns the SHA-256 hash of an input string
|
|
58
|
+
* @param plainText
|
|
59
|
+
*/
|
|
60
|
+
hashString(plainText: string): Promise<string>;
|
|
61
|
+
}
|
|
62
|
+
export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto;
|
|
63
|
+
//# sourceMappingURL=ICrypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC1C,eAAe,EACf,uBAAuB,GAAG,oBAAoB,GAAG,WAAW,GAAG,UAAU,CAC5E,GAAG;IACA,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC;;;OAGG;IACH,sBAAsB,CAClB,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,OAAO,CACH,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,MAAM,EACX,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,6BAA6B,EAAE,OA8C3C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { AuthError } from '../error/AuthError.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
+
* Licensed under the MIT License.
|
|
8
|
+
*/
|
|
9
|
+
const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
10
|
+
createNewGuid: () => {
|
|
11
|
+
const notImplErr = "Crypto interface - createNewGuid() has not been implemented";
|
|
12
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
13
|
+
},
|
|
14
|
+
base64Decode: () => {
|
|
15
|
+
const notImplErr = "Crypto interface - base64Decode() has not been implemented";
|
|
16
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
17
|
+
},
|
|
18
|
+
base64Encode: () => {
|
|
19
|
+
const notImplErr = "Crypto interface - base64Encode() has not been implemented";
|
|
20
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
21
|
+
},
|
|
22
|
+
async generatePkceCodes() {
|
|
23
|
+
const notImplErr = "Crypto interface - generatePkceCodes() has not been implemented";
|
|
24
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
25
|
+
},
|
|
26
|
+
async getPublicKeyThumbprint() {
|
|
27
|
+
const notImplErr = "Crypto interface - getPublicKeyThumbprint() has not been implemented";
|
|
28
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
29
|
+
},
|
|
30
|
+
async removeTokenBindingKey() {
|
|
31
|
+
const notImplErr = "Crypto interface - removeTokenBindingKey() has not been implemented";
|
|
32
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
33
|
+
},
|
|
34
|
+
async clearKeystore() {
|
|
35
|
+
const notImplErr = "Crypto interface - clearKeystore() has not been implemented";
|
|
36
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
37
|
+
},
|
|
38
|
+
async signJwt() {
|
|
39
|
+
const notImplErr = "Crypto interface - signJwt() has not been implemented";
|
|
40
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
41
|
+
},
|
|
42
|
+
async hashString() {
|
|
43
|
+
const notImplErr = "Crypto interface - hashString() has not been implemented";
|
|
44
|
+
throw AuthError.createUnexpectedError(notImplErr);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { DEFAULT_CRYPTO_IMPLEMENTATION };
|
|
49
|
+
//# sourceMappingURL=ICrypto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICrypto.js","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AA6EU,MAAA,6BAA6B,GAAY;IAClD,aAAa,EAAE,MAAa;QACxB,MAAM,UAAU,GACZ,6DAA6D,CAAC;AAClE,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;IACD,YAAY,EAAE,MAAa;QACvB,MAAM,UAAU,GACZ,4DAA4D,CAAC;AACjE,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;IACD,YAAY,EAAE,MAAa;QACvB,MAAM,UAAU,GACZ,4DAA4D,CAAC;AACjE,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,iBAAiB,GAAA;QACnB,MAAM,UAAU,GACZ,iEAAiE,CAAC;AACtE,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,sBAAsB,GAAA;QACxB,MAAM,UAAU,GACZ,sEAAsE,CAAC;AAC3E,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,qBAAqB,GAAA;QACvB,MAAM,UAAU,GACZ,qEAAqE,CAAC;AAC1E,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,aAAa,GAAA;QACf,MAAM,UAAU,GACZ,6DAA6D,CAAC;AAClE,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,OAAO,GAAA;QACT,MAAM,UAAU,GACZ,uDAAuD,CAAC;AAC5D,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;AACD,IAAA,MAAM,UAAU,GAAA;QACZ,MAAM,UAAU,GACZ,0DAA0D,CAAC;AAC/D,QAAA,MAAM,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;KACrD;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IGuidGenerator.d.ts","sourceRoot":"","sources":["../../src/crypto/IGuidGenerator.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC3B,YAAY,IAAI,MAAM,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JsonTypes } from "../utils/Constants";
|
|
2
|
+
export type JoseHeaderOptions = {
|
|
3
|
+
typ?: JsonTypes;
|
|
4
|
+
alg?: string;
|
|
5
|
+
kid?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class JoseHeader {
|
|
8
|
+
typ?: JsonTypes;
|
|
9
|
+
alg?: string;
|
|
10
|
+
kid?: string;
|
|
11
|
+
constructor(options: JoseHeaderOptions);
|
|
12
|
+
/**
|
|
13
|
+
* Builds SignedHttpRequest formatted JOSE Header from the
|
|
14
|
+
* JOSE Header options provided or previously set on the object and returns
|
|
15
|
+
* the stringified header object.
|
|
16
|
+
* Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
|
|
17
|
+
* @param shrHeaderOptions
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
static getShrHeaderString(shrHeaderOptions: JoseHeaderOptions): string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=JoseHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JoseHeader.d.ts","sourceRoot":"","sources":["../../src/crypto/JoseHeader.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,qBAAa,UAAU;IACZ,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;gBAER,OAAO,EAAE,iBAAiB;IAMtC;;;;;;;OAOG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,MAAM;CAoBzE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { JoseHeaderError } from '../error/JoseHeaderError.js';
|
|
4
|
+
import { JsonTypes } from '../utils/Constants.js';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
+
* Licensed under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
class JoseHeader {
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.typ = options.typ;
|
|
13
|
+
this.alg = options.alg;
|
|
14
|
+
this.kid = options.kid;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Builds SignedHttpRequest formatted JOSE Header from the
|
|
18
|
+
* JOSE Header options provided or previously set on the object and returns
|
|
19
|
+
* the stringified header object.
|
|
20
|
+
* Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
|
|
21
|
+
* @param shrHeaderOptions
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
static getShrHeaderString(shrHeaderOptions) {
|
|
25
|
+
// KeyID is required on the SHR header
|
|
26
|
+
if (!shrHeaderOptions.kid) {
|
|
27
|
+
throw JoseHeaderError.createMissingKidError();
|
|
28
|
+
}
|
|
29
|
+
// Alg is required on the SHR header
|
|
30
|
+
if (!shrHeaderOptions.alg) {
|
|
31
|
+
throw JoseHeaderError.createMissingAlgError();
|
|
32
|
+
}
|
|
33
|
+
const shrHeader = new JoseHeader({
|
|
34
|
+
// Access Token PoP headers must have type pop, but the type header can be overriden for special cases
|
|
35
|
+
typ: shrHeaderOptions.typ || JsonTypes.Pop,
|
|
36
|
+
kid: shrHeaderOptions.kid,
|
|
37
|
+
alg: shrHeaderOptions.alg,
|
|
38
|
+
});
|
|
39
|
+
return JSON.stringify(shrHeader);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { JoseHeader };
|
|
44
|
+
//# sourceMappingURL=JoseHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JoseHeader.js","sources":["../../src/crypto/JoseHeader.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAWU,UAAU,CAAA;AAKnB,IAAA,WAAA,CAAY,OAA0B,EAAA;AAClC,QAAA,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AACvB,QAAA,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AACvB,QAAA,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;KAC1B;AAED;;;;;;;AAOG;IACH,OAAO,kBAAkB,CAAC,gBAAmC,EAAA;;AAEzD,QAAA,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE;AACvB,YAAA,MAAM,eAAe,CAAC,qBAAqB,EAAE,CAAC;AACjD,SAAA;;AAGD,QAAA,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE;AACvB,YAAA,MAAM,eAAe,CAAC,qBAAqB,EAAE,CAAC;AACjD,SAAA;AAED,QAAA,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC;;AAE7B,YAAA,GAAG,EAAE,gBAAgB,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG;YAC1C,GAAG,EAAE,gBAAgB,CAAC,GAAG;YACzB,GAAG,EAAE,gBAAgB,CAAC,GAAG;AAC5B,SAAA,CAAC,CAAC;AAEH,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KACpC;AACJ;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ICrypto, SignedHttpRequestParameters } from "./ICrypto";
|
|
2
|
+
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
|
|
3
|
+
/**
|
|
4
|
+
* See eSTS docs for more info.
|
|
5
|
+
* - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded.
|
|
6
|
+
* - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values:
|
|
7
|
+
* - sw: software storage
|
|
8
|
+
* - uhw: hardware storage
|
|
9
|
+
*/
|
|
10
|
+
type ReqCnf = {
|
|
11
|
+
kid: string;
|
|
12
|
+
xms_ksl: KeyLocation;
|
|
13
|
+
};
|
|
14
|
+
export type ReqCnfData = {
|
|
15
|
+
kid: string;
|
|
16
|
+
reqCnfString: string;
|
|
17
|
+
reqCnfHash: string;
|
|
18
|
+
};
|
|
19
|
+
declare enum KeyLocation {
|
|
20
|
+
SW = "sw",
|
|
21
|
+
UHW = "uhw"
|
|
22
|
+
}
|
|
23
|
+
export declare class PopTokenGenerator {
|
|
24
|
+
private cryptoUtils;
|
|
25
|
+
private performanceClient?;
|
|
26
|
+
constructor(cryptoUtils: ICrypto, performanceClient?: IPerformanceClient);
|
|
27
|
+
/**
|
|
28
|
+
* Generates the req_cnf validated at the RP in the POP protocol for SHR parameters
|
|
29
|
+
* and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash
|
|
30
|
+
* @param request
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
generateCnf(request: SignedHttpRequestParameters): Promise<ReqCnfData>;
|
|
34
|
+
/**
|
|
35
|
+
* Generates key_id for a SHR token request
|
|
36
|
+
* @param request
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
generateKid(request: SignedHttpRequestParameters): Promise<ReqCnf>;
|
|
40
|
+
/**
|
|
41
|
+
* Signs the POP access_token with the local generated key-pair
|
|
42
|
+
* @param accessToken
|
|
43
|
+
* @param request
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
signPopToken(accessToken: string, keyId: string, request: SignedHttpRequestParameters): Promise<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Utility function to generate the signed JWT for an access_token
|
|
49
|
+
* @param payload
|
|
50
|
+
* @param kid
|
|
51
|
+
* @param request
|
|
52
|
+
* @param claims
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
signPayload(payload: string, keyId: string, request: SignedHttpRequestParameters, claims?: object): Promise<string>;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=PopTokenGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopTokenGenerator.d.ts","sourceRoot":"","sources":["../../src/crypto/PopTokenGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAGjF;;;;;;GAMG;AACH,KAAK,MAAM,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,aAAK,WAAW;IACZ,EAAE,OAAO;IACT,GAAG,QAAQ;CACd;AAED,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAqB;gBAEnC,WAAW,EAAE,OAAO,EAAE,iBAAiB,CAAC,EAAE,kBAAkB;IAKxE;;;;;OAKG;IACG,WAAW,CACb,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,UAAU,CAAC;IAsBtB;;;;OAIG;IACG,WAAW,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBxE;;;;;OAKG;IACG,YAAY,CACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;;;;OAOG;IACG,WAAW,CACb,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,2BAA2B,EACpC,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC;CA+BrB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { TimeUtils } from '../utils/TimeUtils.js';
|
|
4
|
+
import { UrlString } from '../url/UrlString.js';
|
|
5
|
+
import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.js';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
var KeyLocation;
|
|
12
|
+
(function (KeyLocation) {
|
|
13
|
+
KeyLocation["SW"] = "sw";
|
|
14
|
+
KeyLocation["UHW"] = "uhw";
|
|
15
|
+
})(KeyLocation || (KeyLocation = {}));
|
|
16
|
+
class PopTokenGenerator {
|
|
17
|
+
constructor(cryptoUtils, performanceClient) {
|
|
18
|
+
this.cryptoUtils = cryptoUtils;
|
|
19
|
+
this.performanceClient = performanceClient;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Generates the req_cnf validated at the RP in the POP protocol for SHR parameters
|
|
23
|
+
* and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash
|
|
24
|
+
* @param request
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
async generateCnf(request) {
|
|
28
|
+
this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
29
|
+
this.performanceClient?.setPreQueueTime(PerformanceEvents.PopTokenGenerateKid, request.correlationId);
|
|
30
|
+
const reqCnf = await this.generateKid(request);
|
|
31
|
+
const reqCnfString = this.cryptoUtils.base64Encode(JSON.stringify(reqCnf));
|
|
32
|
+
return {
|
|
33
|
+
kid: reqCnf.kid,
|
|
34
|
+
reqCnfString,
|
|
35
|
+
reqCnfHash: await this.cryptoUtils.hashString(reqCnfString),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generates key_id for a SHR token request
|
|
40
|
+
* @param request
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
async generateKid(request) {
|
|
44
|
+
this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId);
|
|
45
|
+
const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request);
|
|
46
|
+
return {
|
|
47
|
+
kid: kidThumbprint,
|
|
48
|
+
xms_ksl: KeyLocation.SW,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Signs the POP access_token with the local generated key-pair
|
|
53
|
+
* @param accessToken
|
|
54
|
+
* @param request
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
async signPopToken(accessToken, keyId, request) {
|
|
58
|
+
return this.signPayload(accessToken, keyId, request);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Utility function to generate the signed JWT for an access_token
|
|
62
|
+
* @param payload
|
|
63
|
+
* @param kid
|
|
64
|
+
* @param request
|
|
65
|
+
* @param claims
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
async signPayload(payload, keyId, request, claims) {
|
|
69
|
+
// Deconstruct request to extract SHR parameters
|
|
70
|
+
const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, } = request;
|
|
71
|
+
const resourceUrlString = resourceRequestUri
|
|
72
|
+
? new UrlString(resourceRequestUri)
|
|
73
|
+
: undefined;
|
|
74
|
+
const resourceUrlComponents = resourceUrlString?.getUrlComponents();
|
|
75
|
+
return await this.cryptoUtils.signJwt({
|
|
76
|
+
at: payload,
|
|
77
|
+
ts: TimeUtils.nowSeconds(),
|
|
78
|
+
m: resourceRequestMethod?.toUpperCase(),
|
|
79
|
+
u: resourceUrlComponents?.HostNameAndPort,
|
|
80
|
+
nonce: shrNonce || this.cryptoUtils.createNewGuid(),
|
|
81
|
+
p: resourceUrlComponents?.AbsolutePath,
|
|
82
|
+
q: resourceUrlComponents?.QueryString
|
|
83
|
+
? [[], resourceUrlComponents.QueryString]
|
|
84
|
+
: undefined,
|
|
85
|
+
client_claims: shrClaims || undefined,
|
|
86
|
+
...claims,
|
|
87
|
+
}, keyId, request.correlationId);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { PopTokenGenerator };
|
|
92
|
+
//# sourceMappingURL=PopTokenGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopTokenGenerator.js","sources":["../../src/crypto/PopTokenGenerator.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignedHttpRequest.d.ts","sourceRoot":"","sources":["../../src/crypto/SignedHttpRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AuthErrorMessage class containing string constants used by error codes and messages.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AuthErrorMessage: {
|
|
5
|
+
unexpectedError: {
|
|
6
|
+
code: string;
|
|
7
|
+
desc: string;
|
|
8
|
+
};
|
|
9
|
+
postRequestFailed: {
|
|
10
|
+
code: string;
|
|
11
|
+
desc: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* General error class thrown by the MSAL.js library.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AuthError extends Error {
|
|
18
|
+
/**
|
|
19
|
+
* Short string denoting error
|
|
20
|
+
*/
|
|
21
|
+
errorCode: string;
|
|
22
|
+
/**
|
|
23
|
+
* Detailed description of error
|
|
24
|
+
*/
|
|
25
|
+
errorMessage: string;
|
|
26
|
+
/**
|
|
27
|
+
* Describes the subclass of an error
|
|
28
|
+
*/
|
|
29
|
+
subError: string;
|
|
30
|
+
/**
|
|
31
|
+
* CorrelationId associated with the error
|
|
32
|
+
*/
|
|
33
|
+
correlationId: string;
|
|
34
|
+
constructor(errorCode?: string, errorMessage?: string, suberror?: string);
|
|
35
|
+
setCorrelationId(correlationId: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Creates an error that is thrown when something unexpected happens in the library.
|
|
38
|
+
* @param errDesc
|
|
39
|
+
*/
|
|
40
|
+
static createUnexpectedError(errDesc: string): AuthError;
|
|
41
|
+
/**
|
|
42
|
+
* Creates an error for post request failures.
|
|
43
|
+
* @param errDesc
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
static createPostRequestFailed(errDesc: string): AuthError;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=AuthError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthError.d.ts","sourceRoot":"","sources":["../../src/error/AuthError.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;CAS5B,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAaxE,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IAI7C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;IAOxD;;;;OAIG;IACH,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;CAM7D"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*! @azure/msal-common v14.0.0 2023-05-03 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { Constants } from '../utils/Constants.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
+
* Licensed under the MIT License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* AuthErrorMessage class containing string constants used by error codes and messages.
|
|
11
|
+
*/
|
|
12
|
+
const AuthErrorMessage = {
|
|
13
|
+
unexpectedError: {
|
|
14
|
+
code: "unexpected_error",
|
|
15
|
+
desc: "Unexpected error in authentication.",
|
|
16
|
+
},
|
|
17
|
+
postRequestFailed: {
|
|
18
|
+
code: "post_request_failed",
|
|
19
|
+
desc: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* General error class thrown by the MSAL.js library.
|
|
24
|
+
*/
|
|
25
|
+
class AuthError extends Error {
|
|
26
|
+
constructor(errorCode, errorMessage, suberror) {
|
|
27
|
+
const errorString = errorMessage
|
|
28
|
+
? `${errorCode}: ${errorMessage}`
|
|
29
|
+
: errorCode;
|
|
30
|
+
super(errorString);
|
|
31
|
+
Object.setPrototypeOf(this, AuthError.prototype);
|
|
32
|
+
this.errorCode = errorCode || Constants.EMPTY_STRING;
|
|
33
|
+
this.errorMessage = errorMessage || Constants.EMPTY_STRING;
|
|
34
|
+
this.subError = suberror || Constants.EMPTY_STRING;
|
|
35
|
+
this.name = "AuthError";
|
|
36
|
+
}
|
|
37
|
+
setCorrelationId(correlationId) {
|
|
38
|
+
this.correlationId = correlationId;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates an error that is thrown when something unexpected happens in the library.
|
|
42
|
+
* @param errDesc
|
|
43
|
+
*/
|
|
44
|
+
static createUnexpectedError(errDesc) {
|
|
45
|
+
return new AuthError(AuthErrorMessage.unexpectedError.code, `${AuthErrorMessage.unexpectedError.desc}: ${errDesc}`);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Creates an error for post request failures.
|
|
49
|
+
* @param errDesc
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
static createPostRequestFailed(errDesc) {
|
|
53
|
+
return new AuthError(AuthErrorMessage.postRequestFailed.code, `${AuthErrorMessage.postRequestFailed.desc}: ${errDesc}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { AuthError, AuthErrorMessage };
|
|
58
|
+
//# sourceMappingURL=AuthError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthError.js","sources":["../../src/error/AuthError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,gBAAgB,GAAG;AAC5B,IAAA,eAAe,EAAE;AACb,QAAA,IAAI,EAAE,kBAAkB;AACxB,QAAA,IAAI,EAAE,qCAAqC;AAC9C,KAAA;AACD,IAAA,iBAAiB,EAAE;AACf,QAAA,IAAI,EAAE,qBAAqB;AAC3B,QAAA,IAAI,EAAE,sIAAsI;AAC/I,KAAA;EACH;AAEF;;AAEG;AACG,MAAO,SAAU,SAAQ,KAAK,CAAA;AAqBhC,IAAA,WAAA,CAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB,EAAA;QACpE,MAAM,WAAW,GAAG,YAAY;AAC5B,cAAE,CAAA,EAAG,SAAS,CAAA,EAAA,EAAK,YAAY,CAAE,CAAA;cAC/B,SAAS,CAAC;QAChB,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAEjD,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC;QAC3D,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC;AACnD,QAAA,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;KAC3B;AAED,IAAA,gBAAgB,CAAC,aAAqB,EAAA;AAClC,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACtC;AAED;;;AAGG;IACH,OAAO,qBAAqB,CAAC,OAAe,EAAA;AACxC,QAAA,OAAO,IAAI,SAAS,CAChB,gBAAgB,CAAC,eAAe,CAAC,IAAI,EACrC,GAAG,gBAAgB,CAAC,eAAe,CAAC,IAAI,KAAK,OAAO,CAAA,CAAE,CACzD,CAAC;KACL;AAED;;;;AAIG;IACH,OAAO,uBAAuB,CAAC,OAAe,EAAA;AAC1C,QAAA,OAAO,IAAI,SAAS,CAChB,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,EACvC,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,KAAK,OAAO,CAAA,CAAE,CAC3D,CAAC;KACL;AACJ;;;;"}
|