@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThrottlingUtils.mjs","sources":["../../src/network/ThrottlingUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;
|
|
1
|
+
{"version":3,"file":"ThrottlingUtils.mjs","sources":["../../src/network/ThrottlingUtils.ts"],"sourcesContent":[null],"names":["Constants.THROTTLING_PREFIX","Constants.HeaderNames","Constants.DEFAULT_THROTTLE_TIME_SECONDS","Constants.DEFAULT_MAX_THROTTLE_TIME_SECONDS"],"mappings":";;;;;;AAAA;;;AAGG;AAcH;MACa,eA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AE9B,MAAM,UAAU,GAAG,oBAAoB,CACnC,QAAQ,EACR,OAAO,EACP,qBAAqB,CACxB,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC1D,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;KACvD;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,uBAAuB,CAAC;AACzC,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,uBAAuB,CAAC;AACzC,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
|
package/dist/packageMetadata.mjs
CHANGED
|
@@ -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
|
/* eslint-disable header/header */
|
|
4
4
|
const name = "@azure/msal-common";
|
|
5
|
-
const version = "
|
|
5
|
+
const version = "16.0.0-beta.0";
|
|
6
6
|
|
|
7
7
|
export { name, version };
|
|
8
8
|
//# sourceMappingURL=packageMetadata.mjs.map
|
|
@@ -5,7 +5,6 @@ import { Logger } from "../logger/Logger.js";
|
|
|
5
5
|
import { Authority } from "../authority/Authority.js";
|
|
6
6
|
import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js";
|
|
7
7
|
import { AuthorizeResponse } from "../response/AuthorizeResponse.js";
|
|
8
|
-
import { StringDict } from "../utils/MsalTypes.js";
|
|
9
8
|
/**
|
|
10
9
|
* Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR
|
|
11
10
|
* @param config
|
|
@@ -21,7 +20,7 @@ export declare function getStandardAuthorizeRequestParameters(authOptions: AuthO
|
|
|
21
20
|
* @param requestParameters
|
|
22
21
|
* @returns
|
|
23
22
|
*/
|
|
24
|
-
export declare function getAuthorizeUrl(authority: Authority, requestParameters: Map<string, string
|
|
23
|
+
export declare function getAuthorizeUrl(authority: Authority, requestParameters: Map<string, string>): string;
|
|
25
24
|
/**
|
|
26
25
|
* Handles the hash fragment response from public client code request. Returns a code response used by
|
|
27
26
|
* the client to exchange for a token in acquireToken.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAWrE;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CACjD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,kBAAkB,GACvC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAiOrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,MAAM,CAMR;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,YAAY,EAAE,iBAAiB,EAC/B,WAAW,EAAE,MAAM,GACpB,wBAAwB,CAY1B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CACzC,cAAc,EAAE,iBAAiB,EACjC,YAAY,EAAE,MAAM,GACrB,IAAI,CAuEN"}
|
|
@@ -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
|
import { addClientId, addScopes, addRedirectUri, addCorrelationId, addResponseMode, addClientInfo, addPrompt, addDomainHint, addSid, addLoginHint, addCcsOid, addCcsUpn, addNonce, addState, addClaims, addBrokerParameters, addInstanceAware } from '../request/RequestParameterBuilder.mjs';
|
|
4
4
|
import { INSTANCE_AWARE, CLIENT_ID } from '../constants/AADServerParamKeys.mjs';
|
|
@@ -54,7 +54,7 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
54
54
|
// AAD will throw if prompt=select_account is passed with an account hint
|
|
55
55
|
if (request.sid && request.prompt === PromptValue.NONE) {
|
|
56
56
|
// SessionID is only used in silent calls
|
|
57
|
-
logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request");
|
|
57
|
+
logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request", request.correlationId);
|
|
58
58
|
addSid(parameters, request.sid);
|
|
59
59
|
performanceClient?.addFields({ sidFromRequest: true }, correlationId);
|
|
60
60
|
}
|
|
@@ -62,12 +62,12 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
62
62
|
const accountSid = extractAccountSid(request.account);
|
|
63
63
|
let accountLoginHintClaim = extractLoginHint(request.account);
|
|
64
64
|
if (accountLoginHintClaim && request.domainHint) {
|
|
65
|
-
logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint
|
|
65
|
+
logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint`, request.correlationId);
|
|
66
66
|
accountLoginHintClaim = null;
|
|
67
67
|
}
|
|
68
68
|
// If login_hint claim is present, use it over sid/username
|
|
69
69
|
if (accountLoginHintClaim) {
|
|
70
|
-
logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account");
|
|
70
|
+
logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account", request.correlationId);
|
|
71
71
|
addLoginHint(parameters, accountLoginHintClaim);
|
|
72
72
|
performanceClient?.addFields({ loginHintFromClaim: true }, correlationId);
|
|
73
73
|
try {
|
|
@@ -75,7 +75,7 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
75
75
|
addCcsOid(parameters, clientInfo);
|
|
76
76
|
}
|
|
77
77
|
catch (e) {
|
|
78
|
-
logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
|
|
78
|
+
logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header", request.correlationId);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
else if (accountSid && request.prompt === PromptValue.NONE) {
|
|
@@ -83,7 +83,7 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
83
83
|
* If account and loginHint are provided, we will check account first for sid before adding loginHint
|
|
84
84
|
* SessionId is only used in silent calls
|
|
85
85
|
*/
|
|
86
|
-
logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account");
|
|
86
|
+
logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account", request.correlationId);
|
|
87
87
|
addSid(parameters, accountSid);
|
|
88
88
|
performanceClient?.addFields({ sidFromClaim: true }, correlationId);
|
|
89
89
|
try {
|
|
@@ -91,18 +91,18 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
91
91
|
addCcsOid(parameters, clientInfo);
|
|
92
92
|
}
|
|
93
93
|
catch (e) {
|
|
94
|
-
logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
|
|
94
|
+
logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header", request.correlationId);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
else if (request.loginHint) {
|
|
98
|
-
logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request");
|
|
98
|
+
logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request", request.correlationId);
|
|
99
99
|
addLoginHint(parameters, request.loginHint);
|
|
100
100
|
addCcsUpn(parameters, request.loginHint);
|
|
101
101
|
performanceClient?.addFields({ loginHintFromRequest: true }, correlationId);
|
|
102
102
|
}
|
|
103
103
|
else if (request.account.username) {
|
|
104
104
|
// Fallback to account username if provided
|
|
105
|
-
logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account");
|
|
105
|
+
logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account", request.correlationId);
|
|
106
106
|
addLoginHint(parameters, request.account.username);
|
|
107
107
|
performanceClient?.addFields({ loginHintFromUpn: true }, correlationId);
|
|
108
108
|
try {
|
|
@@ -110,19 +110,19 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
110
110
|
addCcsOid(parameters, clientInfo);
|
|
111
111
|
}
|
|
112
112
|
catch (e) {
|
|
113
|
-
logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
|
|
113
|
+
logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header", request.correlationId);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
else if (request.loginHint) {
|
|
118
|
-
logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request");
|
|
118
|
+
logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request", request.correlationId);
|
|
119
119
|
addLoginHint(parameters, request.loginHint);
|
|
120
120
|
addCcsUpn(parameters, request.loginHint);
|
|
121
121
|
performanceClient?.addFields({ loginHintFromRequest: true }, correlationId);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
else {
|
|
125
|
-
logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");
|
|
125
|
+
logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints", request.correlationId);
|
|
126
126
|
}
|
|
127
127
|
if (request.nonce) {
|
|
128
128
|
addNonce(parameters, request.nonce);
|
|
@@ -152,8 +152,8 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
152
152
|
* @param requestParameters
|
|
153
153
|
* @returns
|
|
154
154
|
*/
|
|
155
|
-
function getAuthorizeUrl(authority, requestParameters
|
|
156
|
-
const queryString = mapToQueryString(requestParameters
|
|
155
|
+
function getAuthorizeUrl(authority, requestParameters) {
|
|
156
|
+
const queryString = mapToQueryString(requestParameters);
|
|
157
157
|
return UrlString.appendQueryString(authority.authorizationEndpoint, queryString);
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorize.mjs","sources":["../../src/protocol/Authorize.ts"],"sourcesContent":[null],"names":["RequestParameterBuilder.addClientId","AADServerParamKeys.CLIENT_ID","RequestParameterBuilder.addScopes","RequestParameterBuilder.addRedirectUri","RequestParameterBuilder.addCorrelationId","RequestParameterBuilder.addResponseMode","RequestParameterBuilder.addClientInfo","RequestParameterBuilder.addPrompt","RequestParameterBuilder.addDomainHint","RequestParameterBuilder.addSid","RequestParameterBuilder.addLoginHint","RequestParameterBuilder.addCcsOid","RequestParameterBuilder.addCcsUpn","RequestParameterBuilder.addNonce","RequestParameterBuilder.addState","RequestParameterBuilder.addClaims","RequestParameterBuilder.addBrokerParameters","AADServerParamKeys.INSTANCE_AWARE","RequestParameterBuilder.addInstanceAware","ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse","ClientAuthErrorCodes.stateNotFound","ClientAuthErrorCodes.invalidState","ClientAuthErrorCodes.stateMismatch"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;
|
|
1
|
+
{"version":3,"file":"Authorize.mjs","sources":["../../src/protocol/Authorize.ts"],"sourcesContent":[null],"names":["RequestParameterBuilder.addClientId","AADServerParamKeys.CLIENT_ID","RequestParameterBuilder.addScopes","RequestParameterBuilder.addRedirectUri","RequestParameterBuilder.addCorrelationId","RequestParameterBuilder.addResponseMode","RequestParameterBuilder.addClientInfo","RequestParameterBuilder.addPrompt","RequestParameterBuilder.addDomainHint","RequestParameterBuilder.addSid","RequestParameterBuilder.addLoginHint","RequestParameterBuilder.addCcsOid","RequestParameterBuilder.addCcsUpn","RequestParameterBuilder.addNonce","RequestParameterBuilder.addState","RequestParameterBuilder.addClaims","RequestParameterBuilder.addBrokerParameters","AADServerParamKeys.INSTANCE_AWARE","RequestParameterBuilder.addInstanceAware","ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse","ClientAuthErrorCodes.stateNotFound","ClientAuthErrorCodes.invalidState","ClientAuthErrorCodes.stateMismatch"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AA0BH;;;;;;;AAOG;AACG,SAAU,qCAAqC,CACjD,WAAwB,EACxB,OAAsC,EACtC,MAAc,EACd,iBAAsC,EAAA;;AAGtC,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;AAE5C,IAAA,MAAM,UAAU,GAAG,IAAI,GA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cAAiC,EAAA;IAEjC,MAAM,eAAe,GAAG,OAAO,CAAC;IAChC,MAAM,oBAAoB,GACtB,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;AAC3D,IAAA,OAAO,oBAAoB,IAAI,oBAAoB,IAAI,CAAC;AACpD,UAAE,cAAc,CAAC,SAAS,EAAE,SAAS,CAC/B,oBAAoB,GAAG,eAAe,CAAC,MAAM,CAChD;UACD,SAAS,CAAC;AACpB,CAAC;AAED;;;AAGG;AACH,SAAS,iBAAiB,CAAC,OAAoB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,IAAI,CAAC;AAC9C,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAoB,EAAA;IAC1C,OAAO,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,aAAa,EAAE,UAAU,IAAI,IAAI,CAAC;AAC1E;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CcsCredential } from "../account/CcsCredential.js";
|
|
2
|
+
import { Logger } from "../logger/Logger.js";
|
|
3
|
+
import { BaseAuthRequest } from "../request/BaseAuthRequest.js";
|
|
4
|
+
import { IPerformanceClient } from "../exports-browser-only.js";
|
|
5
|
+
import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js";
|
|
6
|
+
import { RequestThumbprint } from "../network/RequestThumbprint.js";
|
|
7
|
+
import { INetworkModule, NetworkRequestOptions } from "../network/INetworkModule.js";
|
|
8
|
+
import { NetworkResponse } from "../network/NetworkResponse.js";
|
|
9
|
+
import { CacheManager } from "../cache/CacheManager.js";
|
|
10
|
+
import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
|
|
11
|
+
/**
|
|
12
|
+
* Creates default headers for requests to token endpoint
|
|
13
|
+
*/
|
|
14
|
+
export declare function createTokenRequestHeaders(logger: Logger, preventCorsPreflight: boolean, ccsCred?: CcsCredential): Record<string, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates query string for the /token request
|
|
17
|
+
* @param request
|
|
18
|
+
*/
|
|
19
|
+
export declare function createTokenQueryParameters(request: BaseAuthRequest, clientId: string, redirectUri: string, performanceClient: IPerformanceClient): string;
|
|
20
|
+
/**
|
|
21
|
+
* Http post to token endpoint
|
|
22
|
+
* @param tokenEndpoint
|
|
23
|
+
* @param queryString
|
|
24
|
+
* @param headers
|
|
25
|
+
* @param thumbprint
|
|
26
|
+
*/
|
|
27
|
+
export declare function executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Record<string, string>, thumbprint: RequestThumbprint, correlationId: string, cacheManager: CacheManager, networkClient: INetworkModule, logger: Logger, performanceClient: IPerformanceClient, serverTelemetryManager: ServerTelemetryManager | null): Promise<NetworkResponse<ServerAuthorizationTokenResponse>>;
|
|
28
|
+
/**
|
|
29
|
+
* Wraps sendPostRequestAsync with necessary preflight and postflight logic
|
|
30
|
+
* @param thumbprint - Request thumbprint for throttling
|
|
31
|
+
* @param tokenEndpoint - Endpoint to make the POST to
|
|
32
|
+
* @param options - Body and Headers to include on the POST request
|
|
33
|
+
* @param correlationId - CorrelationId for telemetry
|
|
34
|
+
* @param cacheManager - Cache manager instance
|
|
35
|
+
* @param networkClient - Network module instance
|
|
36
|
+
* @param logger - Logger instance
|
|
37
|
+
* @param performanceClient - Performance client instance
|
|
38
|
+
*/
|
|
39
|
+
export declare function sendPostRequest<T extends ServerAuthorizationTokenResponse>(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions, correlationId: string, cacheManager: CacheManager, networkClient: INetworkModule, logger: Logger, performanceClient: IPerformanceClient): Promise<NetworkResponse<T>>;
|
|
40
|
+
//# sourceMappingURL=Token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../src/protocol/Token.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAqB,MAAM,6BAA6B,CAAC;AAE/E,OA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,CACjC,CAAC,SAAS,gCAAgC,EAE1C,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,qBAAqB,EAC9B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,cAAc,EAC7B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB,GACtC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CA6D7B"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { CcsCredentialType } from '../account/CcsCredential.mjs';
|
|
4
|
+
import { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs';
|
|
5
|
+
import { URL_FORM_CONTENT_TYPE, HeaderNames } from '../utils/Constants.mjs';
|
|
6
|
+
import { addBrokerParameters, addExtraParameters, addCorrelationId, instrumentBrokerParams } from '../request/RequestParameterBuilder.mjs';
|
|
7
|
+
import { mapToQueryString } from '../utils/UrlUtils.mjs';
|
|
8
|
+
import { ThrottlingUtils } from '../network/ThrottlingUtils.mjs';
|
|
9
|
+
import { NetworkError } from '../error/NetworkError.mjs';
|
|
10
|
+
import { AuthError } from '../error/AuthError.mjs';
|
|
11
|
+
import { createClientAuthError } from '../error/ClientAuthError.mjs';
|
|
12
|
+
import { invokeAsync } from '../utils/FunctionWrappers.mjs';
|
|
13
|
+
import { NetworkClientSendPostRequestAsync } from '../telemetry/performance/PerformanceEvents.mjs';
|
|
14
|
+
import { networkError } from '../error/ClientAuthErrorCodes.mjs';
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
+
* Licensed under the MIT License.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Creates default headers for requests to token endpoint
|
|
22
|
+
*/
|
|
23
|
+
function createTokenRequestHeaders(logger, preventCorsPreflight, ccsCred) {
|
|
24
|
+
const headers = {};
|
|
25
|
+
headers[HeaderNames.CONTENT_TYPE] = URL_FORM_CONTENT_TYPE;
|
|
26
|
+
if (!preventCorsPreflight && ccsCred) {
|
|
27
|
+
switch (ccsCred.type) {
|
|
28
|
+
case CcsCredentialType.HOME_ACCOUNT_ID:
|
|
29
|
+
try {
|
|
30
|
+
const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential);
|
|
31
|
+
headers[HeaderNames.CCS_HEADER] = `Oid:${clientInfo.uid}@${clientInfo.utid}`;
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
logger.verbose(`Could not parse home account ID for CCS Header: '${e}'`, "");
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
case CcsCredentialType.UPN:
|
|
38
|
+
headers[HeaderNames.CCS_HEADER] = `UPN: ${ccsCred.credential}`;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return headers;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates query string for the /token request
|
|
46
|
+
* @param request
|
|
47
|
+
*/
|
|
48
|
+
function createTokenQueryParameters(request, clientId, redirectUri, performanceClient) {
|
|
49
|
+
const parameters = new Map();
|
|
50
|
+
if (request.embeddedClientId) {
|
|
51
|
+
addBrokerParameters(parameters, clientId, redirectUri);
|
|
52
|
+
}
|
|
53
|
+
if (request.extraQueryParameters) {
|
|
54
|
+
addExtraParameters(parameters, request.extraQueryParameters);
|
|
55
|
+
}
|
|
56
|
+
addCorrelationId(parameters, request.correlationId);
|
|
57
|
+
instrumentBrokerParams(parameters, request.correlationId, performanceClient);
|
|
58
|
+
return mapToQueryString(parameters);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Http post to token endpoint
|
|
62
|
+
* @param tokenEndpoint
|
|
63
|
+
* @param queryString
|
|
64
|
+
* @param headers
|
|
65
|
+
* @param thumbprint
|
|
66
|
+
*/
|
|
67
|
+
async function executePostToTokenEndpoint(tokenEndpoint, queryString, headers, thumbprint, correlationId, cacheManager, networkClient, logger, performanceClient, serverTelemetryManager) {
|
|
68
|
+
const response = await sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers }, correlationId, cacheManager, networkClient, logger, performanceClient);
|
|
69
|
+
if (serverTelemetryManager &&
|
|
70
|
+
response.status < 500 &&
|
|
71
|
+
response.status !== 429) {
|
|
72
|
+
// Telemetry data successfully logged by server, clear Telemetry cache
|
|
73
|
+
serverTelemetryManager.clearTelemetryCache();
|
|
74
|
+
}
|
|
75
|
+
return response;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Wraps sendPostRequestAsync with necessary preflight and postflight logic
|
|
79
|
+
* @param thumbprint - Request thumbprint for throttling
|
|
80
|
+
* @param tokenEndpoint - Endpoint to make the POST to
|
|
81
|
+
* @param options - Body and Headers to include on the POST request
|
|
82
|
+
* @param correlationId - CorrelationId for telemetry
|
|
83
|
+
* @param cacheManager - Cache manager instance
|
|
84
|
+
* @param networkClient - Network module instance
|
|
85
|
+
* @param logger - Logger instance
|
|
86
|
+
* @param performanceClient - Performance client instance
|
|
87
|
+
*/
|
|
88
|
+
async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId, cacheManager, networkClient, logger, performanceClient) {
|
|
89
|
+
ThrottlingUtils.preProcess(cacheManager, thumbprint, correlationId);
|
|
90
|
+
let response;
|
|
91
|
+
try {
|
|
92
|
+
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, options);
|
|
93
|
+
const responseHeaders = response.headers || {};
|
|
94
|
+
performanceClient?.addFields({
|
|
95
|
+
refreshTokenSize: response.body.refresh_token?.length || 0,
|
|
96
|
+
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "",
|
|
97
|
+
requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
|
|
98
|
+
}, correlationId);
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
if (e instanceof NetworkError) {
|
|
102
|
+
const responseHeaders = e.responseHeaders;
|
|
103
|
+
if (responseHeaders) {
|
|
104
|
+
performanceClient?.addFields({
|
|
105
|
+
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] ||
|
|
106
|
+
"",
|
|
107
|
+
requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
|
|
108
|
+
contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] ||
|
|
109
|
+
undefined,
|
|
110
|
+
contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||
|
|
111
|
+
undefined,
|
|
112
|
+
httpStatus: e.httpStatus,
|
|
113
|
+
}, correlationId);
|
|
114
|
+
}
|
|
115
|
+
throw e.error;
|
|
116
|
+
}
|
|
117
|
+
if (e instanceof AuthError) {
|
|
118
|
+
throw e;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
throw createClientAuthError(networkError);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
ThrottlingUtils.postProcess(cacheManager, thumbprint, response, correlationId);
|
|
125
|
+
return response;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export { createTokenQueryParameters, createTokenRequestHeaders, executePostToTokenEndpoint, sendPostRequest };
|
|
129
|
+
//# sourceMappingURL=Token.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Token.mjs","sources":["../../src/protocol/Token.ts"],"sourcesContent":[null],"names":["RequestParameterBuilder.addBrokerParameters","RequestParameterBuilder.addExtraParameters","RequestParameterBuilder.addCorrelationId","RequestParameterBuilder.instrumentBrokerParams","UrlUtils.mapToQueryString","PerformanceEvents.NetworkClientSendPostRequestAsync","ClientAuthErrorCodes.networkError"],"mappings":";;;;;;;;;;;;;;;AAAA;;;AAGG;AA6BH;;AAEG;SACa,yBAAyB,CACrC,MAAc,EACd,oBAA6B,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C;AACpB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationHeaderParser.d.ts","sourceRoot":"","sources":["../../src/request/AuthenticationHeaderParser.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI3C;;;OAGG;IACH,WAAW,IAAI,MAAM;IAqCrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"AuthenticationHeaderParser.d.ts","sourceRoot":"","sources":["../../src/request/AuthenticationHeaderParser.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI3C;;;OAGG;IACH,WAAW,IAAI,MAAM;IAqCrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;CAa1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { HeaderNames } from '../utils/Constants.mjs';
|
|
5
5
|
import { invalidAuthenticationHeader, missingNonceAuthenticationHeader } from '../error/ClientConfigurationErrorCodes.mjs';
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -54,7 +54,7 @@ class AuthenticationHeaderParser {
|
|
|
54
54
|
challenges.forEach((challenge) => {
|
|
55
55
|
const [key, value] = challenge.split("=");
|
|
56
56
|
// Remove escaped quotation marks (', ") from challenge string to keep only the challenge value
|
|
57
|
-
challengeMap[key] = unescape(value.replace(/['"]+/g,
|
|
57
|
+
challengeMap[key] = unescape(value.replace(/['"]+/g, ""));
|
|
58
58
|
});
|
|
59
59
|
return challengeMap;
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationHeaderParser.mjs","sources":["../../src/request/AuthenticationHeaderParser.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.invalidAuthenticationHeader","ClientConfigurationErrorCodes.missingNonceAuthenticationHeader"],"mappings":";;;;;;AAAA;;;AAGG;AAgBH;;;AAGG;MACU,0BAA0B,CAAA;AAGnC,IAAA,WAAA,CAAY,OAA+B,EAAA;AACvC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;AAED;;;AAGG;IACH,WAAW,GAAA;;QAEP,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACxE,QAAA,IAAI,kBAAkB,EAAE;YACpB,MAAM,4BAA4B,GAC9B,IAAI,CAAC,eAAe,CAChB,kBAAkB,CACrB,CAAC;YACN,IAAI,4BAA4B,CAAC,SAAS,EAAE;gBACxC,OAAO,4BAA4B,CAAC,SAAS,CAAC;AACjD,aAAA;AACD,YAAA,MAAM,8BAA8B,CAChCA,2BAAyD,CAC5D,CAAC;AACL,SAAA;;QAGD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AAClE,QAAA,IAAI,eAAe,EAAE;YACjB,MAAM,yBAAyB,GAC3B,IAAI,CAAC,eAAe,CAChB,eAAe,CAClB,CAAC;YACN,IAAI,yBAAyB,CAAC,KAAK,EAAE;gBACjC,OAAO,yBAAyB,CAAC,KAAK,CAAC;AAC1C,aAAA;AACD,YAAA,MAAM,8BAA8B,CAChCA,2BAAyD,CAC5D,CAAC;AACL,SAAA;;AAGD,QAAA,MAAM,8BAA8B,CAChCC,gCAA8D,CACjE,CAAC;KACL;AAED;;;;AAIG;AACK,IAAA,eAAe,CAAI,MAAc,EAAA;QACrC,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5C,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,EAAO,CAAC;AAE7B,QAAA,UAAU,CAAC,OAAO,CAAC,CAAC,SAAiB,KAAI;AACrC,YAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;;AAE1C,YAAA,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"AuthenticationHeaderParser.mjs","sources":["../../src/request/AuthenticationHeaderParser.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.invalidAuthenticationHeader","ClientConfigurationErrorCodes.missingNonceAuthenticationHeader"],"mappings":";;;;;;AAAA;;;AAGG;AAgBH;;;AAGG;MACU,0BAA0B,CAAA;AAGnC,IAAA,WAAA,CAAY,OAA+B,EAAA;AACvC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;AAED;;;AAGG;IACH,WAAW,GAAA;;QAEP,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACxE,QAAA,IAAI,kBAAkB,EAAE;YACpB,MAAM,4BAA4B,GAC9B,IAAI,CAAC,eAAe,CAChB,kBAAkB,CACrB,CAAC;YACN,IAAI,4BAA4B,CAAC,SAAS,EAAE;gBACxC,OAAO,4BAA4B,CAAC,SAAS,CAAC;AACjD,aAAA;AACD,YAAA,MAAM,8BAA8B,CAChCA,2BAAyD,CAC5D,CAAC;AACL,SAAA;;QAGD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AAClE,QAAA,IAAI,eAAe,EAAE;YACjB,MAAM,yBAAyB,GAC3B,IAAI,CAAC,eAAe,CAChB,eAAe,CAClB,CAAC;YACN,IAAI,yBAAyB,CAAC,KAAK,EAAE;gBACjC,OAAO,yBAAyB,CAAC,KAAK,CAAC;AAC1C,aAAA;AACD,YAAA,MAAM,8BAA8B,CAChCA,2BAAyD,CAC5D,CAAC;AACL,SAAA;;AAGD,QAAA,MAAM,8BAA8B,CAChCC,gCAA8D,CACjE,CAAC;KACL;AAED;;;;AAIG;AACK,IAAA,eAAe,CAAI,MAAc,EAAA;QACrC,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5C,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,EAAO,CAAC;AAE7B,QAAA,UAAU,CAAC,OAAO,CAAC,CAAC,SAAiB,KAAI;AACrC,YAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;;AAE1C,YAAA,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9D,SAAC,CAAC,CAAC;AAEH,QAAA,OAAO,YAAY,CAAC;KACvB;AACJ;;;;"}
|
|
@@ -18,15 +18,13 @@ import { ShrOptions } from "../crypto/SignedHttpRequest.js";
|
|
|
18
18
|
* - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate.
|
|
19
19
|
* - sshKid - Key ID that uniquely identifies the SSH public key mentioned above.
|
|
20
20
|
* - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids
|
|
21
|
-
* -
|
|
22
|
-
* - tokenQueryParameters - String to string map of custom query parameters added to the /token call
|
|
23
|
-
* - tokenBodyParameters - String to string map of custom parameters added to the body of the /token call
|
|
21
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
24
22
|
* - storeInCache - Object containing boolean values indicating whether to store tokens in the cache or not (default is true)
|
|
25
23
|
* - scenarioId - Scenario id to track custom user prompts
|
|
26
24
|
* - popKid - Key ID to identify the public key for PoP token request
|
|
27
25
|
* - embeddedClientId - Embedded client id. When specified, broker client id (brk_client_id) and redirect uri (brk_redirect_uri) params are set with values from the config, overriding the corresponding extra parameters, if present.
|
|
28
26
|
* - httpMethod - HTTP method to use for the /authorize request. Defaults to GET, but can be set to POST if the request requires body parameters
|
|
29
|
-
* -
|
|
27
|
+
* - extraParameters - String to string map of custom parameters added to outgoing token service requests
|
|
30
28
|
*/
|
|
31
29
|
export type BaseAuthRequest = {
|
|
32
30
|
authority: string;
|
|
@@ -42,15 +40,13 @@ export type BaseAuthRequest = {
|
|
|
42
40
|
sshJwk?: string;
|
|
43
41
|
sshKid?: string;
|
|
44
42
|
azureCloudOptions?: AzureCloudOptions;
|
|
45
|
-
requestedClaimsHash?: string;
|
|
46
43
|
maxAge?: number;
|
|
47
|
-
tokenBodyParameters?: StringDict;
|
|
48
|
-
tokenQueryParameters?: StringDict;
|
|
49
44
|
storeInCache?: StoreInCache;
|
|
50
45
|
scenarioId?: string;
|
|
51
46
|
popKid?: string;
|
|
52
47
|
embeddedClientId?: string;
|
|
53
48
|
httpMethod?: HttpMethod;
|
|
54
|
-
|
|
49
|
+
extraQueryParameters?: StringDict;
|
|
50
|
+
extraParameters?: StringDict;
|
|
55
51
|
};
|
|
56
52
|
//# sourceMappingURL=BaseAuthRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AA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;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,eAAe,CAAC,EAAE,UAAU,CAAC;CAChC,CAAC"}
|
|
@@ -13,7 +13,8 @@ import { CcsCredential } from "../account/CcsCredential.js";
|
|
|
13
13
|
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
|
|
14
14
|
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
|
|
15
15
|
* - enableSpaAuthCode - Enables the acqusition of a spa authorization code (confidential clients only)
|
|
16
|
-
* -
|
|
16
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
17
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
17
18
|
*/
|
|
18
19
|
export type CommonAuthorizationCodeRequest = BaseAuthRequest & {
|
|
19
20
|
code: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ResponseMode } from "../utils/Constants.js";
|
|
2
|
-
import { StringDict } from "../utils/MsalTypes.js";
|
|
3
2
|
import { BaseAuthRequest } from "./BaseAuthRequest.js";
|
|
4
3
|
import { AccountInfo } from "../account/AccountInfo.js";
|
|
5
4
|
/**
|
|
@@ -26,8 +25,8 @@ import { AccountInfo } from "../account/AccountInfo.js";
|
|
|
26
25
|
* - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim.
|
|
27
26
|
* - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens.
|
|
28
27
|
* - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant.
|
|
29
|
-
* - extraQueryParameters - String to string map of custom query parameters added to
|
|
30
|
-
* -
|
|
28
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
29
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
31
30
|
* - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks.
|
|
32
31
|
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
|
|
33
32
|
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
|
|
@@ -40,7 +39,6 @@ export type CommonAuthorizationUrlRequest = BaseAuthRequest & {
|
|
|
40
39
|
codeChallenge?: string;
|
|
41
40
|
codeChallengeMethod?: string;
|
|
42
41
|
domainHint?: string;
|
|
43
|
-
extraQueryParameters?: StringDict;
|
|
44
42
|
extraScopesToConsent?: Array<string>;
|
|
45
43
|
loginHint?: string;
|
|
46
44
|
nonce: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonAuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CommonAuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"}
|
|
@@ -10,7 +10,8 @@ import { CcsCredential } from "../account/CcsCredential.js";
|
|
|
10
10
|
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
|
|
11
11
|
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
|
|
12
12
|
* - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
|
|
13
|
-
* -
|
|
13
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
14
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
14
15
|
*/
|
|
15
16
|
export type CommonRefreshTokenRequest = BaseAuthRequest & {
|
|
16
17
|
refreshToken: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonRefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonRefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"CommonRefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonRefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -10,7 +10,8 @@ import { BaseAuthRequest } from "./BaseAuthRequest.js";
|
|
|
10
10
|
* - forceRefresh - Forces silent requests to make network calls if true.
|
|
11
11
|
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
|
|
12
12
|
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
|
|
13
|
-
* -
|
|
13
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
14
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
14
15
|
*/
|
|
15
16
|
export type CommonSilentFlowRequest = BaseAuthRequest & {
|
|
16
17
|
/** Account object to lookup the credentials */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonSilentFlowRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonSilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"CommonSilentFlowRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonSilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACpD,+CAA+C;IAC/C,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oLAAoL;IACpL,mCAAmC,CAAC,EAAE,MAAM,CAAC;CAChD,CAAC"}
|