@azure/msal-browser 5.17.1 → 5.18.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/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +2 -4
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +15 -7
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +36 -28
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +146 -61
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +246 -246
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +4 -2
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +39 -13
- package/dist/network/FetchClient.mjs.map +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +2 -2
- package/lib/custom-auth-path/msal-custom-auth.cjs +453 -207
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +453 -207
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +2 -2
- package/lib/msal-browser.cjs +458 -209
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +458 -209
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/package.json +2 -2
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +0 -4
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +6 -8
- package/src/cache/BrowserCacheManager.ts +24 -6
- package/src/controllers/StandardController.ts +44 -31
- package/src/interaction_client/PlatformAuthInteractionClient.ts +194 -74
- package/src/naa/TokenRequest.ts +1 -0
- package/src/naa/mapping/NestedAppAuthAdapter.ts +5 -0
- package/src/network/FetchClient.ts +62 -14
- package/src/packageMetadata.ts +1 -1
- package/src/webBrokerBridge/IWebBrokerBridgeMessage.ts +42 -0
- package/src/webBrokerBridge/PendingRequestRegistry.ts +79 -0
- package/src/webBrokerBridge/WebBrokerBridgeError.ts +69 -0
- package/src/webBrokerBridge/WebBrokerBridgeErrorMap.ts +108 -0
- package/src/webBrokerBridge/index.ts +25 -0
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +4 -6
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +7 -5
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +3 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts +13 -3
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/naa/TokenRequest.d.ts +1 -0
- package/types/naa/TokenRequest.d.ts.map +1 -1
- package/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/types/network/FetchClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/webBrokerBridge/IWebBrokerBridgeMessage.d.ts +35 -0
- package/types/webBrokerBridge/IWebBrokerBridgeMessage.d.ts.map +1 -0
- package/types/webBrokerBridge/PendingRequestRegistry.d.ts +27 -0
- package/types/webBrokerBridge/PendingRequestRegistry.d.ts.map +1 -0
- package/types/webBrokerBridge/WebBrokerBridgeError.d.ts +50 -0
- package/types/webBrokerBridge/WebBrokerBridgeError.d.ts.map +1 -0
- package/types/webBrokerBridge/WebBrokerBridgeErrorMap.d.ts +10 -0
- package/types/webBrokerBridge/WebBrokerBridgeErrorMap.d.ts.map +1 -0
- package/types/webBrokerBridge/index.d.ts +16 -0
- package/types/webBrokerBridge/index.d.ts.map +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthFlowResultBase } from '../../../core/auth_flow/AuthFlowResultBase.mjs';
|
|
4
4
|
import { SignUpSubmitAttributesError } from '../error_type/SignUpError.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthFlowResultBase } from '../../../core/auth_flow/AuthFlowResultBase.mjs';
|
|
4
4
|
import { SignUpSubmitPasswordError } from '../error_type/SignUpError.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { InvalidArgumentError } from '../../../core/error/InvalidArgumentError.mjs';
|
|
4
4
|
import { UnexpectedError } from '../../../core/error/UnexpectedError.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { UnexpectedError } from '../../../core/error/UnexpectedError.mjs';
|
|
4
4
|
import { SIGN_UP_PASSWORD_REQUIRED_RESULT_TYPE, SIGN_UP_ATTRIBUTES_REQUIRED_RESULT_TYPE, SIGN_UP_COMPLETED_RESULT_TYPE } from '../../interaction_client/result/SignUpActionResult.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { SignInContinuationState } from '../../../sign_in/auth_flow/state/SignInContinuationState.mjs';
|
|
4
4
|
import { SIGN_UP_COMPLETED_STATE_TYPE } from '../../../core/auth_flow/AuthFlowStateTypes.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthFlowStateBase } from '../../../core/auth_flow/AuthFlowState.mjs';
|
|
4
4
|
import { SIGN_UP_FAILED_STATE_TYPE } from '../../../core/auth_flow/AuthFlowStateTypes.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthFlowActionRequiredStateBase } from '../../../core/auth_flow/AuthFlowState.mjs';
|
|
4
4
|
import { ensureArgumentIsNotEmptyString } from '../../../core/utils/ArgumentValidator.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { CustomAuthApiError } from '../../core/error/CustomAuthApiError.mjs';
|
|
4
4
|
import { UNSUPPORTED_CHALLENGE_TYPE, ATTRIBUTES_REQUIRED, CREDENTIAL_REQUIRED, INVALID_RESPONSE_BODY, CONTINUATION_TOKEN_MISSING } from '../../core/network_client/custom_auth_api/types/ApiErrorCodes.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthError, createInteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthError } from '@azure/msal-common/browser';
|
|
4
4
|
import { getDefaultErrorMessage, createBrowserAuthError } from './BrowserAuthError.mjs';
|
package/dist/event/EventType.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { StubServerTelemetryManager, ServerTelemetryManager, UrlString, Authority, invokeAsync, AuthorityFactory, createClientConfigurationError, ClientConfigurationErrorCodes } from '@azure/msal-common/browser';
|
|
4
4
|
import { AuthorityFactoryCreateDiscoveredInstance } from '../telemetry/BrowserPerformanceEvents.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.18.0 2026-08-04 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { ServerTelemetryManager, AADServerParamKeys, TimeUtils, ScopeSet, createClientAuthError, ClientAuthErrorCodes, AuthToken, updateAccountTenantProfileData, UrlString, buildAccountToCache, AccountEntityUtils, AuthorityType, Constants, PopTokenGenerator, CacheHelpers, RequestParameterBuilder, invokeAsync, PerformanceEvents } from '@azure/msal-common/browser';
|
|
3
|
+
import { ServerTelemetryManager, AADServerParamKeys, TimeUtils, AuthError, ScopeSet, createClientAuthError, ClientAuthErrorCodes, AuthToken, updateAccountTenantProfileData, UrlString, buildAccountToCache, AccountEntityUtils, AuthorityType, Constants, PopTokenGenerator, CacheHelpers, RequestParameterBuilder, invokeAsync, PerformanceEvents } from '@azure/msal-common/browser';
|
|
4
4
|
import { base64Decode } from '../encode/Base64Decode.mjs';
|
|
5
5
|
import { createBrowserAuthError } from '../error/BrowserAuthError.mjs';
|
|
6
6
|
import { NativeAuthError, isFatalNativeAuthError, createNativeAuthError } from '../error/NativeAuthError.mjs';
|
|
@@ -54,50 +54,63 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
54
54
|
const nativeATMeasurement = this.performanceClient.startMeasurement(NativeInteractionClientAcquireToken, this.correlationId);
|
|
55
55
|
const reqTimestamp = TimeUtils.nowSeconds();
|
|
56
56
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
57
|
+
// initialize native request (statically builds the request; does not contact the broker)
|
|
58
|
+
let nativeRequest;
|
|
57
59
|
try {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
nativeRequest = await this.initializePlatformRequest(request);
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
/*
|
|
64
|
+
* Request initialization (e.g. PoP token generation or authority
|
|
65
|
+
* resolution) failed before the broker was contacted, so end the
|
|
66
|
+
* measurement here to avoid an orphaned sub-measurement.
|
|
67
|
+
* Broker was never engaged, so this was not a native broker outcome.
|
|
68
|
+
*/
|
|
69
|
+
nativeATMeasurement.add({
|
|
70
|
+
isNativeBroker: false,
|
|
71
|
+
});
|
|
72
|
+
nativeATMeasurement.end({
|
|
73
|
+
success: false,
|
|
74
|
+
}, e);
|
|
75
|
+
throw e;
|
|
76
|
+
}
|
|
77
|
+
// check if the tokens can be retrieved from internal cache
|
|
78
|
+
try {
|
|
79
|
+
const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
|
|
80
|
+
// Served from the native internal cache; token did not come directly from the broker
|
|
81
|
+
nativeATMeasurement.add({
|
|
82
|
+
isNativeBroker: false,
|
|
83
|
+
});
|
|
84
|
+
nativeATMeasurement.end({
|
|
85
|
+
success: true,
|
|
86
|
+
fromCache: true,
|
|
87
|
+
});
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
92
|
+
this.logger.info("0eitbc", this.correlationId);
|
|
93
|
+
nativeATMeasurement.add({
|
|
65
94
|
isNativeBroker: false,
|
|
66
|
-
fromCache: true,
|
|
67
|
-
});
|
|
68
|
-
return result;
|
|
69
|
-
}
|
|
70
|
-
catch (e) {
|
|
71
|
-
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
72
|
-
this.logger.info("0eitbc", this.correlationId);
|
|
73
|
-
nativeATMeasurement.end({
|
|
74
|
-
success: false,
|
|
75
|
-
brokerErrorCode: "cache_request_failed",
|
|
76
|
-
});
|
|
77
|
-
throw e;
|
|
78
|
-
}
|
|
79
|
-
// continue with a native call for any and all errors
|
|
80
|
-
this.logger.info("0957j1", this.correlationId);
|
|
81
|
-
}
|
|
82
|
-
const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
|
|
83
|
-
return await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
|
|
84
|
-
.then((result) => {
|
|
85
|
-
nativeATMeasurement.end({
|
|
86
|
-
success: true,
|
|
87
|
-
isNativeBroker: true,
|
|
88
|
-
requestId: result.requestId,
|
|
89
95
|
});
|
|
90
|
-
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
91
|
-
return result;
|
|
92
|
-
})
|
|
93
|
-
.catch((error) => {
|
|
94
96
|
nativeATMeasurement.end({
|
|
95
97
|
success: false,
|
|
96
|
-
errorCode: error.errorCode,
|
|
97
|
-
subErrorCode: error.subError,
|
|
98
98
|
});
|
|
99
|
-
throw
|
|
99
|
+
throw e;
|
|
100
|
+
}
|
|
101
|
+
// continue with a native call for any and all errors
|
|
102
|
+
this.logger.info("0957j1", this.correlationId);
|
|
103
|
+
}
|
|
104
|
+
// dispatch the request to the broker
|
|
105
|
+
try {
|
|
106
|
+
const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
|
|
107
|
+
const result = await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp, request.storeInCache);
|
|
108
|
+
nativeATMeasurement.end({
|
|
109
|
+
success: true,
|
|
110
|
+
requestId: result.requestId,
|
|
100
111
|
});
|
|
112
|
+
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
113
|
+
return result;
|
|
101
114
|
}
|
|
102
115
|
catch (e) {
|
|
103
116
|
if (e instanceof NativeAuthError) {
|
|
@@ -105,10 +118,29 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
105
118
|
}
|
|
106
119
|
nativeATMeasurement.end({
|
|
107
120
|
success: false,
|
|
108
|
-
});
|
|
121
|
+
}, e);
|
|
122
|
+
this.setBrokerErrorTelemetry(e);
|
|
109
123
|
throw e;
|
|
110
124
|
}
|
|
111
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Records platform-broker error telemetry on the root event for the current
|
|
128
|
+
* correlationId. `isNativeBroker` is set optimistically to true because the
|
|
129
|
+
* broker was engaged; when the caller subsequently falls back to a web flow
|
|
130
|
+
* that succeeds, the root success measurement overrides it to false via
|
|
131
|
+
* `result.fromPlatformBroker`. Terminal broker errors (no fallback) retain
|
|
132
|
+
* true. `brokerErrorName`/`brokerErrorCode` are recorded when the error is an `AuthError`.
|
|
133
|
+
* @param error error thrown by the broker interaction
|
|
134
|
+
*/
|
|
135
|
+
setBrokerErrorTelemetry(error) {
|
|
136
|
+
if (error instanceof AuthError) {
|
|
137
|
+
this.performanceClient.addFields({
|
|
138
|
+
isNativeBroker: true,
|
|
139
|
+
brokerErrorName: error.name,
|
|
140
|
+
brokerErrorCode: error.errorCode,
|
|
141
|
+
}, this.correlationId);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
112
144
|
/**
|
|
113
145
|
* Creates silent flow request
|
|
114
146
|
* @param request
|
|
@@ -116,13 +148,18 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
116
148
|
* @returns CommonSilentFlowRequest
|
|
117
149
|
*/
|
|
118
150
|
createSilentCacheRequest(request, cachedAccount) {
|
|
119
|
-
|
|
151
|
+
const silentRequest = {
|
|
120
152
|
authority: request.authority,
|
|
121
153
|
correlationId: this.correlationId,
|
|
122
154
|
scopes: ScopeSet.fromString(request.scope, this.correlationId).asArray(),
|
|
123
155
|
account: cachedAccount,
|
|
124
156
|
forceRefresh: false,
|
|
125
157
|
};
|
|
158
|
+
// Preserve FMI partition semantics for silent cache filtering.
|
|
159
|
+
if (request.attributeTokens) {
|
|
160
|
+
silentRequest.attributeTokens = request.attributeTokens.split(" ");
|
|
161
|
+
}
|
|
162
|
+
return silentRequest;
|
|
126
163
|
}
|
|
127
164
|
/**
|
|
128
165
|
* Fetches the tokens from the cache if un-expired
|
|
@@ -180,11 +217,21 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
180
217
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
181
218
|
serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
182
219
|
if (isFatalNativeAuthError(e)) {
|
|
220
|
+
/*
|
|
221
|
+
* Fatal error on redirect initiate always falls back to a
|
|
222
|
+
* regular web redirect, so this request did not complete
|
|
223
|
+
* natively. Token telemetry for the eventual outcome lands
|
|
224
|
+
* in handleRedirectPromise (phase 2).
|
|
225
|
+
*/
|
|
226
|
+
this.setBrokerErrorTelemetry(e);
|
|
183
227
|
throw e;
|
|
184
228
|
}
|
|
185
229
|
}
|
|
186
230
|
}
|
|
187
|
-
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(
|
|
231
|
+
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify({
|
|
232
|
+
...nativeRequest,
|
|
233
|
+
storeInCache: request.storeInCache,
|
|
234
|
+
}), true);
|
|
188
235
|
const navigationOptions = {
|
|
189
236
|
apiId: ApiId.acquireTokenRedirect,
|
|
190
237
|
timeout: this.config.system.redirectNavigationTimeout,
|
|
@@ -214,7 +261,11 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
214
261
|
this.performanceClient?.addFields({ errorCode: "no_cached_request" }, this.correlationId);
|
|
215
262
|
return null;
|
|
216
263
|
}
|
|
217
|
-
|
|
264
|
+
/*
|
|
265
|
+
* storeInCache is a client-side cache directive persisted alongside the cached
|
|
266
|
+
* request (not a broker-contract parameter), so extract it here before resending.
|
|
267
|
+
*/
|
|
268
|
+
const { prompt, storeInCache, ...request } = cachedRequest;
|
|
218
269
|
if (prompt) {
|
|
219
270
|
this.logger.verbose("0ac34v", this.correlationId);
|
|
220
271
|
}
|
|
@@ -223,13 +274,13 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
223
274
|
try {
|
|
224
275
|
this.logger.verbose("003x5a", this.correlationId);
|
|
225
276
|
const response = await this.platformAuthProvider.sendMessage(request);
|
|
226
|
-
const authResult = await this.handleNativeResponse(response, request, reqTimestamp);
|
|
277
|
+
const authResult = await this.handleNativeResponse(response, request, reqTimestamp, storeInCache);
|
|
227
278
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
228
279
|
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
229
|
-
this.performanceClient?.addFields({ isNativeBroker: true }, this.correlationId);
|
|
230
280
|
return authResult;
|
|
231
281
|
}
|
|
232
282
|
catch (e) {
|
|
283
|
+
this.setBrokerErrorTelemetry(e);
|
|
233
284
|
throw e;
|
|
234
285
|
}
|
|
235
286
|
}
|
|
@@ -247,7 +298,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
247
298
|
* @param request
|
|
248
299
|
* @param reqTimestamp
|
|
249
300
|
*/
|
|
250
|
-
async handleNativeResponse(response, request, reqTimestamp) {
|
|
301
|
+
async handleNativeResponse(response, request, reqTimestamp, storeInCache) {
|
|
251
302
|
this.logger.trace("1bojln", this.correlationId);
|
|
252
303
|
// generate identifiers
|
|
253
304
|
const idTokenClaims = AuthToken.extractTokenClaims(response.id_token, base64Decode, this.correlationId);
|
|
@@ -276,8 +327,8 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
276
327
|
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
|
|
277
328
|
// cache accounts and tokens in the appropriate storage
|
|
278
329
|
await this.cacheAccount(baseAccount, AuthToken.isKmsi(idTokenClaims));
|
|
279
|
-
await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache() // environment
|
|
280
|
-
);
|
|
330
|
+
await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache(), // environment
|
|
331
|
+
storeInCache);
|
|
281
332
|
return result;
|
|
282
333
|
}
|
|
283
334
|
/**
|
|
@@ -398,7 +449,9 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
398
449
|
correlationId: this.correlationId,
|
|
399
450
|
state: response.state,
|
|
400
451
|
fromPlatformBroker: true,
|
|
401
|
-
...(request.resource && {
|
|
452
|
+
...(request.extraParameters?.resource && {
|
|
453
|
+
resource: request.extraParameters.resource,
|
|
454
|
+
}),
|
|
402
455
|
};
|
|
403
456
|
return result;
|
|
404
457
|
}
|
|
@@ -422,7 +475,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
422
475
|
* @param tenantId
|
|
423
476
|
* @param reqTimestamp
|
|
424
477
|
*/
|
|
425
|
-
async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment) {
|
|
478
|
+
async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment, storeInCache) {
|
|
426
479
|
const cachedIdToken = CacheHelpers.createIdTokenEntity(homeAccountIdentifier, environment, response.id_token || "", request.clientId, idTokenClaims.tid || "");
|
|
427
480
|
// cache accessToken in inmemory storage
|
|
428
481
|
const expiresIn = request.tokenType === Constants.AuthenticationScheme.POP
|
|
@@ -432,16 +485,21 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
432
485
|
: response.expires_in) || 0;
|
|
433
486
|
const tokenExpirationSeconds = reqTimestamp + expiresIn;
|
|
434
487
|
const responseScopes = this.generateScopes(response.scope, request.scope);
|
|
435
|
-
const
|
|
488
|
+
const additionalCacheKeyComponents = request.attributeTokens
|
|
489
|
+
? {
|
|
490
|
+
attribute_tokens: request.attributeTokens,
|
|
491
|
+
}
|
|
492
|
+
: undefined;
|
|
493
|
+
const cachedAccessToken = CacheHelpers.createAccessTokenEntity(homeAccountIdentifier, environment, response.access_token, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, request.correlationId, undefined, request.tokenType, undefined, request.keyId, additionalCacheKeyComponents);
|
|
436
494
|
// save idtoken credential in configured browser storage
|
|
437
|
-
if (!!cachedIdToken &&
|
|
495
|
+
if (!!cachedIdToken && storeInCache?.idToken !== false) {
|
|
438
496
|
await this.browserStorage.setIdTokenCredential(cachedIdToken, this.correlationId, AuthToken.isKmsi(idTokenClaims));
|
|
439
497
|
}
|
|
440
498
|
// save access token credential in memory storage
|
|
441
499
|
const nativeCacheRecord = {
|
|
442
500
|
accessToken: cachedAccessToken,
|
|
443
501
|
};
|
|
444
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, AuthToken.isKmsi(idTokenClaims), this.apiId,
|
|
502
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, AuthToken.isKmsi(idTokenClaims), this.apiId, storeInCache);
|
|
445
503
|
}
|
|
446
504
|
getExpiresInValue(tokenType, expiresIn) {
|
|
447
505
|
return tokenType === Constants.AuthenticationScheme.POP
|
|
@@ -513,13 +571,19 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
513
571
|
const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
|
|
514
572
|
? undefined
|
|
515
573
|
: this.config.auth.clientCapabilities;
|
|
516
|
-
|
|
517
|
-
|
|
574
|
+
/*
|
|
575
|
+
* scopes are expected to be received by the native broker as "scope" and will be added to the request below. Other properties that should be dropped from the request to the native broker can be included in the object destructuring here.
|
|
576
|
+
* attributeTokens is destructured out because PlatformAuthRequest represents it as a pre-serialized string, not the caller-provided Array<string>.
|
|
577
|
+
*/
|
|
578
|
+
const { scopes, claims } = request;
|
|
518
579
|
const scopeSet = new ScopeSet(scopes || [], this.correlationId);
|
|
519
580
|
scopeSet.appendScopes(Constants.OIDC_DEFAULT_SCOPES);
|
|
520
581
|
const mergedClaims = RequestParameterBuilder.buildMergedClaims(claims, configClaims?.length ? configClaims : undefined);
|
|
582
|
+
const hasAttributeTokens = !!request.attributeTokens?.length;
|
|
583
|
+
this.performanceClient?.addFields({
|
|
584
|
+
hasAttributeTokens,
|
|
585
|
+
}, this.correlationId);
|
|
521
586
|
const validatedRequest = {
|
|
522
|
-
...remainingProperties,
|
|
523
587
|
claims: mergedClaims,
|
|
524
588
|
accountId: this.accountId,
|
|
525
589
|
clientId: this.config.auth.clientId,
|
|
@@ -528,19 +592,32 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
528
592
|
redirectUri: getRedirectUri(request.redirectUri, this.config.auth.redirectUri, this.logger, this.correlationId),
|
|
529
593
|
prompt: this.getPrompt(request.prompt),
|
|
530
594
|
correlationId: this.correlationId,
|
|
595
|
+
isSts: false,
|
|
531
596
|
tokenType: request.authenticationScheme,
|
|
532
597
|
windowTitleSubstring: document.title,
|
|
598
|
+
nonce: request.nonce,
|
|
599
|
+
state: request.state,
|
|
600
|
+
loginHint: request.loginHint,
|
|
533
601
|
extraParameters: {
|
|
534
602
|
...request.extraParameters,
|
|
603
|
+
...(request.resource && { resource: request.resource }), // resource is set for MCP scenarios
|
|
535
604
|
},
|
|
536
605
|
extendedExpiryToken: false,
|
|
537
606
|
keyId: request.popKid,
|
|
607
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
608
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
609
|
+
shrClaims: request.shrClaims,
|
|
610
|
+
shrNonce: request.shrNonce,
|
|
538
611
|
};
|
|
612
|
+
if (hasAttributeTokens) {
|
|
613
|
+
validatedRequest.attributeTokens =
|
|
614
|
+
CacheHelpers.serializeAttributeTokens(request.attributeTokens);
|
|
615
|
+
}
|
|
539
616
|
// Check for PoP token requests: signPopToken should only be set to true if popKid is not set
|
|
540
617
|
if (validatedRequest.signPopToken && !!request.popKid) {
|
|
541
618
|
throw createBrowserAuthError(invalidPopTokenRequest, this.correlationId);
|
|
542
619
|
}
|
|
543
|
-
this.handleExtraBrokerParams(validatedRequest);
|
|
620
|
+
this.handleExtraBrokerParams(validatedRequest, request.embeddedClientId);
|
|
544
621
|
validatedRequest.extraParameters =
|
|
545
622
|
validatedRequest.extraParameters || {};
|
|
546
623
|
validatedRequest.extraParameters.telemetry =
|
|
@@ -615,19 +692,19 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
615
692
|
* @param request {PlatformAuthRequest}
|
|
616
693
|
* @private
|
|
617
694
|
*/
|
|
618
|
-
handleExtraBrokerParams(request) {
|
|
695
|
+
handleExtraBrokerParams(request, embeddedClientId) {
|
|
619
696
|
const hasExtraBrokerParams = request.extraParameters &&
|
|
620
697
|
request.extraParameters.hasOwnProperty(AADServerParamKeys.BROKER_CLIENT_ID) &&
|
|
621
698
|
request.extraParameters.hasOwnProperty(AADServerParamKeys.BROKER_REDIRECT_URI) &&
|
|
622
699
|
request.extraParameters.hasOwnProperty(AADServerParamKeys.CLIENT_ID);
|
|
623
|
-
if (!
|
|
700
|
+
if (!embeddedClientId && !hasExtraBrokerParams) {
|
|
624
701
|
return;
|
|
625
702
|
}
|
|
626
703
|
let child_client_id = "";
|
|
627
704
|
const child_redirect_uri = request.redirectUri;
|
|
628
|
-
if (
|
|
705
|
+
if (embeddedClientId) {
|
|
629
706
|
request.redirectUri = this.config.auth.redirectUri;
|
|
630
|
-
child_client_id =
|
|
707
|
+
child_client_id = embeddedClientId;
|
|
631
708
|
}
|
|
632
709
|
else if (request.extraParameters) {
|
|
633
710
|
request.redirectUri =
|
|
@@ -635,7 +712,15 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
635
712
|
child_client_id =
|
|
636
713
|
request.extraParameters[AADServerParamKeys.CLIENT_ID];
|
|
637
714
|
}
|
|
715
|
+
const {
|
|
716
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
717
|
+
[AADServerParamKeys.BROKER_CLIENT_ID]: _brkClientId,
|
|
718
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
719
|
+
[AADServerParamKeys.BROKER_REDIRECT_URI]: _brkRedirectUri,
|
|
720
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
721
|
+
[AADServerParamKeys.CLIENT_ID]: _clientId, ...remainingExtraParameters } = request.extraParameters || {};
|
|
638
722
|
request.extraParameters = {
|
|
723
|
+
...remainingExtraParameters,
|
|
639
724
|
child_client_id,
|
|
640
725
|
child_redirect_uri,
|
|
641
726
|
};
|