@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
package/dist/index-node.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs';
|
|
4
4
|
export { RefreshTokenClient } from './client/RefreshTokenClient.mjs';
|
|
5
5
|
export { SilentFlowClient } from './client/SilentFlowClient.mjs';
|
|
6
|
-
export {
|
|
7
|
-
export { DEFAULT_SYSTEM_OPTIONS } from './config/ClientConfiguration.mjs';
|
|
6
|
+
export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration } from './config/ClientConfiguration.mjs';
|
|
8
7
|
export { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData } from './account/AccountInfo.mjs';
|
|
9
8
|
export { getTenantIdFromIdTokenClaims } from './account/TokenClaims.mjs';
|
|
10
9
|
export { CcsCredentialType } from './account/CcsCredential.mjs';
|
|
@@ -14,7 +13,6 @@ export { AzureCloudInstance } from './authority/AuthorityOptions.mjs';
|
|
|
14
13
|
export { AuthorityType } from './authority/AuthorityType.mjs';
|
|
15
14
|
export { ProtocolMode } from './authority/ProtocolMode.mjs';
|
|
16
15
|
export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs';
|
|
17
|
-
export { AccountEntity } from './cache/entities/AccountEntity.mjs';
|
|
18
16
|
export { StubbedNetworkModule } from './network/INetworkModule.mjs';
|
|
19
17
|
export { ThrottlingUtils } from './network/ThrottlingUtils.mjs';
|
|
20
18
|
export { getRequestThumbprint } from './network/RequestThumbprint.mjs';
|
|
@@ -22,16 +20,18 @@ export { UrlString } from './url/UrlString.mjs';
|
|
|
22
20
|
export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs';
|
|
23
21
|
import * as Authorize from './protocol/Authorize.mjs';
|
|
24
22
|
export { Authorize as AuthorizeProtocol };
|
|
23
|
+
import * as Token from './protocol/Token.mjs';
|
|
24
|
+
export { Token as TokenProtocol };
|
|
25
25
|
import * as RequestParameterBuilder from './request/RequestParameterBuilder.mjs';
|
|
26
26
|
export { RequestParameterBuilder };
|
|
27
27
|
export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs';
|
|
28
28
|
export { ScopeSet } from './request/ScopeSet.mjs';
|
|
29
29
|
export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs';
|
|
30
30
|
export { LogLevel, Logger } from './logger/Logger.mjs';
|
|
31
|
-
export { InteractionRequiredAuthError,
|
|
31
|
+
export { InteractionRequiredAuthError, createInteractionRequiredAuthError } from './error/InteractionRequiredAuthError.mjs';
|
|
32
32
|
import * as InteractionRequiredAuthErrorCodes from './error/InteractionRequiredAuthErrorCodes.mjs';
|
|
33
33
|
export { InteractionRequiredAuthErrorCodes };
|
|
34
|
-
export { AuthError,
|
|
34
|
+
export { AuthError, createAuthError } from './error/AuthError.mjs';
|
|
35
35
|
import * as AuthErrorCodes from './error/AuthErrorCodes.mjs';
|
|
36
36
|
export { AuthErrorCodes };
|
|
37
37
|
export { PlatformBrokerError } from './error/PlatformBrokerError.mjs';
|
|
@@ -40,15 +40,17 @@ export { NetworkError, createNetworkError } from './error/NetworkError.mjs';
|
|
|
40
40
|
export { CacheError, createCacheError } from './error/CacheError.mjs';
|
|
41
41
|
import * as CacheErrorCodes from './error/CacheErrorCodes.mjs';
|
|
42
42
|
export { CacheErrorCodes };
|
|
43
|
-
export { ClientAuthError,
|
|
43
|
+
export { ClientAuthError, createClientAuthError } from './error/ClientAuthError.mjs';
|
|
44
44
|
import * as ClientAuthErrorCodes from './error/ClientAuthErrorCodes.mjs';
|
|
45
45
|
export { ClientAuthErrorCodes };
|
|
46
|
-
export { ClientConfigurationError,
|
|
46
|
+
export { ClientConfigurationError, createClientConfigurationError } from './error/ClientConfigurationError.mjs';
|
|
47
47
|
import * as ClientConfigurationErrorCodes from './error/ClientConfigurationErrorCodes.mjs';
|
|
48
48
|
export { ClientConfigurationErrorCodes };
|
|
49
|
-
|
|
49
|
+
import * as Constants from './utils/Constants.mjs';
|
|
50
|
+
export { Constants };
|
|
50
51
|
export { StringUtils } from './utils/StringUtils.mjs';
|
|
51
|
-
|
|
52
|
+
import * as ProtocolUtils from './utils/ProtocolUtils.mjs';
|
|
53
|
+
export { ProtocolUtils };
|
|
52
54
|
export { ServerTelemetryManager } from './telemetry/server/ServerTelemetryManager.mjs';
|
|
53
55
|
export { version } from './packageMetadata.mjs';
|
|
54
56
|
export { invoke, invokeAsync } from './utils/FunctionWrappers.mjs';
|
|
@@ -64,8 +66,11 @@ import * as UrlUtils from './utils/UrlUtils.mjs';
|
|
|
64
66
|
export { UrlUtils };
|
|
65
67
|
import * as AADServerParamKeys from './constants/AADServerParamKeys.mjs';
|
|
66
68
|
export { AADServerParamKeys };
|
|
69
|
+
import * as AccountEntityUtils from './cache/utils/AccountEntityUtils.mjs';
|
|
70
|
+
export { AccountEntityUtils };
|
|
67
71
|
export { TokenCacheContext } from './cache/persistence/TokenCacheContext.mjs';
|
|
68
72
|
import * as ClientAssertionUtils from './utils/ClientAssertionUtils.mjs';
|
|
69
73
|
export { ClientAssertionUtils };
|
|
70
74
|
export { getClientAssertion } from './utils/ClientAssertionUtils.mjs';
|
|
75
|
+
export { StubPerformanceClient } from './telemetry/performance/StubPerformanceClient.mjs';
|
|
71
76
|
//# sourceMappingURL=index-node.mjs.map
|
package/dist/index-node.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index-node.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs';
|
|
4
4
|
export { RefreshTokenClient } from './client/RefreshTokenClient.mjs';
|
|
5
5
|
export { SilentFlowClient } from './client/SilentFlowClient.mjs';
|
|
6
|
-
export {
|
|
7
|
-
export { DEFAULT_SYSTEM_OPTIONS } from './config/ClientConfiguration.mjs';
|
|
6
|
+
export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration } from './config/ClientConfiguration.mjs';
|
|
8
7
|
export { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData } from './account/AccountInfo.mjs';
|
|
9
8
|
export { getTenantIdFromIdTokenClaims } from './account/TokenClaims.mjs';
|
|
10
9
|
export { CcsCredentialType } from './account/CcsCredential.mjs';
|
|
@@ -14,7 +13,6 @@ export { AzureCloudInstance } from './authority/AuthorityOptions.mjs';
|
|
|
14
13
|
export { AuthorityType } from './authority/AuthorityType.mjs';
|
|
15
14
|
export { ProtocolMode } from './authority/ProtocolMode.mjs';
|
|
16
15
|
export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs';
|
|
17
|
-
export { AccountEntity } from './cache/entities/AccountEntity.mjs';
|
|
18
16
|
export { StubbedNetworkModule } from './network/INetworkModule.mjs';
|
|
19
17
|
export { ThrottlingUtils } from './network/ThrottlingUtils.mjs';
|
|
20
18
|
export { getRequestThumbprint } from './network/RequestThumbprint.mjs';
|
|
@@ -22,16 +20,18 @@ export { UrlString } from './url/UrlString.mjs';
|
|
|
22
20
|
export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs';
|
|
23
21
|
import * as Authorize from './protocol/Authorize.mjs';
|
|
24
22
|
export { Authorize as AuthorizeProtocol };
|
|
23
|
+
import * as Token from './protocol/Token.mjs';
|
|
24
|
+
export { Token as TokenProtocol };
|
|
25
25
|
import * as RequestParameterBuilder from './request/RequestParameterBuilder.mjs';
|
|
26
26
|
export { RequestParameterBuilder };
|
|
27
27
|
export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs';
|
|
28
28
|
export { ScopeSet } from './request/ScopeSet.mjs';
|
|
29
29
|
export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs';
|
|
30
30
|
export { LogLevel, Logger } from './logger/Logger.mjs';
|
|
31
|
-
export { InteractionRequiredAuthError,
|
|
31
|
+
export { InteractionRequiredAuthError, createInteractionRequiredAuthError } from './error/InteractionRequiredAuthError.mjs';
|
|
32
32
|
import * as InteractionRequiredAuthErrorCodes from './error/InteractionRequiredAuthErrorCodes.mjs';
|
|
33
33
|
export { InteractionRequiredAuthErrorCodes };
|
|
34
|
-
export { AuthError,
|
|
34
|
+
export { AuthError, createAuthError } from './error/AuthError.mjs';
|
|
35
35
|
import * as AuthErrorCodes from './error/AuthErrorCodes.mjs';
|
|
36
36
|
export { AuthErrorCodes };
|
|
37
37
|
export { PlatformBrokerError } from './error/PlatformBrokerError.mjs';
|
|
@@ -40,15 +40,17 @@ export { NetworkError, createNetworkError } from './error/NetworkError.mjs';
|
|
|
40
40
|
export { CacheError, createCacheError } from './error/CacheError.mjs';
|
|
41
41
|
import * as CacheErrorCodes from './error/CacheErrorCodes.mjs';
|
|
42
42
|
export { CacheErrorCodes };
|
|
43
|
-
export { ClientAuthError,
|
|
43
|
+
export { ClientAuthError, createClientAuthError } from './error/ClientAuthError.mjs';
|
|
44
44
|
import * as ClientAuthErrorCodes from './error/ClientAuthErrorCodes.mjs';
|
|
45
45
|
export { ClientAuthErrorCodes };
|
|
46
|
-
export { ClientConfigurationError,
|
|
46
|
+
export { ClientConfigurationError, createClientConfigurationError } from './error/ClientConfigurationError.mjs';
|
|
47
47
|
import * as ClientConfigurationErrorCodes from './error/ClientConfigurationErrorCodes.mjs';
|
|
48
48
|
export { ClientConfigurationErrorCodes };
|
|
49
|
-
|
|
49
|
+
import * as Constants from './utils/Constants.mjs';
|
|
50
|
+
export { Constants };
|
|
50
51
|
export { StringUtils } from './utils/StringUtils.mjs';
|
|
51
|
-
|
|
52
|
+
import * as ProtocolUtils from './utils/ProtocolUtils.mjs';
|
|
53
|
+
export { ProtocolUtils };
|
|
52
54
|
export { ServerTelemetryManager } from './telemetry/server/ServerTelemetryManager.mjs';
|
|
53
55
|
export { version } from './packageMetadata.mjs';
|
|
54
56
|
export { invoke, invokeAsync } from './utils/FunctionWrappers.mjs';
|
|
@@ -64,8 +66,12 @@ import * as UrlUtils from './utils/UrlUtils.mjs';
|
|
|
64
66
|
export { UrlUtils };
|
|
65
67
|
import * as AADServerParamKeys from './constants/AADServerParamKeys.mjs';
|
|
66
68
|
export { AADServerParamKeys };
|
|
69
|
+
import * as AccountEntityUtils from './cache/utils/AccountEntityUtils.mjs';
|
|
70
|
+
export { AccountEntityUtils };
|
|
67
71
|
export { JoseHeader } from './crypto/JoseHeader.mjs';
|
|
68
|
-
export { IntFields, PerformanceEventStatus
|
|
72
|
+
export { IntFields, PerformanceEventStatus } from './telemetry/performance/PerformanceEvent.mjs';
|
|
73
|
+
import * as PerformanceEvents from './telemetry/performance/PerformanceEvents.mjs';
|
|
74
|
+
export { PerformanceEvents };
|
|
69
75
|
export { PerformanceClient } from './telemetry/performance/PerformanceClient.mjs';
|
|
70
76
|
export { StubPerformanceClient } from './telemetry/performance/StubPerformanceClient.mjs';
|
|
71
77
|
export { PopTokenGenerator } from './crypto/PopTokenGenerator.mjs';
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/logger/Logger.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type LoggerMessageOptions = {
|
|
|
6
6
|
logLevel: LogLevel;
|
|
7
7
|
containsPii?: boolean;
|
|
8
8
|
context?: string;
|
|
9
|
-
correlationId
|
|
9
|
+
correlationId: string;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Log message level.
|
|
@@ -24,11 +24,34 @@ export declare enum LogLevel {
|
|
|
24
24
|
export interface ILoggerCallback {
|
|
25
25
|
(level: LogLevel, message: string, containsPii: boolean): void;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Represents a single logged message with metadata
|
|
29
|
+
*/
|
|
30
|
+
export interface LoggedMessage {
|
|
31
|
+
hash: string;
|
|
32
|
+
level: LogLevel;
|
|
33
|
+
containsPii: boolean;
|
|
34
|
+
milliseconds: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get all logs for specific correlation ID
|
|
38
|
+
* @param correlationId
|
|
39
|
+
*/
|
|
40
|
+
export declare function getLogsFromCache(correlationId: string): LoggedMessage[];
|
|
41
|
+
/**
|
|
42
|
+
* Get logs for correlation ID and flush them from cache
|
|
43
|
+
* Attaches logs with empty correlation id to the requested correlation logs
|
|
44
|
+
* @param correlationId
|
|
45
|
+
*/
|
|
46
|
+
export declare function getAndFlushLogsFromCache(correlationId: string): LoggedMessage[];
|
|
47
|
+
/**
|
|
48
|
+
* Get all correlation IDs that have logs
|
|
49
|
+
*/
|
|
50
|
+
export declare function getCachedCorrelationIds(): string[];
|
|
27
51
|
/**
|
|
28
52
|
* Class which facilitates logging of messages to a specific place.
|
|
29
53
|
*/
|
|
30
54
|
export declare class Logger {
|
|
31
|
-
private correlationId;
|
|
32
55
|
private level;
|
|
33
56
|
private piiLoggingEnabled;
|
|
34
57
|
private localCallback;
|
|
@@ -39,7 +62,7 @@ export declare class Logger {
|
|
|
39
62
|
/**
|
|
40
63
|
* Create new Logger with existing configurations.
|
|
41
64
|
*/
|
|
42
|
-
clone(packageName: string, packageVersion: string
|
|
65
|
+
clone(packageName: string, packageVersion: string): Logger;
|
|
43
66
|
/**
|
|
44
67
|
* Log message with required options.
|
|
45
68
|
*/
|
|
@@ -51,43 +74,43 @@ export declare class Logger {
|
|
|
51
74
|
/**
|
|
52
75
|
* Logs error messages.
|
|
53
76
|
*/
|
|
54
|
-
error(message: string, correlationId
|
|
77
|
+
error(message: string, correlationId: string): void;
|
|
55
78
|
/**
|
|
56
79
|
* Logs error messages with PII.
|
|
57
80
|
*/
|
|
58
|
-
errorPii(message: string, correlationId
|
|
81
|
+
errorPii(message: string, correlationId: string): void;
|
|
59
82
|
/**
|
|
60
83
|
* Logs warning messages.
|
|
61
84
|
*/
|
|
62
|
-
warning(message: string, correlationId
|
|
85
|
+
warning(message: string, correlationId: string): void;
|
|
63
86
|
/**
|
|
64
87
|
* Logs warning messages with PII.
|
|
65
88
|
*/
|
|
66
|
-
warningPii(message: string, correlationId
|
|
89
|
+
warningPii(message: string, correlationId: string): void;
|
|
67
90
|
/**
|
|
68
91
|
* Logs info messages.
|
|
69
92
|
*/
|
|
70
|
-
info(message: string, correlationId
|
|
93
|
+
info(message: string, correlationId: string): void;
|
|
71
94
|
/**
|
|
72
95
|
* Logs info messages with PII.
|
|
73
96
|
*/
|
|
74
|
-
infoPii(message: string, correlationId
|
|
97
|
+
infoPii(message: string, correlationId: string): void;
|
|
75
98
|
/**
|
|
76
99
|
* Logs verbose messages.
|
|
77
100
|
*/
|
|
78
|
-
verbose(message: string, correlationId
|
|
101
|
+
verbose(message: string, correlationId: string): void;
|
|
79
102
|
/**
|
|
80
103
|
* Logs verbose messages with PII.
|
|
81
104
|
*/
|
|
82
|
-
verbosePii(message: string, correlationId
|
|
105
|
+
verbosePii(message: string, correlationId: string): void;
|
|
83
106
|
/**
|
|
84
107
|
* Logs trace messages.
|
|
85
108
|
*/
|
|
86
|
-
trace(message: string, correlationId
|
|
109
|
+
trace(message: string, correlationId: string): void;
|
|
87
110
|
/**
|
|
88
111
|
* Logs trace messages with PII.
|
|
89
112
|
*/
|
|
90
|
-
tracePii(message: string, correlationId
|
|
113
|
+
tracePii(message: string, correlationId: string): void;
|
|
91
114
|
/**
|
|
92
115
|
* Returns whether PII Logging is enabled or not.
|
|
93
116
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logger/Logger.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logger/Logger.ts"],"names":[],"mappings":"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common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { Constants } from '../utils/Constants.mjs';
|
|
4
|
-
|
|
5
3
|
/*
|
|
6
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
5
|
* Licensed under the MIT License.
|
|
@@ -17,6 +15,84 @@ var LogLevel;
|
|
|
17
15
|
LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
|
|
18
16
|
LogLevel[LogLevel["Trace"] = 4] = "Trace";
|
|
19
17
|
})(LogLevel || (LogLevel = {}));
|
|
18
|
+
// Shared cache state for better minification - using Map's insertion order for LRU
|
|
19
|
+
const CACHE_CAPACITY = 50;
|
|
20
|
+
const MAX_LOGS_PER_CORRELATION = 500;
|
|
21
|
+
const correlationCache = new Map();
|
|
22
|
+
/**
|
|
23
|
+
* Mark correlation ID as recently used by moving it to end of Map
|
|
24
|
+
* @param correlationId
|
|
25
|
+
* @param {CorrelationLogData} data
|
|
26
|
+
*/
|
|
27
|
+
function markAsRecentlyUsed(correlationId, data) {
|
|
28
|
+
correlationCache.delete(correlationId);
|
|
29
|
+
correlationCache.set(correlationId, data);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Add log message to cache for specific correlation ID
|
|
33
|
+
* @param correlationId
|
|
34
|
+
* @param {LoggedMessage} loggedMessage
|
|
35
|
+
*/
|
|
36
|
+
function addLogToCache(correlationId, loggedMessage) {
|
|
37
|
+
const currentTime = Date.now();
|
|
38
|
+
let data = correlationCache.get(correlationId);
|
|
39
|
+
if (data) {
|
|
40
|
+
// Mark as recently used
|
|
41
|
+
markAsRecentlyUsed(correlationId, data);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// Create new entry
|
|
45
|
+
data = { logs: [], firstEventTime: currentTime };
|
|
46
|
+
correlationCache.set(correlationId, data);
|
|
47
|
+
// Remove LRU (first entry) if capacity exceeded
|
|
48
|
+
if (correlationCache.size > CACHE_CAPACITY) {
|
|
49
|
+
const firstKey = correlationCache.keys().next().value;
|
|
50
|
+
if (firstKey) {
|
|
51
|
+
correlationCache.delete(firstKey);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Add log to the data, maintaining max logs per correlation
|
|
56
|
+
data.logs.push({
|
|
57
|
+
...loggedMessage,
|
|
58
|
+
milliseconds: currentTime - data.firstEventTime,
|
|
59
|
+
});
|
|
60
|
+
if (data.logs.length > MAX_LOGS_PER_CORRELATION) {
|
|
61
|
+
data.logs.shift(); // Remove oldest log
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get logs for correlation ID and flush them from cache
|
|
66
|
+
* Attaches logs with empty correlation id to the requested correlation logs
|
|
67
|
+
* @param correlationId
|
|
68
|
+
*/
|
|
69
|
+
function getAndFlushLogsFromCache(correlationId) {
|
|
70
|
+
const res = [];
|
|
71
|
+
for (const id of ["", correlationId]) {
|
|
72
|
+
const data = correlationCache.get(id);
|
|
73
|
+
res.push(...(data?.logs ?? []));
|
|
74
|
+
correlationCache.delete(id); // Remove the correlation ID completely from cache
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Checks if a string is already a hashed logging string (6 alphanumeric characters)
|
|
80
|
+
*/
|
|
81
|
+
function isHashedString(str) {
|
|
82
|
+
if (str.length !== 6) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
for (let i = 0; i < str.length; i++) {
|
|
86
|
+
const char = str[i];
|
|
87
|
+
const isAlphaNumeric = (char >= "a" && char <= "z") ||
|
|
88
|
+
(char >= "A" && char <= "Z") ||
|
|
89
|
+
(char >= "0" && char <= "9");
|
|
90
|
+
if (!isAlphaNumeric) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
20
96
|
/**
|
|
21
97
|
* Class which facilitates logging of messages to a specific place.
|
|
22
98
|
*/
|
|
@@ -35,10 +111,8 @@ class Logger {
|
|
|
35
111
|
typeof setLoggerOptions.logLevel === "number"
|
|
36
112
|
? setLoggerOptions.logLevel
|
|
37
113
|
: LogLevel.Info;
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
-
this.packageName = packageName || Constants.EMPTY_STRING;
|
|
41
|
-
this.packageVersion = packageVersion || Constants.EMPTY_STRING;
|
|
114
|
+
this.packageName = packageName || "";
|
|
115
|
+
this.packageVersion = packageVersion || "";
|
|
42
116
|
}
|
|
43
117
|
static createDefaultLoggerOptions() {
|
|
44
118
|
return {
|
|
@@ -52,27 +126,36 @@ class Logger {
|
|
|
52
126
|
/**
|
|
53
127
|
* Create new Logger with existing configurations.
|
|
54
128
|
*/
|
|
55
|
-
clone(packageName, packageVersion
|
|
129
|
+
clone(packageName, packageVersion) {
|
|
56
130
|
return new Logger({
|
|
57
131
|
loggerCallback: this.localCallback,
|
|
58
132
|
piiLoggingEnabled: this.piiLoggingEnabled,
|
|
59
133
|
logLevel: this.level,
|
|
60
|
-
correlationId: correlationId || this.correlationId,
|
|
61
134
|
}, packageName, packageVersion);
|
|
62
135
|
}
|
|
63
136
|
/**
|
|
64
137
|
* Log message with required options.
|
|
65
138
|
*/
|
|
66
139
|
logMessage(logMessage, options) {
|
|
140
|
+
const correlationId = options.correlationId;
|
|
141
|
+
const isHashedInput = isHashedString(logMessage);
|
|
142
|
+
if (isHashedInput) {
|
|
143
|
+
const loggedMessage = {
|
|
144
|
+
hash: logMessage,
|
|
145
|
+
level: options.logLevel,
|
|
146
|
+
containsPii: options.containsPii || false,
|
|
147
|
+
milliseconds: 0, // Will be calculated in addLogToCache
|
|
148
|
+
};
|
|
149
|
+
addLogToCache(correlationId, loggedMessage);
|
|
150
|
+
}
|
|
67
151
|
if (options.logLevel > this.level ||
|
|
68
152
|
(!this.piiLoggingEnabled && options.containsPii)) {
|
|
69
153
|
return;
|
|
70
154
|
}
|
|
71
155
|
const timestamp = new Date().toUTCString();
|
|
72
156
|
// Add correlationId to logs if set, correlationId provided on log messages take precedence
|
|
73
|
-
const logHeader = `[${timestamp}] : [${
|
|
157
|
+
const logHeader = `[${timestamp}] : [${correlationId}]`;
|
|
74
158
|
const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;
|
|
75
|
-
// debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage);
|
|
76
159
|
this.executeCallback(options.logLevel, log, options.containsPii || false);
|
|
77
160
|
}
|
|
78
161
|
/**
|
|
@@ -90,7 +173,7 @@ class Logger {
|
|
|
90
173
|
this.logMessage(message, {
|
|
91
174
|
logLevel: LogLevel.Error,
|
|
92
175
|
containsPii: false,
|
|
93
|
-
correlationId: correlationId
|
|
176
|
+
correlationId: correlationId,
|
|
94
177
|
});
|
|
95
178
|
}
|
|
96
179
|
/**
|
|
@@ -100,7 +183,7 @@ class Logger {
|
|
|
100
183
|
this.logMessage(message, {
|
|
101
184
|
logLevel: LogLevel.Error,
|
|
102
185
|
containsPii: true,
|
|
103
|
-
correlationId: correlationId
|
|
186
|
+
correlationId: correlationId,
|
|
104
187
|
});
|
|
105
188
|
}
|
|
106
189
|
/**
|
|
@@ -110,7 +193,7 @@ class Logger {
|
|
|
110
193
|
this.logMessage(message, {
|
|
111
194
|
logLevel: LogLevel.Warning,
|
|
112
195
|
containsPii: false,
|
|
113
|
-
correlationId: correlationId
|
|
196
|
+
correlationId: correlationId,
|
|
114
197
|
});
|
|
115
198
|
}
|
|
116
199
|
/**
|
|
@@ -120,7 +203,7 @@ class Logger {
|
|
|
120
203
|
this.logMessage(message, {
|
|
121
204
|
logLevel: LogLevel.Warning,
|
|
122
205
|
containsPii: true,
|
|
123
|
-
correlationId: correlationId
|
|
206
|
+
correlationId: correlationId,
|
|
124
207
|
});
|
|
125
208
|
}
|
|
126
209
|
/**
|
|
@@ -130,7 +213,7 @@ class Logger {
|
|
|
130
213
|
this.logMessage(message, {
|
|
131
214
|
logLevel: LogLevel.Info,
|
|
132
215
|
containsPii: false,
|
|
133
|
-
correlationId: correlationId
|
|
216
|
+
correlationId: correlationId,
|
|
134
217
|
});
|
|
135
218
|
}
|
|
136
219
|
/**
|
|
@@ -140,7 +223,7 @@ class Logger {
|
|
|
140
223
|
this.logMessage(message, {
|
|
141
224
|
logLevel: LogLevel.Info,
|
|
142
225
|
containsPii: true,
|
|
143
|
-
correlationId: correlationId
|
|
226
|
+
correlationId: correlationId,
|
|
144
227
|
});
|
|
145
228
|
}
|
|
146
229
|
/**
|
|
@@ -150,7 +233,7 @@ class Logger {
|
|
|
150
233
|
this.logMessage(message, {
|
|
151
234
|
logLevel: LogLevel.Verbose,
|
|
152
235
|
containsPii: false,
|
|
153
|
-
correlationId: correlationId
|
|
236
|
+
correlationId: correlationId,
|
|
154
237
|
});
|
|
155
238
|
}
|
|
156
239
|
/**
|
|
@@ -160,7 +243,7 @@ class Logger {
|
|
|
160
243
|
this.logMessage(message, {
|
|
161
244
|
logLevel: LogLevel.Verbose,
|
|
162
245
|
containsPii: true,
|
|
163
|
-
correlationId: correlationId
|
|
246
|
+
correlationId: correlationId,
|
|
164
247
|
});
|
|
165
248
|
}
|
|
166
249
|
/**
|
|
@@ -170,7 +253,7 @@ class Logger {
|
|
|
170
253
|
this.logMessage(message, {
|
|
171
254
|
logLevel: LogLevel.Trace,
|
|
172
255
|
containsPii: false,
|
|
173
|
-
correlationId: correlationId
|
|
256
|
+
correlationId: correlationId,
|
|
174
257
|
});
|
|
175
258
|
}
|
|
176
259
|
/**
|
|
@@ -180,7 +263,7 @@ class Logger {
|
|
|
180
263
|
this.logMessage(message, {
|
|
181
264
|
logLevel: LogLevel.Trace,
|
|
182
265
|
containsPii: true,
|
|
183
|
-
correlationId: correlationId
|
|
266
|
+
correlationId: correlationId,
|
|
184
267
|
});
|
|
185
268
|
}
|
|
186
269
|
/**
|
|
@@ -191,5 +274,5 @@ class Logger {
|
|
|
191
274
|
}
|
|
192
275
|
}
|
|
193
276
|
|
|
194
|
-
export { LogLevel, Logger };
|
|
277
|
+
export { LogLevel, Logger, getAndFlushLogsFromCache };
|
|
195
278
|
//# sourceMappingURL=Logger.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.mjs","sources":["../../src/logger/Logger.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Logger.mjs","sources":["../../src/logger/Logger.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAcH;;AAEG;IACS,SAMX;AAND,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,QAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,QAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,QAAA,CAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACT,CAAC,EANW,QAAQ,KAAR,QAAQ,GAMnB,EAAA,CAAA,CAAA,CAAA;AA2BD;AACA,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA8B,CAAC;AAE/D;;;;AAIG;AACH,SAAS,kBAAkB,CACvB,aAAqB,EACrB,IAAwB,EAAA;AAExB,IAAA,gBAAgB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AACvC,IAAA,gBAAgB,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAA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AAEG;IACH,UAAU,CAAC,OAAe,EAAE,aAAqB,EAAA;AAC7C,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,OAAO;AAC1B,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,aAAa,EAAE,aAAa;AAC/B,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,KAAK,CAAC,OAAe,EAAE,aAAqB,EAAA;AACxC,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACxB,YAAA,WAAW,EAAE,KAAK;AAClB,YAAA,aAAa,EAAE,aAAa;AAC/B,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,QAAQ,CAAC,OAAe,EAAE,aAAqB,EAAA;AAC3C,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACxB,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,aAAa,EAAE,aAAa;AAC/B,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,mBAAmB,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;KAC1C;AACJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/*
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -16,7 +16,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
16
16
|
resourceRequestUri: request.resourceRequestUri,
|
|
17
17
|
shrClaims: request.shrClaims,
|
|
18
18
|
sshKid: request.sshKid,
|
|
19
|
-
embeddedClientId: request.embeddedClientId || request.
|
|
19
|
+
embeddedClientId: request.embeddedClientId || request.extraParameters?.clientId,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestThumbprint.mjs","sources":["../../src/network/RequestThumbprint.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;SAwBa,oBAAoB,CAChC,QAAgB,EAChB,OAAwB,EACxB,aAAsB,EAAA;IAEtB,OAAO;AACH,QAAA,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;AACtB,QAAA,qBAAqB,EAAE,aAAa;QACpC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,gBAAgB,EACZ,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"RequestThumbprint.mjs","sources":["../../src/network/RequestThumbprint.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;SAwBa,oBAAoB,CAChC,QAAgB,EAChB,OAAwB,EACxB,aAAsB,EAAA;IAEtB,OAAO;AACH,QAAA,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;AACtB,QAAA,qBAAqB,EAAE,aAAa;QACpC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,gBAAgB,EACZ,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,eAAe,EAAE,QAAQ;KACpE,CAAC;AACN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThrottlingUtils.d.ts","sourceRoot":"","sources":["../../src/network/ThrottlingUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"ThrottlingUtils.d.ts","sourceRoot":"","sources":["../../src/network/ThrottlingUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAEH,iBAAiB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,gBAAgB;AAChB,qBAAa,eAAe;IACxB;;;OAGG;IACH,MAAM,CAAC,4BAA4B,CAAC,UAAU,EAAE,iBAAiB,GAAG,MAAM;IAI1E;;;;OAIG;IACH,MAAM,CAAC,UAAU,CACb,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,GACtB,IAAI;IAiBP;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CACd,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,EAC3D,aAAa,EAAE,MAAM,GACtB,IAAI;IAwBP;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,GAC5D,OAAO;IAOV;;;OAGG;IACH,MAAM,CAAC,0BAA0B,CAC7B,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,GAC5D,OAAO;IAYV;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAa1D,MAAM,CAAC,cAAc,CACjB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,qBAAqB,CAAC,EAAE,MAAM,GAC/B,IAAI;CASV"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import {
|
|
3
|
+
import { THROTTLING_PREFIX, HeaderNames, DEFAULT_THROTTLE_TIME_SECONDS, DEFAULT_MAX_THROTTLE_TIME_SECONDS } from '../utils/Constants.mjs';
|
|
4
4
|
import { ServerError } from '../error/ServerError.mjs';
|
|
5
5
|
import { getRequestThumbprint } from './RequestThumbprint.mjs';
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ class ThrottlingUtils {
|
|
|
15
15
|
* @param thumbprint
|
|
16
16
|
*/
|
|
17
17
|
static generateThrottlingStorageKey(thumbprint) {
|
|
18
|
-
return `${
|
|
18
|
+
return `${THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Performs necessary throttling checks before a network request.
|
|
@@ -24,13 +24,13 @@ class ThrottlingUtils {
|
|
|
24
24
|
*/
|
|
25
25
|
static preProcess(cacheManager, thumbprint, correlationId) {
|
|
26
26
|
const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint);
|
|
27
|
-
const value = cacheManager.getThrottlingCache(key);
|
|
27
|
+
const value = cacheManager.getThrottlingCache(key, correlationId);
|
|
28
28
|
if (value) {
|
|
29
29
|
if (value.throttleTime < Date.now()) {
|
|
30
30
|
cacheManager.removeItem(key, correlationId);
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
throw new ServerError(value.errorCodes?.join(" ") ||
|
|
33
|
+
throw new ServerError(value.errorCodes?.join(" ") || "", value.errorMessage, value.subError);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -79,8 +79,7 @@ class ThrottlingUtils {
|
|
|
79
79
|
const time = throttleTime <= 0 ? 0 : throttleTime;
|
|
80
80
|
const currentSeconds = Date.now() / 1000;
|
|
81
81
|
return Math.floor(Math.min(currentSeconds +
|
|
82
|
-
(time ||
|
|
83
|
-
ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000);
|
|
82
|
+
(time || DEFAULT_THROTTLE_TIME_SECONDS), currentSeconds + DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000);
|
|
84
83
|
}
|
|
85
84
|
static removeThrottle(cacheManager, clientId, request, homeAccountIdentifier) {
|
|
86
85
|
const thumbprint = getRequestThumbprint(clientId, request, homeAccountIdentifier);
|