@azure/msal-common 15.13.3 → 16.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/AccountInfo.d.ts +0 -1
- package/dist/account/AccountInfo.d.ts.map +1 -1
- package/dist/account/AccountInfo.mjs +1 -1
- package/dist/account/AccountInfo.mjs.map +1 -1
- package/dist/account/AuthToken.d.ts.map +1 -1
- package/dist/account/AuthToken.mjs +2 -3
- package/dist/account/AuthToken.mjs.map +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.d.ts.map +1 -1
- package/dist/account/ClientInfo.mjs +4 -6
- package/dist/account/ClientInfo.mjs.map +1 -1
- package/dist/account/TokenClaims.mjs +1 -1
- package/dist/authority/Authority.d.ts +2 -2
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.mjs +89 -105
- package/dist/authority/Authority.mjs.map +1 -1
- package/dist/authority/AuthorityFactory.d.ts +6 -2
- package/dist/authority/AuthorityFactory.d.ts.map +1 -1
- package/dist/authority/AuthorityFactory.mjs +8 -5
- package/dist/authority/AuthorityFactory.mjs.map +1 -1
- package/dist/authority/AuthorityMetadata.d.ts +2 -2
- package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
- package/dist/authority/AuthorityMetadata.mjs +34 -31
- package/dist/authority/AuthorityMetadata.mjs.map +1 -1
- package/dist/authority/AuthorityOptions.d.ts +0 -1
- package/dist/authority/AuthorityOptions.d.ts.map +1 -1
- package/dist/authority/AuthorityOptions.mjs +1 -1
- package/dist/authority/AuthorityOptions.mjs.map +1 -1
- package/dist/authority/AuthorityType.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
- package/dist/authority/OIDCOptions.d.ts +2 -2
- package/dist/authority/OIDCOptions.d.ts.map +1 -1
- package/dist/authority/OpenIdConfigResponse.mjs +1 -1
- package/dist/authority/ProtocolMode.mjs +1 -1
- package/dist/authority/RegionDiscovery.d.ts +3 -3
- package/dist/authority/RegionDiscovery.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.mjs +14 -15
- package/dist/authority/RegionDiscovery.mjs.map +1 -1
- package/dist/cache/CacheManager.d.ts +26 -19
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +70 -83
- package/dist/cache/CacheManager.mjs.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts +0 -4
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.d.ts +4 -56
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts +0 -2
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/interface/ICacheManager.d.ts +35 -17
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/AccountEntityUtils.d.ts +53 -0
- package/dist/cache/utils/AccountEntityUtils.d.ts.map +1 -0
- package/dist/cache/utils/AccountEntityUtils.mjs +192 -0
- package/dist/cache/utils/AccountEntityUtils.mjs.map +1 -0
- package/dist/cache/utils/CacheHelpers.d.ts +2 -2
- package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +10 -13
- package/dist/cache/utils/CacheHelpers.mjs.map +1 -1
- package/dist/cache/utils/CacheTypes.d.ts +0 -1
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts +23 -4
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +63 -35
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/RefreshTokenClient.d.ts +17 -4
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.mjs +51 -37
- package/dist/client/RefreshTokenClient.mjs.map +1 -1
- package/dist/client/SilentFlowClient.d.ts +17 -4
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.mjs +28 -15
- package/dist/client/SilentFlowClient.mjs.map +1 -1
- package/dist/config/ClientConfiguration.d.ts +2 -22
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +9 -15
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/constants/AADServerParamKeys.mjs +1 -1
- package/dist/crypto/ICrypto.d.ts +5 -3
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.mjs +1 -1
- package/dist/crypto/ICrypto.mjs.map +1 -1
- package/dist/crypto/JoseHeader.mjs +1 -1
- package/dist/crypto/PopTokenGenerator.d.ts +2 -2
- package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +3 -5
- package/dist/crypto/PopTokenGenerator.mjs.map +1 -1
- package/dist/error/AuthError.d.ts +1 -18
- package/dist/error/AuthError.d.ts.map +1 -1
- package/dist/error/AuthError.mjs +12 -34
- package/dist/error/AuthError.mjs.map +1 -1
- package/dist/error/AuthErrorCodes.mjs +1 -1
- package/dist/error/CacheError.d.ts +1 -6
- package/dist/error/CacheError.d.ts.map +1 -1
- package/dist/error/CacheError.mjs +6 -13
- package/dist/error/CacheError.mjs.map +1 -1
- package/dist/error/CacheErrorCodes.mjs +1 -1
- package/dist/error/ClientAuthError.d.ts +0 -229
- package/dist/error/ClientAuthError.d.ts.map +1 -1
- package/dist/error/ClientAuthError.mjs +3 -240
- package/dist/error/ClientAuthError.mjs.map +1 -1
- package/dist/error/ClientAuthErrorCodes.d.ts +0 -8
- package/dist/error/ClientAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +2 -10
- package/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
- package/dist/error/ClientConfigurationError.d.ts +0 -128
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.mjs +3 -134
- package/dist/error/ClientConfigurationError.mjs.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.d.ts +0 -2
- package/dist/error/ClientConfigurationErrorCodes.d.ts.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.mjs +3 -5
- package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthError.d.ts +1 -19
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +10 -35
- package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
- package/dist/error/JoseHeaderError.d.ts +0 -4
- package/dist/error/JoseHeaderError.d.ts.map +1 -1
- package/dist/error/JoseHeaderError.mjs +3 -8
- package/dist/error/JoseHeaderError.mjs.map +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/NetworkError.mjs +1 -1
- package/dist/error/PlatformBrokerError.d.ts.map +1 -1
- package/dist/error/PlatformBrokerError.mjs +3 -2
- package/dist/error/PlatformBrokerError.mjs.map +1 -1
- package/dist/error/ServerError.mjs +1 -1
- package/dist/exports-browser-only.d.ts +4 -3
- package/dist/exports-browser-only.d.ts.map +1 -1
- package/dist/exports-common.d.ts +11 -8
- package/dist/exports-common.d.ts.map +1 -1
- package/dist/exports-node-only.d.ts +2 -4
- package/dist/exports-node-only.d.ts.map +1 -1
- package/dist/index-node.mjs +15 -10
- package/dist/index-node.mjs.map +1 -1
- package/dist/index.mjs +17 -11
- package/dist/index.mjs.map +1 -1
- package/dist/logger/Logger.d.ts +36 -13
- package/dist/logger/Logger.d.ts.map +1 -1
- package/dist/logger/Logger.mjs +105 -22
- package/dist/logger/Logger.mjs.map +1 -1
- package/dist/network/INetworkModule.mjs +1 -1
- package/dist/network/RequestThumbprint.mjs +2 -2
- package/dist/network/RequestThumbprint.mjs.map +1 -1
- package/dist/network/ThrottlingUtils.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.mjs +6 -7
- package/dist/network/ThrottlingUtils.mjs.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +1 -2
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +14 -14
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/protocol/Token.d.ts +40 -0
- package/dist/protocol/Token.d.ts.map +1 -0
- package/dist/protocol/Token.mjs +129 -0
- package/dist/protocol/Token.mjs.map +1 -0
- package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -1
- package/dist/request/AuthenticationHeaderParser.mjs +3 -3
- package/dist/request/AuthenticationHeaderParser.mjs.map +1 -1
- package/dist/request/BaseAuthRequest.d.ts +4 -8
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationCodeRequest.d.ts +2 -1
- package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationUrlRequest.d.ts +2 -4
- package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts +2 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/CommonSilentFlowRequest.d.ts +2 -1
- package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +6 -12
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +11 -24
- package/dist/request/RequestParameterBuilder.mjs.map +1 -1
- package/dist/request/ScopeSet.mjs +5 -5
- package/dist/request/ScopeSet.mjs.map +1 -1
- package/dist/response/AuthenticationResult.d.ts +1 -1
- package/dist/response/AuthenticationResult.d.ts.map +1 -1
- package/dist/response/ResponseHandler.d.ts +7 -6
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +41 -43
- package/dist/response/ResponseHandler.mjs.map +1 -1
- package/dist/telemetry/performance/IPerformanceClient.d.ts +0 -29
- package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.d.ts +5 -81
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +24 -170
- package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.d.ts +1 -280
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +2 -483
- package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceEvents.d.ts +66 -0
- package/dist/telemetry/performance/PerformanceEvents.d.ts.map +1 -0
- package/dist/telemetry/performance/PerformanceEvents.mjs +74 -0
- package/dist/telemetry/performance/PerformanceEvents.mjs.map +1 -0
- package/dist/telemetry/performance/StubPerformanceClient.d.ts +0 -4
- package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +2 -26
- package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.d.ts +2 -2
- package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +28 -30
- package/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
- package/dist/url/UrlString.d.ts +0 -5
- package/dist/url/UrlString.d.ts.map +1 -1
- package/dist/url/UrlString.mjs +5 -13
- package/dist/url/UrlString.mjs.map +1 -1
- package/dist/utils/ClientAssertionUtils.mjs +1 -1
- package/dist/utils/Constants.d.ts +81 -112
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +100 -127
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/FunctionWrappers.d.ts +2 -2
- package/dist/utils/FunctionWrappers.d.ts.map +1 -1
- package/dist/utils/FunctionWrappers.mjs +19 -20
- package/dist/utils/FunctionWrappers.mjs.map +1 -1
- package/dist/utils/ProtocolUtils.d.ts +14 -35
- package/dist/utils/ProtocolUtils.d.ts.map +1 -1
- package/dist/utils/ProtocolUtils.mjs +57 -61
- package/dist/utils/ProtocolUtils.mjs.map +1 -1
- package/dist/utils/StateTypes.d.ts +15 -0
- package/dist/utils/StateTypes.d.ts.map +1 -0
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.d.ts +1 -2
- package/dist/utils/UrlUtils.d.ts.map +1 -1
- package/dist/utils/UrlUtils.mjs +3 -10
- package/dist/utils/UrlUtils.mjs.map +1 -1
- package/lib/index-browser.cjs +26 -206
- package/lib/index-browser.cjs.map +1 -1
- package/lib/{index-node-4Jss3kYh.js → index-node-B7mR4APO.js} +3494 -4270
- package/lib/index-node-B7mR4APO.js.map +1 -0
- package/lib/index-node.cjs +6 -34
- package/lib/index-node.cjs.map +1 -1
- package/lib/index.cjs +5 -34
- package/lib/index.cjs.map +1 -1
- package/lib/types/account/AccountInfo.d.ts +0 -1
- package/lib/types/account/AccountInfo.d.ts.map +1 -1
- package/lib/types/account/AuthToken.d.ts.map +1 -1
- package/lib/types/account/ClientInfo.d.ts.map +1 -1
- package/lib/types/authority/Authority.d.ts +2 -2
- package/lib/types/authority/Authority.d.ts.map +1 -1
- package/lib/types/authority/AuthorityFactory.d.ts +6 -2
- package/lib/types/authority/AuthorityFactory.d.ts.map +1 -1
- package/lib/types/authority/AuthorityMetadata.d.ts +2 -2
- package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -1
- package/lib/types/authority/AuthorityOptions.d.ts +0 -1
- package/lib/types/authority/AuthorityOptions.d.ts.map +1 -1
- package/lib/types/authority/OIDCOptions.d.ts +2 -2
- package/lib/types/authority/OIDCOptions.d.ts.map +1 -1
- package/lib/types/authority/RegionDiscovery.d.ts +3 -3
- package/lib/types/authority/RegionDiscovery.d.ts.map +1 -1
- package/lib/types/cache/CacheManager.d.ts +26 -19
- package/lib/types/cache/CacheManager.d.ts.map +1 -1
- package/lib/types/cache/entities/AccessTokenEntity.d.ts +0 -4
- package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/lib/types/cache/entities/AccountEntity.d.ts +4 -56
- package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -1
- package/lib/types/cache/entities/CredentialEntity.d.ts +0 -2
- package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/lib/types/cache/interface/ICacheManager.d.ts +35 -17
- package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -1
- package/lib/types/cache/utils/AccountEntityUtils.d.ts +53 -0
- package/lib/types/cache/utils/AccountEntityUtils.d.ts.map +1 -0
- package/lib/types/cache/utils/CacheHelpers.d.ts +2 -2
- package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -1
- package/lib/types/cache/utils/CacheTypes.d.ts +0 -1
- package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -1
- package/lib/types/client/AuthorizationCodeClient.d.ts +23 -4
- package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/lib/types/client/RefreshTokenClient.d.ts +17 -4
- package/lib/types/client/RefreshTokenClient.d.ts.map +1 -1
- package/lib/types/client/SilentFlowClient.d.ts +17 -4
- package/lib/types/client/SilentFlowClient.d.ts.map +1 -1
- package/lib/types/config/ClientConfiguration.d.ts +2 -22
- package/lib/types/config/ClientConfiguration.d.ts.map +1 -1
- package/lib/types/crypto/ICrypto.d.ts +5 -3
- package/lib/types/crypto/ICrypto.d.ts.map +1 -1
- package/lib/types/crypto/PopTokenGenerator.d.ts +2 -2
- package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/lib/types/error/AuthError.d.ts +1 -18
- package/lib/types/error/AuthError.d.ts.map +1 -1
- package/lib/types/error/CacheError.d.ts +1 -6
- package/lib/types/error/CacheError.d.ts.map +1 -1
- package/lib/types/error/ClientAuthError.d.ts +0 -229
- package/lib/types/error/ClientAuthError.d.ts.map +1 -1
- package/lib/types/error/ClientAuthErrorCodes.d.ts +0 -8
- package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -1
- package/lib/types/error/ClientConfigurationError.d.ts +0 -128
- package/lib/types/error/ClientConfigurationError.d.ts.map +1 -1
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts +0 -2
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -1
- package/lib/types/error/InteractionRequiredAuthError.d.ts +1 -19
- package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/lib/types/error/JoseHeaderError.d.ts +0 -4
- package/lib/types/error/JoseHeaderError.d.ts.map +1 -1
- package/lib/types/error/PlatformBrokerError.d.ts.map +1 -1
- package/lib/types/exports-browser-only.d.ts +4 -3
- package/lib/types/exports-browser-only.d.ts.map +1 -1
- package/lib/types/exports-common.d.ts +11 -8
- package/lib/types/exports-common.d.ts.map +1 -1
- package/lib/types/exports-node-only.d.ts +2 -4
- package/lib/types/exports-node-only.d.ts.map +1 -1
- package/lib/types/logger/Logger.d.ts +36 -13
- package/lib/types/logger/Logger.d.ts.map +1 -1
- package/lib/types/network/ThrottlingUtils.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/packageMetadata.d.ts.map +1 -1
- package/lib/types/protocol/Authorize.d.ts +1 -2
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/protocol/Token.d.ts +40 -0
- package/lib/types/protocol/Token.d.ts.map +1 -0
- package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -1
- package/lib/types/request/BaseAuthRequest.d.ts +4 -8
- package/lib/types/request/BaseAuthRequest.d.ts.map +1 -1
- package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +2 -1
- package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +2 -4
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/lib/types/request/CommonRefreshTokenRequest.d.ts +2 -1
- package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/lib/types/request/CommonSilentFlowRequest.d.ts +2 -1
- package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/lib/types/request/RequestParameterBuilder.d.ts +6 -12
- package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -1
- package/lib/types/response/AuthenticationResult.d.ts +1 -1
- package/lib/types/response/AuthenticationResult.d.ts.map +1 -1
- package/lib/types/response/ResponseHandler.d.ts +7 -6
- package/lib/types/response/ResponseHandler.d.ts.map +1 -1
- package/lib/types/telemetry/performance/IPerformanceClient.d.ts +0 -29
- package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceClient.d.ts +5 -81
- package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +1 -280
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceEvents.d.ts +66 -0
- package/lib/types/telemetry/performance/PerformanceEvents.d.ts.map +1 -0
- package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +0 -4
- package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +2 -2
- package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/lib/types/url/UrlString.d.ts +0 -5
- package/lib/types/url/UrlString.d.ts.map +1 -1
- package/lib/types/utils/Constants.d.ts +81 -112
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/lib/types/utils/FunctionWrappers.d.ts +2 -2
- package/lib/types/utils/FunctionWrappers.d.ts.map +1 -1
- package/lib/types/utils/ProtocolUtils.d.ts +14 -35
- package/lib/types/utils/ProtocolUtils.d.ts.map +1 -1
- package/lib/types/utils/StateTypes.d.ts +15 -0
- package/lib/types/utils/StateTypes.d.ts.map +1 -0
- package/lib/types/utils/UrlUtils.d.ts +1 -2
- package/lib/types/utils/UrlUtils.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/account/AccountInfo.ts +0 -1
- package/src/account/AuthToken.ts +1 -2
- package/src/account/ClientInfo.ts +3 -6
- package/src/authority/Authority.ts +145 -146
- package/src/authority/AuthorityFactory.ts +7 -7
- package/src/authority/AuthorityMetadata.ts +54 -47
- package/src/authority/AuthorityOptions.ts +0 -1
- package/src/authority/OIDCOptions.ts +2 -2
- package/src/authority/RegionDiscovery.ts +20 -33
- package/src/cache/CacheManager.ts +177 -128
- package/src/cache/entities/AccessTokenEntity.ts +0 -4
- package/src/cache/entities/AccountEntity.ts +4 -292
- package/src/cache/entities/CredentialEntity.ts +0 -2
- package/src/cache/interface/ICacheManager.ts +55 -20
- package/src/cache/utils/AccountEntityUtils.ts +258 -0
- package/src/cache/utils/CacheHelpers.ts +23 -37
- package/src/cache/utils/CacheTypes.ts +0 -1
- package/src/client/AuthorizationCodeClient.ts +146 -58
- package/src/client/RefreshTokenClient.ts +108 -65
- package/src/client/SilentFlowClient.ts +74 -25
- package/src/config/ClientConfiguration.ts +9 -37
- package/src/crypto/ICrypto.ts +5 -3
- package/src/crypto/PopTokenGenerator.ts +3 -13
- package/src/error/AuthError.ts +11 -30
- package/src/error/CacheError.ts +4 -15
- package/src/error/ClientAuthError.ts +1 -317
- package/src/error/ClientAuthErrorCodes.ts +0 -8
- package/src/error/ClientConfigurationError.ts +1 -202
- package/src/error/ClientConfigurationErrorCodes.ts +0 -4
- package/src/error/InteractionRequiredAuthError.ts +8 -48
- package/src/error/JoseHeaderError.ts +1 -8
- package/src/error/PlatformBrokerError.ts +2 -1
- package/src/exports-browser-only.ts +2 -6
- package/src/exports-common.ts +8 -40
- package/src/exports-node-only.ts +5 -4
- package/src/logger/Logger.ts +174 -39
- package/src/network/RequestThumbprint.ts +1 -1
- package/src/network/ThrottlingUtils.ts +12 -15
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +24 -20
- package/src/protocol/Token.ts +230 -0
- package/src/request/AuthenticationHeaderParser.ts +2 -4
- package/src/request/BaseAuthRequest.ts +4 -8
- package/src/request/CommonAuthorizationCodeRequest.ts +2 -1
- package/src/request/CommonAuthorizationUrlRequest.ts +2 -4
- package/src/request/CommonRefreshTokenRequest.ts +2 -1
- package/src/request/CommonSilentFlowRequest.ts +2 -1
- package/src/request/RequestParameterBuilder.ts +35 -50
- package/src/request/ScopeSet.ts +4 -4
- package/src/response/AuthenticationResult.ts +1 -1
- package/src/response/ResponseHandler.ts +56 -60
- package/src/telemetry/performance/IPerformanceClient.ts +0 -40
- package/src/telemetry/performance/PerformanceClient.ts +26 -295
- package/src/telemetry/performance/PerformanceEvent.ts +3 -582
- package/src/telemetry/performance/PerformanceEvents.ts +98 -0
- package/src/telemetry/performance/StubPerformanceClient.ts +0 -16
- package/src/telemetry/server/ServerTelemetryManager.ts +33 -44
- package/src/url/UrlString.ts +3 -12
- package/src/utils/Constants.ts +103 -140
- package/src/utils/FunctionWrappers.ts +28 -29
- package/src/utils/ProtocolUtils.ts +67 -93
- package/src/utils/StateTypes.ts +20 -0
- package/src/utils/UrlUtils.ts +2 -15
- package/dist/cache/entities/AccountEntity.mjs +0 -232
- package/dist/cache/entities/AccountEntity.mjs.map +0 -1
- package/dist/client/BaseClient.d.ts +0 -59
- package/dist/client/BaseClient.d.ts.map +0 -1
- package/dist/client/BaseClient.mjs +0 -167
- package/dist/client/BaseClient.mjs.map +0 -1
- package/dist/index-browser.mjs +0 -72
- package/dist/index-browser.mjs.map +0 -1
- package/dist/request/CommonClientCredentialRequest.d.ts +0 -18
- package/dist/request/CommonClientCredentialRequest.d.ts.map +0 -1
- package/dist/request/CommonDeviceCodeRequest.d.ts +0 -22
- package/dist/request/CommonDeviceCodeRequest.d.ts.map +0 -1
- package/dist/request/CommonOnBehalfOfRequest.d.ts +0 -14
- package/dist/request/CommonOnBehalfOfRequest.d.ts.map +0 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts +0 -18
- package/dist/request/CommonUsernamePasswordRequest.d.ts.map +0 -1
- package/lib/index-node-4Jss3kYh.js.map +0 -1
- package/lib/types/client/BaseClient.d.ts +0 -59
- package/lib/types/client/BaseClient.d.ts.map +0 -1
- package/lib/types/request/CommonClientCredentialRequest.d.ts +0 -18
- package/lib/types/request/CommonClientCredentialRequest.d.ts.map +0 -1
- package/lib/types/request/CommonDeviceCodeRequest.d.ts +0 -22
- package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +0 -1
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts +0 -14
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +0 -1
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts +0 -18
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +0 -1
- package/src/client/BaseClient.ts +0 -320
- package/src/request/CommonClientCredentialRequest.ts +0 -23
- package/src/request/CommonDeviceCodeRequest.ts +0 -31
- package/src/request/CommonOnBehalfOfRequest.ts +0 -19
- package/src/request/CommonUsernamePasswordRequest.ts +0 -23
|
@@ -7,7 +7,7 @@ import { ICrypto, SignedHttpRequestParameters } from "./ICrypto.js";
|
|
|
7
7
|
import * as TimeUtils from "../utils/TimeUtils.js";
|
|
8
8
|
import { UrlString } from "../url/UrlString.js";
|
|
9
9
|
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
|
|
10
|
-
import
|
|
10
|
+
import * as PerformanceEvents from "../telemetry/performance/PerformanceEvents.js";
|
|
11
11
|
import { invokeAsync } from "../utils/FunctionWrappers.js";
|
|
12
12
|
import { Logger } from "../logger/Logger.js";
|
|
13
13
|
|
|
@@ -37,9 +37,9 @@ export type KeyLocation = (typeof KeyLocation)[keyof typeof KeyLocation];
|
|
|
37
37
|
/** @internal */
|
|
38
38
|
export class PopTokenGenerator {
|
|
39
39
|
private cryptoUtils: ICrypto;
|
|
40
|
-
private performanceClient
|
|
40
|
+
private performanceClient: IPerformanceClient;
|
|
41
41
|
|
|
42
|
-
constructor(cryptoUtils: ICrypto, performanceClient
|
|
42
|
+
constructor(cryptoUtils: ICrypto, performanceClient: IPerformanceClient) {
|
|
43
43
|
this.cryptoUtils = cryptoUtils;
|
|
44
44
|
this.performanceClient = performanceClient;
|
|
45
45
|
}
|
|
@@ -54,11 +54,6 @@ export class PopTokenGenerator {
|
|
|
54
54
|
request: SignedHttpRequestParameters,
|
|
55
55
|
logger: Logger
|
|
56
56
|
): Promise<ReqCnfData> {
|
|
57
|
-
this.performanceClient?.addQueueMeasurement(
|
|
58
|
-
PerformanceEvents.PopTokenGenerateCnf,
|
|
59
|
-
request.correlationId
|
|
60
|
-
);
|
|
61
|
-
|
|
62
57
|
const reqCnf = await invokeAsync(
|
|
63
58
|
this.generateKid.bind(this),
|
|
64
59
|
PerformanceEvents.PopTokenGenerateCnf,
|
|
@@ -82,11 +77,6 @@ export class PopTokenGenerator {
|
|
|
82
77
|
* @returns
|
|
83
78
|
*/
|
|
84
79
|
async generateKid(request: SignedHttpRequestParameters): Promise<ReqCnf> {
|
|
85
|
-
this.performanceClient?.addQueueMeasurement(
|
|
86
|
-
PerformanceEvents.PopTokenGenerateKid,
|
|
87
|
-
request.correlationId
|
|
88
|
-
);
|
|
89
|
-
|
|
90
80
|
const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(
|
|
91
81
|
request
|
|
92
82
|
);
|
package/src/error/AuthError.ts
CHANGED
|
@@ -3,31 +3,13 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { Constants } from "../utils/Constants.js";
|
|
7
6
|
import * as AuthErrorCodes from "./AuthErrorCodes.js";
|
|
8
7
|
import type { PlatformBrokerError } from "./PlatformBrokerError.js";
|
|
9
8
|
export { AuthErrorCodes };
|
|
10
9
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.",
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* AuthErrorMessage class containing string constants used by error codes and messages.
|
|
19
|
-
* @deprecated Use AuthErrorCodes instead
|
|
20
|
-
*/
|
|
21
|
-
export const AuthErrorMessage = {
|
|
22
|
-
unexpectedError: {
|
|
23
|
-
code: AuthErrorCodes.unexpectedError,
|
|
24
|
-
desc: AuthErrorMessages[AuthErrorCodes.unexpectedError],
|
|
25
|
-
},
|
|
26
|
-
postRequestFailed: {
|
|
27
|
-
code: AuthErrorCodes.postRequestFailed,
|
|
28
|
-
desc: AuthErrorMessages[AuthErrorCodes.postRequestFailed],
|
|
29
|
-
},
|
|
30
|
-
};
|
|
10
|
+
export function getDefaultErrorMessage(code: string): string {
|
|
11
|
+
return `See https://aka.ms/msal.js.errors#${code} for details`;
|
|
12
|
+
}
|
|
31
13
|
|
|
32
14
|
/**
|
|
33
15
|
* General error class thrown by the MSAL.js library.
|
|
@@ -59,15 +41,16 @@ export class AuthError extends Error {
|
|
|
59
41
|
platformBrokerError?: PlatformBrokerError;
|
|
60
42
|
|
|
61
43
|
constructor(errorCode?: string, errorMessage?: string, suberror?: string) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
:
|
|
44
|
+
const message =
|
|
45
|
+
errorMessage ||
|
|
46
|
+
(errorCode ? getDefaultErrorMessage(errorCode) : "");
|
|
47
|
+
const errorString = message ? `${errorCode}: ${message}` : errorCode;
|
|
65
48
|
super(errorString);
|
|
66
49
|
Object.setPrototypeOf(this, AuthError.prototype);
|
|
67
50
|
|
|
68
|
-
this.errorCode = errorCode ||
|
|
69
|
-
this.errorMessage =
|
|
70
|
-
this.subError = suberror ||
|
|
51
|
+
this.errorCode = errorCode || "";
|
|
52
|
+
this.errorMessage = message || "";
|
|
53
|
+
this.subError = suberror || "";
|
|
71
54
|
this.name = "AuthError";
|
|
72
55
|
}
|
|
73
56
|
|
|
@@ -82,8 +65,6 @@ export function createAuthError(
|
|
|
82
65
|
): AuthError {
|
|
83
66
|
return new AuthError(
|
|
84
67
|
code,
|
|
85
|
-
additionalMessage
|
|
86
|
-
? `${AuthErrorMessages[code]} ${additionalMessage}`
|
|
87
|
-
: AuthErrorMessages[code]
|
|
68
|
+
additionalMessage || getDefaultErrorMessage(code)
|
|
88
69
|
);
|
|
89
70
|
}
|
package/src/error/CacheError.ts
CHANGED
|
@@ -3,20 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { AuthError } from "./AuthError.js";
|
|
7
6
|
import * as CacheErrorCodes from "./CacheErrorCodes.js";
|
|
7
|
+
import { getDefaultErrorMessage } from "./AuthError.js";
|
|
8
8
|
export { CacheErrorCodes };
|
|
9
9
|
|
|
10
|
-
export const CacheErrorMessages = {
|
|
11
|
-
[CacheErrorCodes.cacheQuotaExceeded]: "Exceeded cache storage capacity.",
|
|
12
|
-
[CacheErrorCodes.cacheErrorUnknown]:
|
|
13
|
-
"Unexpected error occurred when using cache storage.",
|
|
14
|
-
};
|
|
15
|
-
|
|
16
10
|
/**
|
|
17
11
|
* Error thrown when there is an error with the cache
|
|
18
12
|
*/
|
|
19
|
-
export class CacheError extends
|
|
13
|
+
export class CacheError extends Error {
|
|
20
14
|
/**
|
|
21
15
|
* Short string denoting error
|
|
22
16
|
*/
|
|
@@ -28,13 +22,8 @@ export class CacheError extends AuthError {
|
|
|
28
22
|
errorMessage: string;
|
|
29
23
|
|
|
30
24
|
constructor(errorCode: string, errorMessage?: string) {
|
|
31
|
-
const message =
|
|
32
|
-
|
|
33
|
-
(CacheErrorMessages[errorCode]
|
|
34
|
-
? CacheErrorMessages[errorCode]
|
|
35
|
-
: CacheErrorMessages[CacheErrorCodes.cacheErrorUnknown]);
|
|
36
|
-
|
|
37
|
-
super(`${errorCode}: ${message}`);
|
|
25
|
+
const message = errorMessage || getDefaultErrorMessage(errorCode);
|
|
26
|
+
super(message);
|
|
38
27
|
Object.setPrototypeOf(this, CacheError.prototype);
|
|
39
28
|
|
|
40
29
|
this.name = "CacheError";
|
|
@@ -11,328 +11,12 @@ export { ClientAuthErrorCodes }; // Allow importing as "ClientAuthErrorCodes";
|
|
|
11
11
|
* ClientAuthErrorMessage class containing string constants used by error codes and messages.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
export const ClientAuthErrorMessages = {
|
|
15
|
-
[ClientAuthErrorCodes.clientInfoDecodingError]:
|
|
16
|
-
"The client info could not be parsed/decoded correctly",
|
|
17
|
-
[ClientAuthErrorCodes.clientInfoEmptyError]: "The client info was empty",
|
|
18
|
-
[ClientAuthErrorCodes.tokenParsingError]: "Token cannot be parsed",
|
|
19
|
-
[ClientAuthErrorCodes.nullOrEmptyToken]: "The token is null or empty",
|
|
20
|
-
[ClientAuthErrorCodes.endpointResolutionError]:
|
|
21
|
-
"Endpoints cannot be resolved",
|
|
22
|
-
[ClientAuthErrorCodes.networkError]: "Network request failed",
|
|
23
|
-
[ClientAuthErrorCodes.openIdConfigError]:
|
|
24
|
-
"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",
|
|
25
|
-
[ClientAuthErrorCodes.hashNotDeserialized]:
|
|
26
|
-
"The hash parameters could not be deserialized",
|
|
27
|
-
[ClientAuthErrorCodes.invalidState]: "State was not the expected format",
|
|
28
|
-
[ClientAuthErrorCodes.stateMismatch]: "State mismatch error",
|
|
29
|
-
[ClientAuthErrorCodes.stateNotFound]: "State not found",
|
|
30
|
-
[ClientAuthErrorCodes.nonceMismatch]: "Nonce mismatch error",
|
|
31
|
-
[ClientAuthErrorCodes.authTimeNotFound]:
|
|
32
|
-
"Max Age was requested and the ID token is missing the auth_time variable." +
|
|
33
|
-
" auth_time is an optional claim and is not enabled by default - it must be enabled." +
|
|
34
|
-
" See https://aka.ms/msaljs/optional-claims for more information.",
|
|
35
|
-
[ClientAuthErrorCodes.maxAgeTranspired]:
|
|
36
|
-
"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",
|
|
37
|
-
[ClientAuthErrorCodes.multipleMatchingTokens]:
|
|
38
|
-
"The cache contains multiple tokens satisfying the requirements. " +
|
|
39
|
-
"Call AcquireToken again providing more requirements such as authority or account.",
|
|
40
|
-
[ClientAuthErrorCodes.multipleMatchingAccounts]:
|
|
41
|
-
"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",
|
|
42
|
-
[ClientAuthErrorCodes.multipleMatchingAppMetadata]:
|
|
43
|
-
"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",
|
|
44
|
-
[ClientAuthErrorCodes.requestCannotBeMade]:
|
|
45
|
-
"Token request cannot be made without authorization code or refresh token.",
|
|
46
|
-
[ClientAuthErrorCodes.cannotRemoveEmptyScope]:
|
|
47
|
-
"Cannot remove null or empty scope from ScopeSet",
|
|
48
|
-
[ClientAuthErrorCodes.cannotAppendScopeSet]: "Cannot append ScopeSet",
|
|
49
|
-
[ClientAuthErrorCodes.emptyInputScopeSet]:
|
|
50
|
-
"Empty input ScopeSet cannot be processed",
|
|
51
|
-
[ClientAuthErrorCodes.deviceCodePollingCancelled]:
|
|
52
|
-
"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",
|
|
53
|
-
[ClientAuthErrorCodes.deviceCodeExpired]: "Device code is expired.",
|
|
54
|
-
[ClientAuthErrorCodes.deviceCodeUnknownError]:
|
|
55
|
-
"Device code stopped polling for unknown reasons.",
|
|
56
|
-
[ClientAuthErrorCodes.noAccountInSilentRequest]:
|
|
57
|
-
"Please pass an account object, silent flow is not supported without account information",
|
|
58
|
-
[ClientAuthErrorCodes.invalidCacheRecord]:
|
|
59
|
-
"Cache record object was null or undefined.",
|
|
60
|
-
[ClientAuthErrorCodes.invalidCacheEnvironment]:
|
|
61
|
-
"Invalid environment when attempting to create cache entry",
|
|
62
|
-
[ClientAuthErrorCodes.noAccountFound]:
|
|
63
|
-
"No account found in cache for given key.",
|
|
64
|
-
[ClientAuthErrorCodes.noCryptoObject]: "No crypto object detected.",
|
|
65
|
-
[ClientAuthErrorCodes.unexpectedCredentialType]:
|
|
66
|
-
"Unexpected credential type.",
|
|
67
|
-
[ClientAuthErrorCodes.invalidAssertion]:
|
|
68
|
-
"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",
|
|
69
|
-
[ClientAuthErrorCodes.invalidClientCredential]:
|
|
70
|
-
"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",
|
|
71
|
-
[ClientAuthErrorCodes.tokenRefreshRequired]:
|
|
72
|
-
"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",
|
|
73
|
-
[ClientAuthErrorCodes.userTimeoutReached]:
|
|
74
|
-
"User defined timeout for device code polling reached",
|
|
75
|
-
[ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt]:
|
|
76
|
-
"Cannot generate a POP jwt if the token_claims are not populated",
|
|
77
|
-
[ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse]:
|
|
78
|
-
"Server response does not contain an authorization code to proceed",
|
|
79
|
-
[ClientAuthErrorCodes.bindingKeyNotRemoved]:
|
|
80
|
-
"Could not remove the credential's binding key from storage.",
|
|
81
|
-
[ClientAuthErrorCodes.endSessionEndpointNotSupported]:
|
|
82
|
-
"The provided authority does not support logout",
|
|
83
|
-
[ClientAuthErrorCodes.keyIdMissing]:
|
|
84
|
-
"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",
|
|
85
|
-
[ClientAuthErrorCodes.noNetworkConnectivity]:
|
|
86
|
-
"No network connectivity. Check your internet connection.",
|
|
87
|
-
[ClientAuthErrorCodes.userCanceled]: "User cancelled the flow.",
|
|
88
|
-
[ClientAuthErrorCodes.missingTenantIdError]:
|
|
89
|
-
"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",
|
|
90
|
-
[ClientAuthErrorCodes.methodNotImplemented]:
|
|
91
|
-
"This method has not been implemented",
|
|
92
|
-
[ClientAuthErrorCodes.nestedAppAuthBridgeDisabled]:
|
|
93
|
-
"The nested app auth bridge is disabled",
|
|
94
|
-
[ClientAuthErrorCodes.platformBrokerError]:
|
|
95
|
-
"An error occurred in the native broker. See the platformBrokerError property for details.",
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* String constants used by error codes and messages.
|
|
100
|
-
* @deprecated Use ClientAuthErrorCodes instead
|
|
101
|
-
*/
|
|
102
|
-
export const ClientAuthErrorMessage = {
|
|
103
|
-
clientInfoDecodingError: {
|
|
104
|
-
code: ClientAuthErrorCodes.clientInfoDecodingError,
|
|
105
|
-
desc: ClientAuthErrorMessages[
|
|
106
|
-
ClientAuthErrorCodes.clientInfoDecodingError
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
clientInfoEmptyError: {
|
|
110
|
-
code: ClientAuthErrorCodes.clientInfoEmptyError,
|
|
111
|
-
desc: ClientAuthErrorMessages[
|
|
112
|
-
ClientAuthErrorCodes.clientInfoEmptyError
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
tokenParsingError: {
|
|
116
|
-
code: ClientAuthErrorCodes.tokenParsingError,
|
|
117
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.tokenParsingError],
|
|
118
|
-
},
|
|
119
|
-
nullOrEmptyToken: {
|
|
120
|
-
code: ClientAuthErrorCodes.nullOrEmptyToken,
|
|
121
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.nullOrEmptyToken],
|
|
122
|
-
},
|
|
123
|
-
endpointResolutionError: {
|
|
124
|
-
code: ClientAuthErrorCodes.endpointResolutionError,
|
|
125
|
-
desc: ClientAuthErrorMessages[
|
|
126
|
-
ClientAuthErrorCodes.endpointResolutionError
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
networkError: {
|
|
130
|
-
code: ClientAuthErrorCodes.networkError,
|
|
131
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.networkError],
|
|
132
|
-
},
|
|
133
|
-
unableToGetOpenidConfigError: {
|
|
134
|
-
code: ClientAuthErrorCodes.openIdConfigError,
|
|
135
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.openIdConfigError],
|
|
136
|
-
},
|
|
137
|
-
hashNotDeserialized: {
|
|
138
|
-
code: ClientAuthErrorCodes.hashNotDeserialized,
|
|
139
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.hashNotDeserialized],
|
|
140
|
-
},
|
|
141
|
-
invalidStateError: {
|
|
142
|
-
code: ClientAuthErrorCodes.invalidState,
|
|
143
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.invalidState],
|
|
144
|
-
},
|
|
145
|
-
stateMismatchError: {
|
|
146
|
-
code: ClientAuthErrorCodes.stateMismatch,
|
|
147
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.stateMismatch],
|
|
148
|
-
},
|
|
149
|
-
stateNotFoundError: {
|
|
150
|
-
code: ClientAuthErrorCodes.stateNotFound,
|
|
151
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.stateNotFound],
|
|
152
|
-
},
|
|
153
|
-
nonceMismatchError: {
|
|
154
|
-
code: ClientAuthErrorCodes.nonceMismatch,
|
|
155
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.nonceMismatch],
|
|
156
|
-
},
|
|
157
|
-
authTimeNotFoundError: {
|
|
158
|
-
code: ClientAuthErrorCodes.authTimeNotFound,
|
|
159
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.authTimeNotFound],
|
|
160
|
-
},
|
|
161
|
-
maxAgeTranspired: {
|
|
162
|
-
code: ClientAuthErrorCodes.maxAgeTranspired,
|
|
163
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.maxAgeTranspired],
|
|
164
|
-
},
|
|
165
|
-
multipleMatchingTokens: {
|
|
166
|
-
code: ClientAuthErrorCodes.multipleMatchingTokens,
|
|
167
|
-
desc: ClientAuthErrorMessages[
|
|
168
|
-
ClientAuthErrorCodes.multipleMatchingTokens
|
|
169
|
-
],
|
|
170
|
-
},
|
|
171
|
-
multipleMatchingAccounts: {
|
|
172
|
-
code: ClientAuthErrorCodes.multipleMatchingAccounts,
|
|
173
|
-
desc: ClientAuthErrorMessages[
|
|
174
|
-
ClientAuthErrorCodes.multipleMatchingAccounts
|
|
175
|
-
],
|
|
176
|
-
},
|
|
177
|
-
multipleMatchingAppMetadata: {
|
|
178
|
-
code: ClientAuthErrorCodes.multipleMatchingAppMetadata,
|
|
179
|
-
desc: ClientAuthErrorMessages[
|
|
180
|
-
ClientAuthErrorCodes.multipleMatchingAppMetadata
|
|
181
|
-
],
|
|
182
|
-
},
|
|
183
|
-
tokenRequestCannotBeMade: {
|
|
184
|
-
code: ClientAuthErrorCodes.requestCannotBeMade,
|
|
185
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.requestCannotBeMade],
|
|
186
|
-
},
|
|
187
|
-
removeEmptyScopeError: {
|
|
188
|
-
code: ClientAuthErrorCodes.cannotRemoveEmptyScope,
|
|
189
|
-
desc: ClientAuthErrorMessages[
|
|
190
|
-
ClientAuthErrorCodes.cannotRemoveEmptyScope
|
|
191
|
-
],
|
|
192
|
-
},
|
|
193
|
-
appendScopeSetError: {
|
|
194
|
-
code: ClientAuthErrorCodes.cannotAppendScopeSet,
|
|
195
|
-
desc: ClientAuthErrorMessages[
|
|
196
|
-
ClientAuthErrorCodes.cannotAppendScopeSet
|
|
197
|
-
],
|
|
198
|
-
},
|
|
199
|
-
emptyInputScopeSetError: {
|
|
200
|
-
code: ClientAuthErrorCodes.emptyInputScopeSet,
|
|
201
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.emptyInputScopeSet],
|
|
202
|
-
},
|
|
203
|
-
DeviceCodePollingCancelled: {
|
|
204
|
-
code: ClientAuthErrorCodes.deviceCodePollingCancelled,
|
|
205
|
-
desc: ClientAuthErrorMessages[
|
|
206
|
-
ClientAuthErrorCodes.deviceCodePollingCancelled
|
|
207
|
-
],
|
|
208
|
-
},
|
|
209
|
-
DeviceCodeExpired: {
|
|
210
|
-
code: ClientAuthErrorCodes.deviceCodeExpired,
|
|
211
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.deviceCodeExpired],
|
|
212
|
-
},
|
|
213
|
-
DeviceCodeUnknownError: {
|
|
214
|
-
code: ClientAuthErrorCodes.deviceCodeUnknownError,
|
|
215
|
-
desc: ClientAuthErrorMessages[
|
|
216
|
-
ClientAuthErrorCodes.deviceCodeUnknownError
|
|
217
|
-
],
|
|
218
|
-
},
|
|
219
|
-
NoAccountInSilentRequest: {
|
|
220
|
-
code: ClientAuthErrorCodes.noAccountInSilentRequest,
|
|
221
|
-
desc: ClientAuthErrorMessages[
|
|
222
|
-
ClientAuthErrorCodes.noAccountInSilentRequest
|
|
223
|
-
],
|
|
224
|
-
},
|
|
225
|
-
invalidCacheRecord: {
|
|
226
|
-
code: ClientAuthErrorCodes.invalidCacheRecord,
|
|
227
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.invalidCacheRecord],
|
|
228
|
-
},
|
|
229
|
-
invalidCacheEnvironment: {
|
|
230
|
-
code: ClientAuthErrorCodes.invalidCacheEnvironment,
|
|
231
|
-
desc: ClientAuthErrorMessages[
|
|
232
|
-
ClientAuthErrorCodes.invalidCacheEnvironment
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
|
-
noAccountFound: {
|
|
236
|
-
code: ClientAuthErrorCodes.noAccountFound,
|
|
237
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.noAccountFound],
|
|
238
|
-
},
|
|
239
|
-
noCryptoObj: {
|
|
240
|
-
code: ClientAuthErrorCodes.noCryptoObject,
|
|
241
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.noCryptoObject],
|
|
242
|
-
},
|
|
243
|
-
unexpectedCredentialType: {
|
|
244
|
-
code: ClientAuthErrorCodes.unexpectedCredentialType,
|
|
245
|
-
desc: ClientAuthErrorMessages[
|
|
246
|
-
ClientAuthErrorCodes.unexpectedCredentialType
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
invalidAssertion: {
|
|
250
|
-
code: ClientAuthErrorCodes.invalidAssertion,
|
|
251
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.invalidAssertion],
|
|
252
|
-
},
|
|
253
|
-
invalidClientCredential: {
|
|
254
|
-
code: ClientAuthErrorCodes.invalidClientCredential,
|
|
255
|
-
desc: ClientAuthErrorMessages[
|
|
256
|
-
ClientAuthErrorCodes.invalidClientCredential
|
|
257
|
-
],
|
|
258
|
-
},
|
|
259
|
-
tokenRefreshRequired: {
|
|
260
|
-
code: ClientAuthErrorCodes.tokenRefreshRequired,
|
|
261
|
-
desc: ClientAuthErrorMessages[
|
|
262
|
-
ClientAuthErrorCodes.tokenRefreshRequired
|
|
263
|
-
],
|
|
264
|
-
},
|
|
265
|
-
userTimeoutReached: {
|
|
266
|
-
code: ClientAuthErrorCodes.userTimeoutReached,
|
|
267
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.userTimeoutReached],
|
|
268
|
-
},
|
|
269
|
-
tokenClaimsRequired: {
|
|
270
|
-
code: ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt,
|
|
271
|
-
desc: ClientAuthErrorMessages[
|
|
272
|
-
ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt
|
|
273
|
-
],
|
|
274
|
-
},
|
|
275
|
-
noAuthorizationCodeFromServer: {
|
|
276
|
-
code: ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse,
|
|
277
|
-
desc: ClientAuthErrorMessages[
|
|
278
|
-
ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
bindingKeyNotRemovedError: {
|
|
282
|
-
code: ClientAuthErrorCodes.bindingKeyNotRemoved,
|
|
283
|
-
desc: ClientAuthErrorMessages[
|
|
284
|
-
ClientAuthErrorCodes.bindingKeyNotRemoved
|
|
285
|
-
],
|
|
286
|
-
},
|
|
287
|
-
logoutNotSupported: {
|
|
288
|
-
code: ClientAuthErrorCodes.endSessionEndpointNotSupported,
|
|
289
|
-
desc: ClientAuthErrorMessages[
|
|
290
|
-
ClientAuthErrorCodes.endSessionEndpointNotSupported
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
keyIdMissing: {
|
|
294
|
-
code: ClientAuthErrorCodes.keyIdMissing,
|
|
295
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.keyIdMissing],
|
|
296
|
-
},
|
|
297
|
-
noNetworkConnectivity: {
|
|
298
|
-
code: ClientAuthErrorCodes.noNetworkConnectivity,
|
|
299
|
-
desc: ClientAuthErrorMessages[
|
|
300
|
-
ClientAuthErrorCodes.noNetworkConnectivity
|
|
301
|
-
],
|
|
302
|
-
},
|
|
303
|
-
userCanceledError: {
|
|
304
|
-
code: ClientAuthErrorCodes.userCanceled,
|
|
305
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.userCanceled],
|
|
306
|
-
},
|
|
307
|
-
missingTenantIdError: {
|
|
308
|
-
code: ClientAuthErrorCodes.missingTenantIdError,
|
|
309
|
-
desc: ClientAuthErrorMessages[
|
|
310
|
-
ClientAuthErrorCodes.missingTenantIdError
|
|
311
|
-
],
|
|
312
|
-
},
|
|
313
|
-
nestedAppAuthBridgeDisabled: {
|
|
314
|
-
code: ClientAuthErrorCodes.nestedAppAuthBridgeDisabled,
|
|
315
|
-
desc: ClientAuthErrorMessages[
|
|
316
|
-
ClientAuthErrorCodes.nestedAppAuthBridgeDisabled
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
platformBrokerError: {
|
|
320
|
-
code: ClientAuthErrorCodes.platformBrokerError,
|
|
321
|
-
desc: ClientAuthErrorMessages[ClientAuthErrorCodes.platformBrokerError],
|
|
322
|
-
},
|
|
323
|
-
};
|
|
324
|
-
|
|
325
14
|
/**
|
|
326
15
|
* Error thrown when there is an error in the client code running on the browser.
|
|
327
16
|
*/
|
|
328
17
|
export class ClientAuthError extends AuthError {
|
|
329
18
|
constructor(errorCode: string, additionalMessage?: string) {
|
|
330
|
-
super(
|
|
331
|
-
errorCode,
|
|
332
|
-
additionalMessage
|
|
333
|
-
? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}`
|
|
334
|
-
: ClientAuthErrorMessages[errorCode]
|
|
335
|
-
);
|
|
19
|
+
super(errorCode, additionalMessage);
|
|
336
20
|
this.name = "ClientAuthError";
|
|
337
21
|
|
|
338
22
|
Object.setPrototypeOf(this, ClientAuthError.prototype);
|
|
@@ -18,25 +18,18 @@ export const nonceMismatch = "nonce_mismatch";
|
|
|
18
18
|
export const authTimeNotFound = "auth_time_not_found";
|
|
19
19
|
export const maxAgeTranspired = "max_age_transpired";
|
|
20
20
|
export const multipleMatchingTokens = "multiple_matching_tokens";
|
|
21
|
-
export const multipleMatchingAccounts = "multiple_matching_accounts";
|
|
22
21
|
export const multipleMatchingAppMetadata = "multiple_matching_appMetadata";
|
|
23
22
|
export const requestCannotBeMade = "request_cannot_be_made";
|
|
24
23
|
export const cannotRemoveEmptyScope = "cannot_remove_empty_scope";
|
|
25
24
|
export const cannotAppendScopeSet = "cannot_append_scopeset";
|
|
26
25
|
export const emptyInputScopeSet = "empty_input_scopeset";
|
|
27
|
-
export const deviceCodePollingCancelled = "device_code_polling_cancelled";
|
|
28
|
-
export const deviceCodeExpired = "device_code_expired";
|
|
29
|
-
export const deviceCodeUnknownError = "device_code_unknown_error";
|
|
30
26
|
export const noAccountInSilentRequest = "no_account_in_silent_request";
|
|
31
27
|
export const invalidCacheRecord = "invalid_cache_record";
|
|
32
28
|
export const invalidCacheEnvironment = "invalid_cache_environment";
|
|
33
29
|
export const noAccountFound = "no_account_found";
|
|
34
30
|
export const noCryptoObject = "no_crypto_object";
|
|
35
31
|
export const unexpectedCredentialType = "unexpected_credential_type";
|
|
36
|
-
export const invalidAssertion = "invalid_assertion";
|
|
37
|
-
export const invalidClientCredential = "invalid_client_credential";
|
|
38
32
|
export const tokenRefreshRequired = "token_refresh_required";
|
|
39
|
-
export const userTimeoutReached = "user_timeout_reached";
|
|
40
33
|
export const tokenClaimsCnfRequiredForSignedJwt =
|
|
41
34
|
"token_claims_cnf_required_for_signedjwt";
|
|
42
35
|
export const authorizationCodeMissingFromServerResponse =
|
|
@@ -47,7 +40,6 @@ export const endSessionEndpointNotSupported =
|
|
|
47
40
|
export const keyIdMissing = "key_id_missing";
|
|
48
41
|
export const noNetworkConnectivity = "no_network_connectivity";
|
|
49
42
|
export const userCanceled = "user_canceled";
|
|
50
|
-
export const missingTenantIdError = "missing_tenant_id_error";
|
|
51
43
|
export const methodNotImplemented = "method_not_implemented";
|
|
52
44
|
export const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
|
|
53
45
|
export const platformBrokerError = "platform_broker_error";
|