@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
|
@@ -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
|
-
import { isOidcProtocolMode } from '../config/ClientConfiguration.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import { addClientId, addRedirectUri, addScopes, addGrantType, addClientInfo, addLibraryInfo, addApplicationTelemetry, addThrottling, addServerTelemetry, addRefreshToken, addClientSecret, addClientAssertion, addClientAssertionType, addPopToken, addSshJwk, addClaims, addCcsUpn, addCcsOid, addBrokerParameters, addExtraQueryParameters, instrumentBrokerParams } from '../request/RequestParameterBuilder.mjs';
|
|
3
|
+
import { buildClientConfiguration, isOidcProtocolMode } from '../config/ClientConfiguration.mjs';
|
|
4
|
+
import { addClientId, addRedirectUri, addScopes, addGrantType, addClientInfo, addLibraryInfo, addApplicationTelemetry, addThrottling, addServerTelemetry, addRefreshToken, addClientSecret, addClientAssertion, addClientAssertionType, addPopToken, addSshJwk, addClaims, addCcsUpn, addCcsOid, addBrokerParameters, addExtraParameters, instrumentBrokerParams } from '../request/RequestParameterBuilder.mjs';
|
|
6
5
|
import { mapToQueryString } from '../utils/UrlUtils.mjs';
|
|
7
|
-
import { AuthenticationScheme, HeaderNames,
|
|
6
|
+
import { AuthenticationScheme, HeaderNames, INVALID_GRANT_ERROR, CLIENT_MISMATCH_ERROR, GrantType } from '../utils/Constants.mjs';
|
|
8
7
|
import { CLIENT_ID } from '../constants/AADServerParamKeys.mjs';
|
|
9
8
|
import { ResponseHandler } from '../response/ResponseHandler.mjs';
|
|
10
9
|
import { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs';
|
|
@@ -17,10 +16,13 @@ import { UrlString } from '../url/UrlString.mjs';
|
|
|
17
16
|
import { CcsCredentialType } from '../account/CcsCredential.mjs';
|
|
18
17
|
import { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs';
|
|
19
18
|
import { createInteractionRequiredAuthError, InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.mjs';
|
|
20
|
-
import {
|
|
19
|
+
import { RefreshTokenClientAcquireTokenWithCachedRefreshToken, RefreshTokenClientAcquireToken, RefreshTokenClientExecuteTokenRequest, HandleServerTokenResponse, CacheManagerGetRefreshToken, RefreshTokenClientCreateTokenRequestBody, RefreshTokenClientExecutePostToTokenEndpoint, PopTokenGenerateCnf } from '../telemetry/performance/PerformanceEvents.mjs';
|
|
21
20
|
import { invokeAsync, invoke } from '../utils/FunctionWrappers.mjs';
|
|
22
21
|
import { getClientAssertion } from '../utils/ClientAssertionUtils.mjs';
|
|
23
22
|
import { getRequestThumbprint } from '../network/RequestThumbprint.mjs';
|
|
23
|
+
import { createTokenQueryParameters, createTokenRequestHeaders, executePostToTokenEndpoint } from '../protocol/Token.mjs';
|
|
24
|
+
import { Logger } from '../logger/Logger.mjs';
|
|
25
|
+
import { name, version } from '../packageMetadata.mjs';
|
|
24
26
|
import { badToken, noTokensFound, refreshTokenExpired } from '../error/InteractionRequiredAuthErrorCodes.mjs';
|
|
25
27
|
import { tokenRequestEmpty, missingSshJwk } from '../error/ClientConfigurationErrorCodes.mjs';
|
|
26
28
|
import { noAccountInSilentRequest } from '../error/ClientAuthErrorCodes.mjs';
|
|
@@ -34,19 +36,33 @@ const DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes
|
|
|
34
36
|
* OAuth2.0 refresh token client
|
|
35
37
|
* @internal
|
|
36
38
|
*/
|
|
37
|
-
class RefreshTokenClient
|
|
39
|
+
class RefreshTokenClient {
|
|
38
40
|
constructor(configuration, performanceClient) {
|
|
39
|
-
|
|
41
|
+
// Set the configuration
|
|
42
|
+
this.config = buildClientConfiguration(configuration);
|
|
43
|
+
// Initialize the logger
|
|
44
|
+
this.logger = new Logger(this.config.loggerOptions, name, version);
|
|
45
|
+
// Initialize crypto
|
|
46
|
+
this.cryptoUtils = this.config.cryptoInterface;
|
|
47
|
+
// Initialize storage interface
|
|
48
|
+
this.cacheManager = this.config.storageInterface;
|
|
49
|
+
// Set the network interface
|
|
50
|
+
this.networkClient = this.config.networkInterface;
|
|
51
|
+
// Set TelemetryManager
|
|
52
|
+
this.serverTelemetryManager = this.config.serverTelemetryManager;
|
|
53
|
+
// set Authority
|
|
54
|
+
this.authority = this.config.authOptions.authority;
|
|
55
|
+
// set performance telemetry client
|
|
56
|
+
this.performanceClient = performanceClient;
|
|
40
57
|
}
|
|
41
58
|
async acquireToken(request) {
|
|
42
|
-
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
43
59
|
const reqTimestamp = nowSeconds();
|
|
44
|
-
const response = await invokeAsync(this.executeTokenRequest.bind(this),
|
|
60
|
+
const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
45
61
|
// Retrieve requestId from response headers
|
|
46
62
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
47
|
-
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
48
|
-
responseHandler.validateTokenResponse(response.body);
|
|
49
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler),
|
|
63
|
+
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
|
|
64
|
+
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
65
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
|
|
50
66
|
}
|
|
51
67
|
/**
|
|
52
68
|
* Gets cached refresh token and attaches to request, then calls acquireToken API
|
|
@@ -57,28 +73,27 @@ class RefreshTokenClient extends BaseClient {
|
|
|
57
73
|
if (!request) {
|
|
58
74
|
throw createClientConfigurationError(tokenRequestEmpty);
|
|
59
75
|
}
|
|
60
|
-
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, request.correlationId);
|
|
61
76
|
// We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases
|
|
62
77
|
if (!request.account) {
|
|
63
78
|
throw createClientAuthError(noAccountInSilentRequest);
|
|
64
79
|
}
|
|
65
80
|
// try checking if FOCI is enabled for the given application
|
|
66
|
-
const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment);
|
|
81
|
+
const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment, request.correlationId);
|
|
67
82
|
// if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
|
|
68
83
|
if (isFOCI) {
|
|
69
84
|
try {
|
|
70
|
-
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this),
|
|
85
|
+
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
|
|
71
86
|
}
|
|
72
87
|
catch (e) {
|
|
73
88
|
const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
|
|
74
89
|
e.errorCode ===
|
|
75
90
|
noTokensFound;
|
|
76
91
|
const clientMismatchErrorWithFamilyRT = e instanceof ServerError &&
|
|
77
|
-
e.errorCode ===
|
|
78
|
-
e.subError ===
|
|
92
|
+
e.errorCode === INVALID_GRANT_ERROR &&
|
|
93
|
+
e.subError === CLIENT_MISMATCH_ERROR;
|
|
79
94
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
80
95
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
81
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this),
|
|
96
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
82
97
|
// throw in all other cases
|
|
83
98
|
}
|
|
84
99
|
else {
|
|
@@ -87,16 +102,15 @@ class RefreshTokenClient extends BaseClient {
|
|
|
87
102
|
}
|
|
88
103
|
}
|
|
89
104
|
// fall back to application refresh token acquisition
|
|
90
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this),
|
|
105
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
91
106
|
}
|
|
92
107
|
/**
|
|
93
108
|
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
|
|
94
109
|
* @param request
|
|
95
110
|
*/
|
|
96
111
|
async acquireTokenWithCachedRefreshToken(request, foci) {
|
|
97
|
-
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
98
112
|
// fetches family RT or application RT based on FOCI value
|
|
99
|
-
const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager),
|
|
113
|
+
const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined);
|
|
100
114
|
if (!refreshToken) {
|
|
101
115
|
throw createInteractionRequiredAuthError(noTokensFound);
|
|
102
116
|
}
|
|
@@ -110,21 +124,22 @@ class RefreshTokenClient extends BaseClient {
|
|
|
110
124
|
const refreshTokenRequest = {
|
|
111
125
|
...request,
|
|
112
126
|
refreshToken: refreshToken.secret,
|
|
113
|
-
authenticationScheme: request.authenticationScheme ||
|
|
127
|
+
authenticationScheme: request.authenticationScheme ||
|
|
128
|
+
AuthenticationScheme.BEARER,
|
|
114
129
|
ccsCredential: {
|
|
115
130
|
credential: request.account.homeAccountId,
|
|
116
131
|
type: CcsCredentialType.HOME_ACCOUNT_ID,
|
|
117
132
|
},
|
|
118
133
|
};
|
|
119
134
|
try {
|
|
120
|
-
return await invokeAsync(this.acquireToken.bind(this),
|
|
135
|
+
return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
|
|
121
136
|
}
|
|
122
137
|
catch (e) {
|
|
123
138
|
if (e instanceof InteractionRequiredAuthError) {
|
|
124
139
|
this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
|
|
125
140
|
if (e.subError === badToken) {
|
|
126
141
|
// Remove bad refresh token from cache
|
|
127
|
-
this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
142
|
+
this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache", request.correlationId);
|
|
128
143
|
const badRefreshTokenKey = this.cacheManager.generateCredentialKey(refreshToken);
|
|
129
144
|
this.cacheManager.removeRefreshToken(badRefreshTokenKey, request.correlationId);
|
|
130
145
|
}
|
|
@@ -138,23 +153,21 @@ class RefreshTokenClient extends BaseClient {
|
|
|
138
153
|
* @param authority
|
|
139
154
|
*/
|
|
140
155
|
async executeTokenRequest(request, authority) {
|
|
141
|
-
this.
|
|
142
|
-
const queryParametersString = this.createTokenQueryParameters(request);
|
|
156
|
+
const queryParametersString = createTokenQueryParameters(request, this.config.authOptions.clientId, this.config.authOptions.redirectUri, this.performanceClient);
|
|
143
157
|
const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);
|
|
144
|
-
const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this),
|
|
145
|
-
const headers = this.
|
|
158
|
+
const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request);
|
|
159
|
+
const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, request.ccsCredential);
|
|
146
160
|
const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
|
|
147
|
-
return invokeAsync(
|
|
161
|
+
return invokeAsync(executePostToTokenEndpoint, RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, this.cacheManager, this.networkClient, this.logger, this.performanceClient, this.serverTelemetryManager);
|
|
148
162
|
}
|
|
149
163
|
/**
|
|
150
164
|
* Helper function to create the token request body
|
|
151
165
|
* @param request
|
|
152
166
|
*/
|
|
153
167
|
async createTokenRequestBody(request) {
|
|
154
|
-
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId);
|
|
155
168
|
const parameters = new Map();
|
|
156
169
|
addClientId(parameters, request.embeddedClientId ||
|
|
157
|
-
request.
|
|
170
|
+
request.extraParameters?.[CLIENT_ID] ||
|
|
158
171
|
this.config.authOptions.clientId);
|
|
159
172
|
if (request.redirectUri) {
|
|
160
173
|
addRedirectUri(parameters, request.redirectUri);
|
|
@@ -181,7 +194,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
181
194
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
182
195
|
let reqCnfData;
|
|
183
196
|
if (!request.popKid) {
|
|
184
|
-
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator),
|
|
197
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
185
198
|
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
186
199
|
}
|
|
187
200
|
else {
|
|
@@ -212,8 +225,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
212
225
|
addCcsOid(parameters, clientInfo);
|
|
213
226
|
}
|
|
214
227
|
catch (e) {
|
|
215
|
-
this.logger.verbose(
|
|
216
|
-
e);
|
|
228
|
+
this.logger.verbose(`Could not parse home account ID for CCS Header: '${e}'`, request.correlationId);
|
|
217
229
|
}
|
|
218
230
|
break;
|
|
219
231
|
case CcsCredentialType.UPN:
|
|
@@ -224,8 +236,10 @@ class RefreshTokenClient extends BaseClient {
|
|
|
224
236
|
if (request.embeddedClientId) {
|
|
225
237
|
addBrokerParameters(parameters, this.config.authOptions.clientId, this.config.authOptions.redirectUri);
|
|
226
238
|
}
|
|
227
|
-
if (request.
|
|
228
|
-
|
|
239
|
+
if (request.extraParameters) {
|
|
240
|
+
addExtraParameters(parameters, {
|
|
241
|
+
...request.extraParameters,
|
|
242
|
+
});
|
|
229
243
|
}
|
|
230
244
|
instrumentBrokerParams(parameters, request.correlationId, this.performanceClient);
|
|
231
245
|
return mapToQueryString(parameters);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshTokenClient.mjs","sources":["../../src/client/RefreshTokenClient.ts"],"sourcesContent":[null],"names":["TimeUtils.nowSeconds","ClientConfigurationErrorCodes.tokenRequestEmpty","ClientAuthErrorCodes.noAccountInSilentRequest","InteractionRequiredAuthErrorCodes.noTokensFound","TimeUtils.isTokenExpired","InteractionRequiredAuthErrorCodes.refreshTokenExpired","InteractionRequiredAuthErrorCodes.badToken","RequestParameterBuilder.addClientId","AADServerParamKeys.CLIENT_ID","RequestParameterBuilder.addRedirectUri","RequestParameterBuilder.addScopes","RequestParameterBuilder.addGrantType","RequestParameterBuilder.addClientInfo","RequestParameterBuilder.addLibraryInfo","RequestParameterBuilder.addApplicationTelemetry","RequestParameterBuilder.addThrottling","RequestParameterBuilder.addServerTelemetry","RequestParameterBuilder.addRefreshToken","RequestParameterBuilder.addClientSecret","RequestParameterBuilder.addClientAssertion","RequestParameterBuilder.addClientAssertionType","RequestParameterBuilder.addPopToken","RequestParameterBuilder.addSshJwk","ClientConfigurationErrorCodes.missingSshJwk","RequestParameterBuilder.addClaims","RequestParameterBuilder.addCcsOid","RequestParameterBuilder.addCcsUpn","RequestParameterBuilder.addBrokerParameters","RequestParameterBuilder.addExtraQueryParameters","RequestParameterBuilder.instrumentBrokerParams","UrlUtils.mapToQueryString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAkDH,MAAM,+CAA+C,GAAG,GAAG,CAAC;AAE5D;;;AAGG;AACG,MAAO,kBAAmB,SAAQ,UAAU,CAAA;IAC9C,WACI,CAAA,aAAkC,EAClC,iBAAsC,EAAA;AAEtC,QAAA,KAAK,CAAC,aA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AAC,gBAAgB,EAAE;YAC1BC,mBAA2C,CACvC,UAAU,EACV,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CACtC,CAAC;AACL,SAAA;QAED,IAAI,OAAO,CAAC,mBAAmB,EAAE;YAC7BC,uBAA+C,CAC3C,UAAU,EACV,OAAO,CAAC,mBAAmB,CAC9B,CAAC;AACL,SAAA;AAED,QAAAC,sBAA8C,CAC1C,UAAU,EACV,OAAO,CAAC,aAAa,EACrB,IAAI,CAAC,iBAAiB,CACzB,CAAC;AACF,QAAA,OAAOC,gBAAyB,CAAC,UAAU,CAAC,CAAC;KAChD;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"RefreshTokenClient.mjs","sources":["../../src/client/RefreshTokenClient.ts"],"sourcesContent":[null],"names":["TimeUtils.nowSeconds","PerformanceEvents.RefreshTokenClientExecuteTokenRequest","Constants.HeaderNames","PerformanceEvents.HandleServerTokenResponse","ClientConfigurationErrorCodes.tokenRequestEmpty","ClientAuthErrorCodes.noAccountInSilentRequest","PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken","InteractionRequiredAuthErrorCodes.noTokensFound","Constants.INVALID_GRANT_ERROR","Constants.CLIENT_MISMATCH_ERROR","PerformanceEvents.CacheManagerGetRefreshToken","TimeUtils.isTokenExpired","InteractionRequiredAuthErrorCodes.refreshTokenExpired","Constants.AuthenticationScheme","PerformanceEvents.RefreshTokenClientAcquireToken","InteractionRequiredAuthErrorCodes.badToken","PerformanceEvents.RefreshTokenClientCreateTokenRequestBody","PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint","RequestParameterBuilder.addClientId","AADServerParamKeys.CLIENT_ID","RequestParameterBuilder.addRedirectUri","RequestParameterBuilder.addScopes","RequestParameterBuilder.addGrantType","Constants.GrantType","RequestParameterBuilder.addClientInfo","RequestParameterBuilder.addLibraryInfo","RequestParameterBuilder.addApplicationTelemetry","RequestParameterBuilder.addThrottling","RequestParameterBuilder.addServerTelemetry","RequestParameterBuilder.addRefreshToken","RequestParameterBuilder.addClientSecret","RequestParameterBuilder.addClientAssertion","RequestParameterBuilder.addClientAssertionType","PerformanceEvents.PopTokenGenerateCnf","RequestParameterBuilder.addPopToken","RequestParameterBuilder.addSshJwk","ClientConfigurationErrorCodes.missingSshJwk","RequestParameterBuilder.addClaims","RequestParameterBuilder.addCcsOid","RequestParameterBuilder.addCcsUpn","RequestParameterBuilder.addBrokerParameters","RequestParameterBuilder.addExtraParameters","RequestParameterBuilder.instrumentBrokerParams","UrlUtils.mapToQueryString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAyDH,MAAM,+CAA+C,GAAG,GAAG,CAAC;AAE5D;;;AAGG;MACU,kBAAkB,CAAA;IAyB3B,WACI,CAAA,aAAkC,EAClC,iBAAqC,EAAA;;AAGrC,QAAA,IAAI,CAAC,MAAM,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;;AAGtD,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAGnE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;;QAG/C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAGjD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAGlD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC;;QAGjE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC;;AAGnD,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;KAC9C;IACM,MAAM,YAAY,CACrB,OAAkC,EAAA;AAElC,QAAA,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
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ClientConfiguration } from "../config/ClientConfiguration.js";
|
|
1
|
+
import { ClientConfiguration, CommonClientConfiguration } from "../config/ClientConfiguration.js";
|
|
3
2
|
import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js";
|
|
4
3
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
5
4
|
import { CacheOutcome } from "../utils/Constants.js";
|
|
6
5
|
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
|
|
6
|
+
import { Authority } from "../authority/Authority.js";
|
|
7
|
+
import { Logger } from "../logger/Logger.js";
|
|
8
|
+
import { ICrypto } from "../crypto/ICrypto.js";
|
|
9
|
+
import { CacheManager } from "../cache/CacheManager.js";
|
|
10
|
+
import { INetworkModule } from "../network/INetworkModule.js";
|
|
11
|
+
import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
|
|
7
12
|
/** @internal */
|
|
8
|
-
export declare class SilentFlowClient
|
|
9
|
-
|
|
13
|
+
export declare class SilentFlowClient {
|
|
14
|
+
logger: Logger;
|
|
15
|
+
protected config: CommonClientConfiguration;
|
|
16
|
+
protected cryptoUtils: ICrypto;
|
|
17
|
+
protected cacheManager: CacheManager;
|
|
18
|
+
protected networkClient: INetworkModule;
|
|
19
|
+
protected serverTelemetryManager: ServerTelemetryManager | null;
|
|
20
|
+
authority: Authority;
|
|
21
|
+
protected performanceClient: IPerformanceClient;
|
|
22
|
+
constructor(configuration: ClientConfiguration, performanceClient: IPerformanceClient);
|
|
10
23
|
/**
|
|
11
24
|
* Retrieves token from cache or throws an error if it must be refreshed.
|
|
12
25
|
* @param request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SilentFlowClient.d.ts","sourceRoot":"","sources":["../../src/client/SilentFlowClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SilentFlowClient.d.ts","sourceRoot":"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ACW,6BAA6B;CAkC9C"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import {
|
|
3
|
+
import { buildClientConfiguration } from '../config/ClientConfiguration.mjs';
|
|
4
4
|
import { wasClockTurnedBack, isTokenExpired } from '../utils/TimeUtils.mjs';
|
|
5
5
|
import { createClientAuthError } from '../error/ClientAuthError.mjs';
|
|
6
6
|
import { ResponseHandler } from '../response/ResponseHandler.mjs';
|
|
7
7
|
import { CacheOutcome } from '../utils/Constants.mjs';
|
|
8
8
|
import { StringUtils } from '../utils/StringUtils.mjs';
|
|
9
9
|
import { extractTokenClaims, checkMaxAge } from '../account/AuthToken.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { SilentFlowClientGenerateResultFromCacheRecord } from '../telemetry/performance/PerformanceEvents.mjs';
|
|
11
11
|
import { invokeAsync } from '../utils/FunctionWrappers.mjs';
|
|
12
12
|
import { getTenantFromAuthorityString } from '../authority/Authority.mjs';
|
|
13
|
+
import { Logger } from '../logger/Logger.mjs';
|
|
14
|
+
import { name, version } from '../packageMetadata.mjs';
|
|
13
15
|
import { tokenRefreshRequired, noAccountInSilentRequest, authTimeNotFound } from '../error/ClientAuthErrorCodes.mjs';
|
|
14
16
|
|
|
15
17
|
/*
|
|
@@ -17,20 +19,32 @@ import { tokenRefreshRequired, noAccountInSilentRequest, authTimeNotFound } from
|
|
|
17
19
|
* Licensed under the MIT License.
|
|
18
20
|
*/
|
|
19
21
|
/** @internal */
|
|
20
|
-
class SilentFlowClient
|
|
22
|
+
class SilentFlowClient {
|
|
21
23
|
constructor(configuration, performanceClient) {
|
|
22
|
-
|
|
24
|
+
// Set the configuration
|
|
25
|
+
this.config = buildClientConfiguration(configuration);
|
|
26
|
+
// Initialize the logger
|
|
27
|
+
this.logger = new Logger(this.config.loggerOptions, name, version);
|
|
28
|
+
// Initialize crypto
|
|
29
|
+
this.cryptoUtils = this.config.cryptoInterface;
|
|
30
|
+
// Initialize storage interface
|
|
31
|
+
this.cacheManager = this.config.storageInterface;
|
|
32
|
+
// Set the network interface
|
|
33
|
+
this.networkClient = this.config.networkInterface;
|
|
34
|
+
// Set TelemetryManager
|
|
35
|
+
this.serverTelemetryManager = this.config.serverTelemetryManager;
|
|
36
|
+
// set Authority
|
|
37
|
+
this.authority = this.config.authOptions.authority;
|
|
38
|
+
// set performance telemetry client
|
|
39
|
+
this.performanceClient = performanceClient;
|
|
23
40
|
}
|
|
24
41
|
/**
|
|
25
42
|
* Retrieves token from cache or throws an error if it must be refreshed.
|
|
26
43
|
* @param request
|
|
27
44
|
*/
|
|
28
45
|
async acquireCachedToken(request) {
|
|
29
|
-
this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId);
|
|
30
46
|
let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE;
|
|
31
|
-
if (request.forceRefresh ||
|
|
32
|
-
(!this.config.cacheOptions.claimsBasedCachingEnabled &&
|
|
33
|
-
!StringUtils.isEmptyObj(request.claims))) {
|
|
47
|
+
if (request.forceRefresh || !StringUtils.isEmptyObj(request.claims)) {
|
|
34
48
|
// Must refresh due to present force_refresh flag.
|
|
35
49
|
this.setCacheOutcome(CacheOutcome.FORCE_REFRESH_OR_CLAIMS, request.correlationId);
|
|
36
50
|
throw createClientAuthError(tokenRefreshRequired);
|
|
@@ -64,16 +78,16 @@ class SilentFlowClient extends BaseClient {
|
|
|
64
78
|
const cacheRecord = {
|
|
65
79
|
account: this.cacheManager.getAccount(this.cacheManager.generateAccountKey(request.account), request.correlationId),
|
|
66
80
|
accessToken: cachedAccessToken,
|
|
67
|
-
idToken: this.cacheManager.getIdToken(request.account, request.correlationId, tokenKeys, requestTenantId
|
|
81
|
+
idToken: this.cacheManager.getIdToken(request.account, request.correlationId, tokenKeys, requestTenantId),
|
|
68
82
|
refreshToken: null,
|
|
69
|
-
appMetadata: this.cacheManager.readAppMetadataFromCache(environment),
|
|
83
|
+
appMetadata: this.cacheManager.readAppMetadataFromCache(environment, request.correlationId),
|
|
70
84
|
};
|
|
71
85
|
this.setCacheOutcome(lastCacheOutcome, request.correlationId);
|
|
72
86
|
if (this.config.serverTelemetryManager) {
|
|
73
87
|
this.config.serverTelemetryManager.incrementCacheHits();
|
|
74
88
|
}
|
|
75
89
|
return [
|
|
76
|
-
await invokeAsync(this.generateResultFromCacheRecord.bind(this),
|
|
90
|
+
await invokeAsync(this.generateResultFromCacheRecord.bind(this), SilentFlowClientGenerateResultFromCacheRecord, this.logger, this.performanceClient, request.correlationId)(cacheRecord, request),
|
|
77
91
|
lastCacheOutcome,
|
|
78
92
|
];
|
|
79
93
|
}
|
|
@@ -83,7 +97,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
83
97
|
cacheOutcome: cacheOutcome,
|
|
84
98
|
}, correlationId);
|
|
85
99
|
if (cacheOutcome !== CacheOutcome.NOT_APPLICABLE) {
|
|
86
|
-
this.logger.info(`Token refresh is required due to cache outcome: ${cacheOutcome}
|
|
100
|
+
this.logger.info(`Token refresh is required due to cache outcome: '${cacheOutcome}'`, correlationId);
|
|
87
101
|
}
|
|
88
102
|
}
|
|
89
103
|
/**
|
|
@@ -91,7 +105,6 @@ class SilentFlowClient extends BaseClient {
|
|
|
91
105
|
* @param cacheRecord
|
|
92
106
|
*/
|
|
93
107
|
async generateResultFromCacheRecord(cacheRecord, request) {
|
|
94
|
-
this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId);
|
|
95
108
|
let idTokenClaims;
|
|
96
109
|
if (cacheRecord.idToken) {
|
|
97
110
|
idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, this.config.cryptoInterface.base64Decode);
|
|
@@ -104,7 +117,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
104
117
|
}
|
|
105
118
|
checkMaxAge(authTime, request.maxAge);
|
|
106
119
|
}
|
|
107
|
-
return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, idTokenClaims);
|
|
120
|
+
return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, this.performanceClient, idTokenClaims);
|
|
108
121
|
}
|
|
109
122
|
}
|
|
110
123
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SilentFlowClient.mjs","sources":["../../src/client/SilentFlowClient.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.tokenRefreshRequired","ClientAuthErrorCodes.noAccountInSilentRequest","TimeUtils.wasClockTurnedBack","TimeUtils.isTokenExpired","ClientAuthErrorCodes.authTimeNotFound"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SilentFlowClient.mjs","sources":["../../src/client/SilentFlowClient.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.tokenRefreshRequired","ClientAuthErrorCodes.noAccountInSilentRequest","TimeUtils.wasClockTurnedBack","TimeUtils.isTokenExpired","PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord","ClientAuthErrorCodes.authTimeNotFound"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;AAGG;AAkCH;MACa,gBAAgB,CAAA;IAyBzB,WACI,CAAA,aAAkC,EAClC,iBAAqC,EAAA;;AAGrC,QAAA,IAAI,CAAC,MAAM,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;;AAGtD,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAGnE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;;QAG/C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAGjD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAGl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,CAAC,CAAC;AACzC,SAAA;QAED,OAAO,eAAe,CAAC,4BAA4B,CAC/C,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,SAAS,EACd,WAAW,EACX,IAAI,EACJ,OAAO,EACP,IAAI,CAAC,iBAAiB,EACtB,aAAa,CAChB,CAAC;KACL;AACJ;;;;"}
|
|
@@ -27,7 +27,6 @@ export type ClientConfiguration = {
|
|
|
27
27
|
authOptions: AuthOptions;
|
|
28
28
|
systemOptions?: SystemOptions;
|
|
29
29
|
loggerOptions?: LoggerOptions;
|
|
30
|
-
cacheOptions?: CacheOptions;
|
|
31
30
|
storageInterface?: CacheManager;
|
|
32
31
|
networkInterface?: INetworkModule;
|
|
33
32
|
cryptoInterface?: ICrypto;
|
|
@@ -42,7 +41,6 @@ export type CommonClientConfiguration = {
|
|
|
42
41
|
authOptions: Required<AuthOptions>;
|
|
43
42
|
systemOptions: Required<SystemOptions>;
|
|
44
43
|
loggerOptions: Required<LoggerOptions>;
|
|
45
|
-
cacheOptions: Required<CacheOptions>;
|
|
46
44
|
storageInterface: CacheManager;
|
|
47
45
|
networkInterface: INetworkModule;
|
|
48
46
|
cryptoInterface: Required<ICrypto>;
|
|
@@ -61,11 +59,8 @@ export type CommonClientConfiguration = {
|
|
|
61
59
|
* - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.
|
|
62
60
|
* - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.
|
|
63
61
|
* - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
|
|
64
|
-
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
|
|
65
|
-
* - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
|
|
66
62
|
* - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from.
|
|
67
63
|
* - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
|
|
68
|
-
* - encodeExtraQueryParams - A flag to choose whether to encode the extra query parameters or not. Defaults to false.
|
|
69
64
|
* @internal
|
|
70
65
|
*/
|
|
71
66
|
export type AuthOptions = {
|
|
@@ -74,17 +69,13 @@ export type AuthOptions = {
|
|
|
74
69
|
redirectUri: string;
|
|
75
70
|
clientCapabilities?: Array<string>;
|
|
76
71
|
azureCloudOptions?: AzureCloudOptions;
|
|
77
|
-
skipAuthorityMetadataCache?: boolean;
|
|
78
72
|
instanceAware?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated This flag is deprecated and will be removed in the next major version where all extra query params will be encoded by default.
|
|
81
|
-
*/
|
|
82
|
-
encodeExtraQueryParams?: boolean;
|
|
83
73
|
};
|
|
84
74
|
/**
|
|
85
75
|
* Use this to configure token renewal info in the Configuration object
|
|
86
76
|
*
|
|
87
77
|
* - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry
|
|
78
|
+
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
|
|
88
79
|
*/
|
|
89
80
|
export type SystemOptions = {
|
|
90
81
|
tokenRenewalOffsetSeconds?: number;
|
|
@@ -104,17 +95,6 @@ export type LoggerOptions = {
|
|
|
104
95
|
logLevel?: LogLevel;
|
|
105
96
|
correlationId?: string;
|
|
106
97
|
};
|
|
107
|
-
/**
|
|
108
|
-
* Use this to configure credential cache preferences in the ClientConfiguration object
|
|
109
|
-
*
|
|
110
|
-
* - claimsBasedCachingEnabled - Sets whether tokens should be cached based on the claims hash. Default is false.
|
|
111
|
-
*/
|
|
112
|
-
export type CacheOptions = {
|
|
113
|
-
/**
|
|
114
|
-
* @deprecated claimsBasedCachingEnabled is deprecated and will be removed in the next major version.
|
|
115
|
-
*/
|
|
116
|
-
claimsBasedCachingEnabled?: boolean;
|
|
117
|
-
};
|
|
118
98
|
/**
|
|
119
99
|
* Library-specific options
|
|
120
100
|
*/
|
|
@@ -154,7 +134,7 @@ export declare const DEFAULT_SYSTEM_OPTIONS: Required<SystemOptions>;
|
|
|
154
134
|
*
|
|
155
135
|
* @returns Configuration
|
|
156
136
|
*/
|
|
157
|
-
export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption,
|
|
137
|
+
export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }: ClientConfiguration): CommonClientConfiguration;
|
|
158
138
|
/**
|
|
159
139
|
* Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise
|
|
160
140
|
* @param ClientConfiguration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAiC,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAU,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAiC,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAU,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAOxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAuB,MAAM,0BAA0B,CAAC;AAC7E,O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tB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,aAAa,CAG1D,CAAC;AA4CF;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAE,gBAAgB,EAC/B,gBAAgB,EAAE,qBAAqB,EACvC,gBAAgB,EAAE,qBAAqB,EACvC,eAAe,EAAE,oBAAoB,EACrC,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,GACvC,EAAE,mBAAmB,GAAG,yBAAyB,CA4BjD;AAeD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAIvE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.mjs';
|
|
4
4
|
import { LogLevel, Logger } from '../logger/Logger.mjs';
|
|
5
|
-
import { DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
|
|
5
|
+
import { DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, SKU, DEFAULT_COMMON_TENANT } from '../utils/Constants.mjs';
|
|
6
6
|
import { version } from '../packageMetadata.mjs';
|
|
7
7
|
import { AzureCloudInstance } from '../authority/AuthorityOptions.mjs';
|
|
8
8
|
import { DefaultStorageClass } from '../cache/CacheManager.mjs';
|
|
@@ -25,10 +25,7 @@ const DEFAULT_LOGGER_IMPLEMENTATION = {
|
|
|
25
25
|
},
|
|
26
26
|
piiLoggingEnabled: false,
|
|
27
27
|
logLevel: LogLevel.Info,
|
|
28
|
-
correlationId:
|
|
29
|
-
};
|
|
30
|
-
const DEFAULT_CACHE_OPTIONS = {
|
|
31
|
-
claimsBasedCachingEnabled: false,
|
|
28
|
+
correlationId: "",
|
|
32
29
|
};
|
|
33
30
|
const DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
34
31
|
async sendGetRequestAsync() {
|
|
@@ -39,18 +36,18 @@ const DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
|
39
36
|
},
|
|
40
37
|
};
|
|
41
38
|
const DEFAULT_LIBRARY_INFO = {
|
|
42
|
-
sku:
|
|
39
|
+
sku: SKU,
|
|
43
40
|
version: version,
|
|
44
|
-
cpu:
|
|
45
|
-
os:
|
|
41
|
+
cpu: "",
|
|
42
|
+
os: "",
|
|
46
43
|
};
|
|
47
44
|
const DEFAULT_CLIENT_CREDENTIALS = {
|
|
48
|
-
clientSecret:
|
|
45
|
+
clientSecret: "",
|
|
49
46
|
clientAssertion: undefined,
|
|
50
47
|
};
|
|
51
48
|
const DEFAULT_AZURE_CLOUD_OPTIONS = {
|
|
52
49
|
azureCloudInstance: AzureCloudInstance.None,
|
|
53
|
-
tenant: `${
|
|
50
|
+
tenant: `${DEFAULT_COMMON_TENANT}`,
|
|
54
51
|
};
|
|
55
52
|
const DEFAULT_TELEMETRY_OPTIONS = {
|
|
56
53
|
application: {
|
|
@@ -65,7 +62,7 @@ const DEFAULT_TELEMETRY_OPTIONS = {
|
|
|
65
62
|
*
|
|
66
63
|
* @returns Configuration
|
|
67
64
|
*/
|
|
68
|
-
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption,
|
|
65
|
+
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
|
|
69
66
|
const loggerOptions = {
|
|
70
67
|
...DEFAULT_LOGGER_IMPLEMENTATION,
|
|
71
68
|
...userLoggerOption,
|
|
@@ -74,7 +71,6 @@ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions:
|
|
|
74
71
|
authOptions: buildAuthOptions(userAuthOptions),
|
|
75
72
|
systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },
|
|
76
73
|
loggerOptions: loggerOptions,
|
|
77
|
-
cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions },
|
|
78
74
|
storageInterface: storageImplementation ||
|
|
79
75
|
new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions), new StubPerformanceClient()),
|
|
80
76
|
networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
|
|
@@ -95,9 +91,7 @@ function buildAuthOptions(authOptions) {
|
|
|
95
91
|
return {
|
|
96
92
|
clientCapabilities: [],
|
|
97
93
|
azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
|
|
98
|
-
skipAuthorityMetadataCache: false,
|
|
99
94
|
instanceAware: false,
|
|
100
|
-
encodeExtraQueryParams: false,
|
|
101
95
|
...authOptions,
|
|
102
96
|
};
|
|
103
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfiguration.mjs","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;
|
|
1
|
+
{"version":3,"file":"ClientConfiguration.mjs","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAwJU,MAAA,sBAAsB,GAA4B;AAC3D,IAAA,yBAAyB,EAAE,gCAAgC;AAC3D,IAAA,oBAAoB,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