@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
|
@@ -3,20 +3,16 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { BaseClient } from "./BaseClient.js";
|
|
7
6
|
import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest.js";
|
|
8
7
|
import { Authority } from "../authority/Authority.js";
|
|
9
8
|
import * as RequestParameterBuilder from "../request/RequestParameterBuilder.js";
|
|
10
9
|
import * as UrlUtils from "../utils/UrlUtils.js";
|
|
11
|
-
import
|
|
12
|
-
GrantType,
|
|
13
|
-
AuthenticationScheme,
|
|
14
|
-
Separators,
|
|
15
|
-
HeaderNames,
|
|
16
|
-
} from "../utils/Constants.js";
|
|
10
|
+
import * as Constants from "../utils/Constants.js";
|
|
17
11
|
import * as AADServerParamKeys from "../constants/AADServerParamKeys.js";
|
|
18
12
|
import {
|
|
13
|
+
buildClientConfiguration,
|
|
19
14
|
ClientConfiguration,
|
|
15
|
+
CommonClientConfiguration,
|
|
20
16
|
isOidcProtocolMode,
|
|
21
17
|
} from "../config/ClientConfiguration.js";
|
|
22
18
|
import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js";
|
|
@@ -43,26 +39,84 @@ import {
|
|
|
43
39
|
ClientConfigurationErrorCodes,
|
|
44
40
|
} from "../error/ClientConfigurationError.js";
|
|
45
41
|
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
|
|
46
|
-
import
|
|
42
|
+
import * as PerformanceEvents from "../telemetry/performance/PerformanceEvents.js";
|
|
47
43
|
import { invokeAsync } from "../utils/FunctionWrappers.js";
|
|
48
44
|
import { ClientAssertion } from "../account/ClientCredentials.js";
|
|
49
45
|
import { getClientAssertion } from "../utils/ClientAssertionUtils.js";
|
|
50
46
|
import { getRequestThumbprint } from "../network/RequestThumbprint.js";
|
|
47
|
+
import {
|
|
48
|
+
createTokenQueryParameters,
|
|
49
|
+
createTokenRequestHeaders,
|
|
50
|
+
executePostToTokenEndpoint,
|
|
51
|
+
} from "../protocol/Token.js";
|
|
52
|
+
import { createDiscoveredInstance } from "../authority/AuthorityFactory.js";
|
|
53
|
+
import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
|
|
54
|
+
import { Logger } from "../logger/Logger.js";
|
|
55
|
+
import { ICrypto } from "../crypto/ICrypto.js";
|
|
56
|
+
import { CacheManager } from "../cache/CacheManager.js";
|
|
57
|
+
import { INetworkModule } from "../network/INetworkModule.js";
|
|
58
|
+
import { version, name } from "../packageMetadata.js";
|
|
51
59
|
|
|
52
60
|
/**
|
|
53
61
|
* Oauth2.0 Authorization Code client
|
|
54
62
|
* @internal
|
|
55
63
|
*/
|
|
56
|
-
export class AuthorizationCodeClient
|
|
64
|
+
export class AuthorizationCodeClient {
|
|
57
65
|
// Flag to indicate if client is for hybrid spa auth code redemption
|
|
58
66
|
protected includeRedirectUri: boolean = true;
|
|
59
67
|
private oidcDefaultScopes;
|
|
60
68
|
|
|
69
|
+
// Logger object
|
|
70
|
+
public logger: Logger;
|
|
71
|
+
|
|
72
|
+
// Application config
|
|
73
|
+
protected config: CommonClientConfiguration;
|
|
74
|
+
|
|
75
|
+
// Crypto Interface
|
|
76
|
+
protected cryptoUtils: ICrypto;
|
|
77
|
+
|
|
78
|
+
// Storage Interface
|
|
79
|
+
protected cacheManager: CacheManager;
|
|
80
|
+
|
|
81
|
+
// Network Interface
|
|
82
|
+
protected networkClient: INetworkModule;
|
|
83
|
+
|
|
84
|
+
// Server Telemetry Manager
|
|
85
|
+
protected serverTelemetryManager: ServerTelemetryManager | null;
|
|
86
|
+
|
|
87
|
+
// Default authority object
|
|
88
|
+
public authority: Authority;
|
|
89
|
+
|
|
90
|
+
// Performance telemetry client
|
|
91
|
+
protected performanceClient: IPerformanceClient;
|
|
92
|
+
|
|
61
93
|
constructor(
|
|
62
94
|
configuration: ClientConfiguration,
|
|
63
|
-
performanceClient
|
|
95
|
+
performanceClient: IPerformanceClient
|
|
64
96
|
) {
|
|
65
|
-
|
|
97
|
+
// Set the configuration
|
|
98
|
+
this.config = buildClientConfiguration(configuration);
|
|
99
|
+
|
|
100
|
+
// Initialize the logger
|
|
101
|
+
this.logger = new Logger(this.config.loggerOptions, name, version);
|
|
102
|
+
|
|
103
|
+
// Initialize crypto
|
|
104
|
+
this.cryptoUtils = this.config.cryptoInterface;
|
|
105
|
+
|
|
106
|
+
// Initialize storage interface
|
|
107
|
+
this.cacheManager = this.config.storageInterface;
|
|
108
|
+
|
|
109
|
+
// Set the network interface
|
|
110
|
+
this.networkClient = this.config.networkInterface;
|
|
111
|
+
|
|
112
|
+
// Set TelemetryManager
|
|
113
|
+
this.serverTelemetryManager = this.config.serverTelemetryManager;
|
|
114
|
+
|
|
115
|
+
// set Authority
|
|
116
|
+
this.authority = this.config.authOptions.authority;
|
|
117
|
+
|
|
118
|
+
// set performance telemetry client
|
|
119
|
+
this.performanceClient = performanceClient;
|
|
66
120
|
this.oidcDefaultScopes =
|
|
67
121
|
this.config.authOptions.authority.options.OIDCOptions?.defaultScopes;
|
|
68
122
|
}
|
|
@@ -76,17 +130,23 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
76
130
|
request: CommonAuthorizationCodeRequest,
|
|
77
131
|
authCodePayload?: AuthorizationCodePayload
|
|
78
132
|
): Promise<AuthenticationResult> {
|
|
79
|
-
this.performanceClient?.addQueueMeasurement(
|
|
80
|
-
PerformanceEvents.AuthClientAcquireToken,
|
|
81
|
-
request.correlationId
|
|
82
|
-
);
|
|
83
|
-
|
|
84
133
|
if (!request.code) {
|
|
85
134
|
throw createClientAuthError(
|
|
86
135
|
ClientAuthErrorCodes.requestCannotBeMade
|
|
87
136
|
);
|
|
88
137
|
}
|
|
89
138
|
|
|
139
|
+
// Check for new cloud instance
|
|
140
|
+
if (authCodePayload && authCodePayload.cloud_instance_host_name) {
|
|
141
|
+
await invokeAsync(
|
|
142
|
+
this.updateTokenEndpointAuthority.bind(this),
|
|
143
|
+
PerformanceEvents.UpdateTokenEndpointAuthority,
|
|
144
|
+
this.logger,
|
|
145
|
+
this.performanceClient,
|
|
146
|
+
request.correlationId
|
|
147
|
+
)(authCodePayload.cloud_instance_host_name, request.correlationId);
|
|
148
|
+
}
|
|
149
|
+
|
|
90
150
|
const reqTimestamp = TimeUtils.nowSeconds();
|
|
91
151
|
const response = await invokeAsync(
|
|
92
152
|
this.executeTokenRequest.bind(this),
|
|
@@ -94,23 +154,27 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
94
154
|
this.logger,
|
|
95
155
|
this.performanceClient,
|
|
96
156
|
request.correlationId
|
|
97
|
-
)(this.authority, request);
|
|
157
|
+
)(this.authority, request, this.serverTelemetryManager);
|
|
98
158
|
|
|
99
159
|
// Retrieve requestId from response headers
|
|
100
|
-
const requestId =
|
|
160
|
+
const requestId =
|
|
161
|
+
response.headers?.[Constants.HeaderNames.X_MS_REQUEST_ID];
|
|
101
162
|
|
|
102
163
|
const responseHandler = new ResponseHandler(
|
|
103
164
|
this.config.authOptions.clientId,
|
|
104
165
|
this.cacheManager,
|
|
105
166
|
this.cryptoUtils,
|
|
106
167
|
this.logger,
|
|
168
|
+
this.performanceClient,
|
|
107
169
|
this.config.serializableCache,
|
|
108
|
-
this.config.persistencePlugin
|
|
109
|
-
this.performanceClient
|
|
170
|
+
this.config.persistencePlugin
|
|
110
171
|
);
|
|
111
172
|
|
|
112
173
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
113
|
-
responseHandler.validateTokenResponse(
|
|
174
|
+
responseHandler.validateTokenResponse(
|
|
175
|
+
response.body,
|
|
176
|
+
request.correlationId
|
|
177
|
+
);
|
|
114
178
|
|
|
115
179
|
return invokeAsync(
|
|
116
180
|
responseHandler.handleServerTokenResponse.bind(responseHandler),
|
|
@@ -159,14 +223,15 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
159
223
|
*/
|
|
160
224
|
private async executeTokenRequest(
|
|
161
225
|
authority: Authority,
|
|
162
|
-
request: CommonAuthorizationCodeRequest
|
|
226
|
+
request: CommonAuthorizationCodeRequest,
|
|
227
|
+
serverTelemetryManager: ServerTelemetryManager | null
|
|
163
228
|
): Promise<NetworkResponse<ServerAuthorizationTokenResponse>> {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
229
|
+
const queryParametersString = createTokenQueryParameters(
|
|
230
|
+
request,
|
|
231
|
+
this.config.authOptions.clientId,
|
|
232
|
+
this.config.authOptions.redirectUri,
|
|
233
|
+
this.performanceClient
|
|
167
234
|
);
|
|
168
|
-
|
|
169
|
-
const queryParametersString = this.createTokenQueryParameters(request);
|
|
170
235
|
const endpoint = UrlString.appendQueryString(
|
|
171
236
|
authority.tokenEndpoint,
|
|
172
237
|
queryParametersString
|
|
@@ -188,16 +253,19 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
188
253
|
this.cryptoUtils.base64Decode
|
|
189
254
|
);
|
|
190
255
|
ccsCredential = {
|
|
191
|
-
credential: `${clientInfo.uid}${
|
|
256
|
+
credential: `${clientInfo.uid}${Constants.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`,
|
|
192
257
|
type: CcsCredentialType.HOME_ACCOUNT_ID,
|
|
193
258
|
};
|
|
194
259
|
} catch (e) {
|
|
195
260
|
this.logger.verbose(
|
|
196
|
-
|
|
261
|
+
`Could not parse client info for CCS Header: '${e}'`,
|
|
262
|
+
request.correlationId
|
|
197
263
|
);
|
|
198
264
|
}
|
|
199
265
|
}
|
|
200
|
-
const headers: Record<string, string> =
|
|
266
|
+
const headers: Record<string, string> = createTokenRequestHeaders(
|
|
267
|
+
this.logger,
|
|
268
|
+
this.config.systemOptions.preventCorsPreflight,
|
|
201
269
|
ccsCredential || request.ccsCredential
|
|
202
270
|
);
|
|
203
271
|
|
|
@@ -207,7 +275,7 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
207
275
|
);
|
|
208
276
|
|
|
209
277
|
return invokeAsync(
|
|
210
|
-
|
|
278
|
+
executePostToTokenEndpoint,
|
|
211
279
|
PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint,
|
|
212
280
|
this.logger,
|
|
213
281
|
this.performanceClient,
|
|
@@ -218,7 +286,11 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
218
286
|
headers,
|
|
219
287
|
thumbprint,
|
|
220
288
|
request.correlationId,
|
|
221
|
-
|
|
289
|
+
this.cacheManager,
|
|
290
|
+
this.networkClient,
|
|
291
|
+
this.logger,
|
|
292
|
+
this.performanceClient,
|
|
293
|
+
serverTelemetryManager
|
|
222
294
|
);
|
|
223
295
|
}
|
|
224
296
|
|
|
@@ -229,17 +301,12 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
229
301
|
private async createTokenRequestBody(
|
|
230
302
|
request: CommonAuthorizationCodeRequest
|
|
231
303
|
): Promise<string> {
|
|
232
|
-
this.performanceClient?.addQueueMeasurement(
|
|
233
|
-
PerformanceEvents.AuthClientCreateTokenRequestBody,
|
|
234
|
-
request.correlationId
|
|
235
|
-
);
|
|
236
|
-
|
|
237
304
|
const parameters = new Map<string, string>();
|
|
238
305
|
|
|
239
306
|
RequestParameterBuilder.addClientId(
|
|
240
307
|
parameters,
|
|
241
308
|
request.embeddedClientId ||
|
|
242
|
-
request.
|
|
309
|
+
request.extraParameters?.[AADServerParamKeys.CLIENT_ID] ||
|
|
243
310
|
this.config.authOptions.clientId
|
|
244
311
|
);
|
|
245
312
|
|
|
@@ -326,11 +393,13 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
326
393
|
|
|
327
394
|
RequestParameterBuilder.addGrantType(
|
|
328
395
|
parameters,
|
|
329
|
-
GrantType.AUTHORIZATION_CODE_GRANT
|
|
396
|
+
Constants.GrantType.AUTHORIZATION_CODE_GRANT
|
|
330
397
|
);
|
|
331
398
|
RequestParameterBuilder.addClientInfo(parameters);
|
|
332
399
|
|
|
333
|
-
if (
|
|
400
|
+
if (
|
|
401
|
+
request.authenticationScheme === Constants.AuthenticationScheme.POP
|
|
402
|
+
) {
|
|
334
403
|
const popTokenGenerator = new PopTokenGenerator(
|
|
335
404
|
this.cryptoUtils,
|
|
336
405
|
this.performanceClient
|
|
@@ -352,7 +421,9 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
352
421
|
|
|
353
422
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
354
423
|
RequestParameterBuilder.addPopToken(parameters, reqCnfData);
|
|
355
|
-
} else if (
|
|
424
|
+
} else if (
|
|
425
|
+
request.authenticationScheme === Constants.AuthenticationScheme.SSH
|
|
426
|
+
) {
|
|
356
427
|
if (request.sshJwk) {
|
|
357
428
|
RequestParameterBuilder.addSshJwk(parameters, request.sshJwk);
|
|
358
429
|
} else {
|
|
@@ -382,12 +453,13 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
382
453
|
this.cryptoUtils.base64Decode
|
|
383
454
|
);
|
|
384
455
|
ccsCred = {
|
|
385
|
-
credential: `${clientInfo.uid}${
|
|
456
|
+
credential: `${clientInfo.uid}${Constants.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`,
|
|
386
457
|
type: CcsCredentialType.HOME_ACCOUNT_ID,
|
|
387
458
|
};
|
|
388
459
|
} catch (e) {
|
|
389
460
|
this.logger.verbose(
|
|
390
|
-
|
|
461
|
+
`Could not parse client info for CCS Header: '${e}'`,
|
|
462
|
+
request.correlationId
|
|
391
463
|
);
|
|
392
464
|
}
|
|
393
465
|
} else {
|
|
@@ -408,8 +480,8 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
408
480
|
);
|
|
409
481
|
} catch (e) {
|
|
410
482
|
this.logger.verbose(
|
|
411
|
-
|
|
412
|
-
|
|
483
|
+
`Could not parse home account ID for CCS Header: '${e}'`,
|
|
484
|
+
request.correlationId
|
|
413
485
|
);
|
|
414
486
|
}
|
|
415
487
|
break;
|
|
@@ -430,22 +502,20 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
430
502
|
);
|
|
431
503
|
}
|
|
432
504
|
|
|
433
|
-
if (request.
|
|
434
|
-
RequestParameterBuilder.
|
|
505
|
+
if (request.extraParameters) {
|
|
506
|
+
RequestParameterBuilder.addExtraParameters(
|
|
435
507
|
parameters,
|
|
436
|
-
request.
|
|
508
|
+
request.extraParameters
|
|
437
509
|
);
|
|
438
510
|
}
|
|
439
511
|
|
|
440
512
|
// Add hybrid spa parameters if not already provided
|
|
441
513
|
if (
|
|
442
514
|
request.enableSpaAuthorizationCode &&
|
|
443
|
-
(!request.
|
|
444
|
-
!request.
|
|
445
|
-
AADServerParamKeys.RETURN_SPA_CODE
|
|
446
|
-
])
|
|
515
|
+
(!request.extraParameters ||
|
|
516
|
+
!request.extraParameters[AADServerParamKeys.RETURN_SPA_CODE])
|
|
447
517
|
) {
|
|
448
|
-
RequestParameterBuilder.
|
|
518
|
+
RequestParameterBuilder.addExtraParameters(parameters, {
|
|
449
519
|
[AADServerParamKeys.RETURN_SPA_CODE]: "1",
|
|
450
520
|
});
|
|
451
521
|
}
|
|
@@ -500,7 +570,7 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
500
570
|
}
|
|
501
571
|
|
|
502
572
|
if (request.extraQueryParameters) {
|
|
503
|
-
RequestParameterBuilder.
|
|
573
|
+
RequestParameterBuilder.addExtraParameters(
|
|
504
574
|
parameters,
|
|
505
575
|
request.extraQueryParameters
|
|
506
576
|
);
|
|
@@ -510,10 +580,28 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
510
580
|
RequestParameterBuilder.addInstanceAware(parameters);
|
|
511
581
|
}
|
|
512
582
|
|
|
513
|
-
return UrlUtils.mapToQueryString(
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
583
|
+
return UrlUtils.mapToQueryString(parameters);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Updates the authority to the cloud instance provided in the authorization response
|
|
588
|
+
* @param cloudInstanceHostName - cloud instance host name from authorization code payload
|
|
589
|
+
* @param correlationId - request correlation id
|
|
590
|
+
*/
|
|
591
|
+
private async updateTokenEndpointAuthority(
|
|
592
|
+
cloudInstanceHostName: string,
|
|
593
|
+
correlationId: string
|
|
594
|
+
): Promise<void> {
|
|
595
|
+
const cloudInstanceAuthorityUri = `https://${cloudInstanceHostName}/${this.authority.tenant}/`;
|
|
596
|
+
const cloudInstanceAuthority = await createDiscoveredInstance(
|
|
597
|
+
cloudInstanceAuthorityUri,
|
|
598
|
+
this.networkClient,
|
|
599
|
+
this.cacheManager,
|
|
600
|
+
this.authority.options,
|
|
601
|
+
this.logger,
|
|
602
|
+
correlationId,
|
|
603
|
+
this.performanceClient
|
|
517
604
|
);
|
|
605
|
+
this.authority = cloudInstanceAuthority;
|
|
518
606
|
}
|
|
519
607
|
}
|