@azure/msal-browser 5.26.0 → 5.27.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/README.md +2 -0
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +54 -14
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +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 +32 -4
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +36 -5
- 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/crypto/TokenBindingKeyManager.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/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.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/interaction_client/v2/FlowInteractionClientV2.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.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/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.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/FlowApiIdHelperV2.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/auth_flow/v2/state/NewPasswordRequiredStateV2.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/auth_flow/v2/state/PasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.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/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.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 +1 -1
- package/dist/interaction_client/PopupClient.mjs +28 -1
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +2 -3
- package/dist/interaction_client/RedirectClient.mjs.map +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 +7 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +23 -3
- 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 +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +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 +23 -13
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/request/SilentRequestHelpers.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/BrowserDetection.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +7 -2
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +81 -0
- package/dist/utils/IframeMonitor.mjs.map +1 -0
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +119 -0
- package/dist/utils/PopupMonitor.mjs.map +1 -0
- package/dist/utils/PopupOriginCheck.mjs +88 -0
- package/dist/utils/PopupOriginCheck.mjs.map +1 -0
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +23 -3
- package/lib/custom-auth-path/msal-custom-auth.cjs +617 -122
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +617 -122
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +23 -3
- package/lib/msal-browser.cjs +614 -128
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +614 -128
- 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/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/app/PublicClientApplication.ts +108 -8
- package/src/config/Configuration.ts +63 -6
- package/src/controllers/StandardController.ts +46 -3
- package/src/interaction_client/PopupClient.ts +36 -0
- package/src/interaction_client/RedirectClient.ts +0 -1
- package/src/interaction_client/StandardInteractionClient.ts +6 -0
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +34 -28
- package/src/utils/BrowserUtils.ts +8 -1
- package/src/utils/IframeMonitor.ts +98 -0
- package/src/utils/PopupMonitor.ts +158 -0
- package/src/utils/PopupOriginCheck.ts +94 -0
- package/types/app/PublicClientApplication.d.ts +6 -4
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +16 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/interaction_client/PopupClient.d.ts +12 -0
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/utils/BrowserUtils.d.ts +2 -1
- package/types/utils/BrowserUtils.d.ts.map +1 -1
- package/types/utils/IframeMonitor.d.ts +17 -0
- package/types/utils/IframeMonitor.d.ts.map +1 -0
- package/types/utils/PopupMonitor.d.ts +37 -0
- package/types/utils/PopupMonitor.d.ts.map +1 -0
- package/types/utils/PopupOriginCheck.d.ts +27 -0
- package/types/utils/PopupOriginCheck.d.ts.map +1 -0
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.27.0 2026-10-27 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v16.
|
|
5
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -54,9 +54,15 @@ const EAR_JWK = "ear_jwk";
|
|
|
54
54
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
55
55
|
const RESOURCE = "resource";
|
|
56
56
|
const CLI_DATA = "clidata";
|
|
57
|
-
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
57
|
+
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
58
|
+
/**
|
|
59
|
+
* Popup-origin-check-done. Signals to the STS that the client verified the
|
|
60
|
+
* popup cannot be reached by an untrusted window, so the
|
|
61
|
+
* Cross-Origin-Opener-Policy response header may be omitted.
|
|
62
|
+
*/
|
|
63
|
+
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
58
64
|
|
|
59
|
-
/*! @azure/msal-common v16.
|
|
65
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
60
66
|
/*
|
|
61
67
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
62
68
|
* Licensed under the MIT License.
|
|
@@ -295,7 +301,7 @@ const JsonWebTokenTypes$1 = {
|
|
|
295
301
|
// Token renewal offset default in seconds
|
|
296
302
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
297
303
|
|
|
298
|
-
/*! @azure/msal-common v16.
|
|
304
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
299
305
|
/*
|
|
300
306
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
301
307
|
* Licensed under the MIT License.
|
|
@@ -324,7 +330,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
324
330
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
325
331
|
}
|
|
326
332
|
|
|
327
|
-
/*! @azure/msal-common v16.
|
|
333
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
328
334
|
|
|
329
335
|
/*
|
|
330
336
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -347,7 +353,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
347
353
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
348
354
|
}
|
|
349
355
|
|
|
350
|
-
/*! @azure/msal-common v16.
|
|
356
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
351
357
|
/*
|
|
352
358
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
353
359
|
* Licensed under the MIT License.
|
|
@@ -433,7 +439,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
433
439
|
userCanceled: userCanceled
|
|
434
440
|
});
|
|
435
441
|
|
|
436
|
-
/*! @azure/msal-common v16.
|
|
442
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
437
443
|
|
|
438
444
|
/*
|
|
439
445
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -471,7 +477,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
471
477
|
};
|
|
472
478
|
}
|
|
473
479
|
|
|
474
|
-
/*! @azure/msal-common v16.
|
|
480
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
475
481
|
|
|
476
482
|
/*
|
|
477
483
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -537,7 +543,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
537
543
|
return matches[2];
|
|
538
544
|
}
|
|
539
545
|
|
|
540
|
-
/*! @azure/msal-common v16.
|
|
546
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
541
547
|
|
|
542
548
|
/*
|
|
543
549
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -625,7 +631,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
625
631
|
return updatedAccountInfo;
|
|
626
632
|
}
|
|
627
633
|
|
|
628
|
-
/*! @azure/msal-common v16.
|
|
634
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
629
635
|
/*
|
|
630
636
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
631
637
|
* Licensed under the MIT License.
|
|
@@ -639,7 +645,7 @@ const AuthorityType = {
|
|
|
639
645
|
Ciam: 3,
|
|
640
646
|
};
|
|
641
647
|
|
|
642
|
-
/*! @azure/msal-common v16.
|
|
648
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
643
649
|
/*
|
|
644
650
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
645
651
|
* Licensed under the MIT License.
|
|
@@ -661,7 +667,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
661
667
|
return null;
|
|
662
668
|
}
|
|
663
669
|
|
|
664
|
-
/*! @azure/msal-common v16.
|
|
670
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
665
671
|
/*
|
|
666
672
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
667
673
|
* Licensed under the MIT License.
|
|
@@ -685,7 +691,7 @@ const ProtocolMode = {
|
|
|
685
691
|
EAR: "EAR",
|
|
686
692
|
};
|
|
687
693
|
|
|
688
|
-
/*! @azure/msal-common v16.
|
|
694
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
689
695
|
/**
|
|
690
696
|
* Returns the AccountInfo interface for this account.
|
|
691
697
|
* @internal
|
|
@@ -874,7 +880,7 @@ function isAccountEntity(entity) {
|
|
|
874
880
|
entity.hasOwnProperty("authorityType"));
|
|
875
881
|
}
|
|
876
882
|
|
|
877
|
-
/*! @azure/msal-common v16.
|
|
883
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
878
884
|
/*
|
|
879
885
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
880
886
|
* Licensed under the MIT License.
|
|
@@ -891,7 +897,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
891
897
|
unexpectedError: unexpectedError
|
|
892
898
|
});
|
|
893
899
|
|
|
894
|
-
/*! @azure/msal-common v16.
|
|
900
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
895
901
|
|
|
896
902
|
/*
|
|
897
903
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -911,7 +917,47 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
911
917
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
912
918
|
}
|
|
913
919
|
|
|
914
|
-
/*! @azure/msal-common v16.
|
|
920
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
921
|
+
/*
|
|
922
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
923
|
+
* Licensed under the MIT License.
|
|
924
|
+
*/
|
|
925
|
+
// Track only our normalized copies, never caller-owned mutable inputs.
|
|
926
|
+
const normalizedHeaderRecords = new WeakSet();
|
|
927
|
+
/**
|
|
928
|
+
* Creates a lowercase-keyed snapshot without changing header values or the input.
|
|
929
|
+
* Reuses snapshots produced by this function to avoid repeated normalization.
|
|
930
|
+
* @internal
|
|
931
|
+
*/
|
|
932
|
+
function normalizeResponseHeaders(headers) {
|
|
933
|
+
if (normalizedHeaderRecords.has(headers)) {
|
|
934
|
+
return headers;
|
|
935
|
+
}
|
|
936
|
+
const normalized = Object.fromEntries(Object.entries(headers).map(([name, value]) => [
|
|
937
|
+
name.toLowerCase(),
|
|
938
|
+
value,
|
|
939
|
+
]));
|
|
940
|
+
normalizedHeaderRecords.add(normalized);
|
|
941
|
+
return normalized;
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Reads a response header case-insensitively.
|
|
945
|
+
* Normalized snapshots are never scanned, even when a header is missing.
|
|
946
|
+
* @internal
|
|
947
|
+
*/
|
|
948
|
+
function getResponseHeader(headers, name) {
|
|
949
|
+
const key = name.toLowerCase();
|
|
950
|
+
if (Object.prototype.hasOwnProperty.call(headers, key)) {
|
|
951
|
+
return headers[key];
|
|
952
|
+
}
|
|
953
|
+
if (normalizedHeaderRecords.has(headers)) {
|
|
954
|
+
return undefined;
|
|
955
|
+
}
|
|
956
|
+
const headerName = Object.keys(headers).find((header) => header.toLowerCase() === key);
|
|
957
|
+
return headerName === undefined ? undefined : headers[headerName];
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
915
961
|
/*
|
|
916
962
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
917
963
|
* Licensed under the MIT License.
|
|
@@ -981,7 +1027,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
981
1027
|
urlParseError: urlParseError
|
|
982
1028
|
});
|
|
983
1029
|
|
|
984
|
-
/*! @azure/msal-common v16.
|
|
1030
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
985
1031
|
|
|
986
1032
|
/*
|
|
987
1033
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -992,8 +1038,9 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
992
1038
|
* header challenge values that can be used outside the basic authorization flows.
|
|
993
1039
|
*/
|
|
994
1040
|
class AuthenticationHeaderParser {
|
|
1041
|
+
/** Captures a case-insensitive snapshot of the response headers. */
|
|
995
1042
|
constructor(headers) {
|
|
996
|
-
this.headers = headers;
|
|
1043
|
+
this.headers = normalizeResponseHeaders(headers);
|
|
997
1044
|
}
|
|
998
1045
|
/**
|
|
999
1046
|
* This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
|
|
@@ -1001,7 +1048,7 @@ class AuthenticationHeaderParser {
|
|
|
1001
1048
|
*/
|
|
1002
1049
|
getShrNonce() {
|
|
1003
1050
|
// Attempt to parse nonce from Authentiacation-Info
|
|
1004
|
-
const authenticationInfo = this.headers
|
|
1051
|
+
const authenticationInfo = getResponseHeader(this.headers, HeaderNames.AuthenticationInfo);
|
|
1005
1052
|
if (authenticationInfo) {
|
|
1006
1053
|
const authenticationInfoChallenges = this.parseChallenges(authenticationInfo);
|
|
1007
1054
|
if (authenticationInfoChallenges.nextnonce) {
|
|
@@ -1010,7 +1057,7 @@ class AuthenticationHeaderParser {
|
|
|
1010
1057
|
throw createClientConfigurationError(invalidAuthenticationHeader, "");
|
|
1011
1058
|
}
|
|
1012
1059
|
// Attempt to parse nonce from WWW-Authenticate
|
|
1013
|
-
const wwwAuthenticate = this.headers
|
|
1060
|
+
const wwwAuthenticate = getResponseHeader(this.headers, HeaderNames.WWWAuthenticate);
|
|
1014
1061
|
if (wwwAuthenticate) {
|
|
1015
1062
|
const wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate);
|
|
1016
1063
|
if (wwwAuthenticateChallenges.nonce) {
|
|
@@ -1039,7 +1086,7 @@ class AuthenticationHeaderParser {
|
|
|
1039
1086
|
}
|
|
1040
1087
|
}
|
|
1041
1088
|
|
|
1042
|
-
/*! @azure/msal-common v16.
|
|
1089
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1043
1090
|
/*
|
|
1044
1091
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1045
1092
|
* Licensed under the MIT License.
|
|
@@ -1051,7 +1098,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
1051
1098
|
response.hasOwnProperty("jwks_uri"));
|
|
1052
1099
|
}
|
|
1053
1100
|
|
|
1054
|
-
/*! @azure/msal-common v16.
|
|
1101
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1055
1102
|
/*
|
|
1056
1103
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1057
1104
|
* Licensed under the MIT License.
|
|
@@ -1131,7 +1178,7 @@ class StringUtils {
|
|
|
1131
1178
|
}
|
|
1132
1179
|
}
|
|
1133
1180
|
|
|
1134
|
-
/*! @azure/msal-common v16.
|
|
1181
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1135
1182
|
|
|
1136
1183
|
/*
|
|
1137
1184
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1289,7 +1336,7 @@ class UrlString {
|
|
|
1289
1336
|
}
|
|
1290
1337
|
}
|
|
1291
1338
|
|
|
1292
|
-
/*! @azure/msal-common v16.
|
|
1339
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1293
1340
|
|
|
1294
1341
|
/*
|
|
1295
1342
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1443,7 +1490,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1443
1490
|
return null;
|
|
1444
1491
|
}
|
|
1445
1492
|
|
|
1446
|
-
/*! @azure/msal-common v16.
|
|
1493
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1447
1494
|
/*
|
|
1448
1495
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1449
1496
|
* Licensed under the MIT License.
|
|
@@ -1461,7 +1508,7 @@ const AzureCloudInstance = {
|
|
|
1461
1508
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1462
1509
|
};
|
|
1463
1510
|
|
|
1464
|
-
/*! @azure/msal-common v16.
|
|
1511
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1465
1512
|
/*
|
|
1466
1513
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1467
1514
|
* Licensed under the MIT License.
|
|
@@ -1471,7 +1518,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1471
1518
|
response.hasOwnProperty("metadata"));
|
|
1472
1519
|
}
|
|
1473
1520
|
|
|
1474
|
-
/*! @azure/msal-common v16.
|
|
1521
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1475
1522
|
/*
|
|
1476
1523
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1477
1524
|
* Licensed under the MIT License.
|
|
@@ -1481,7 +1528,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1481
1528
|
response.hasOwnProperty("error_description"));
|
|
1482
1529
|
}
|
|
1483
1530
|
|
|
1484
|
-
/*! @azure/msal-common v16.
|
|
1531
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1485
1532
|
/*
|
|
1486
1533
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1487
1534
|
* Licensed under the MIT License.
|
|
@@ -1552,7 +1599,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1552
1599
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1553
1600
|
const SetUserData = "setUserData";
|
|
1554
1601
|
|
|
1555
|
-
/*! @azure/msal-common v16.
|
|
1602
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1556
1603
|
/*
|
|
1557
1604
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1558
1605
|
* Licensed under the MIT License.
|
|
@@ -1645,7 +1692,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1645
1692
|
};
|
|
1646
1693
|
};
|
|
1647
1694
|
|
|
1648
|
-
/*! @azure/msal-common v16.
|
|
1695
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1649
1696
|
|
|
1650
1697
|
/*
|
|
1651
1698
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1756,7 +1803,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1756
1803
|
},
|
|
1757
1804
|
};
|
|
1758
1805
|
|
|
1759
|
-
/*! @azure/msal-common v16.
|
|
1806
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1760
1807
|
/*
|
|
1761
1808
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1762
1809
|
* Licensed under the MIT License.
|
|
@@ -1821,7 +1868,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1821
1868
|
return cachedAtSec > nowSeconds();
|
|
1822
1869
|
}
|
|
1823
1870
|
|
|
1824
|
-
/*! @azure/msal-common v16.
|
|
1871
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1825
1872
|
|
|
1826
1873
|
/*
|
|
1827
1874
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2108,7 +2155,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
2108
2155
|
return [...attributeTokens].sort().join(" ");
|
|
2109
2156
|
}
|
|
2110
2157
|
|
|
2111
|
-
/*! @azure/msal-common v16.
|
|
2158
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
2112
2159
|
|
|
2113
2160
|
/*
|
|
2114
2161
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3076,7 +3123,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3076
3123
|
};
|
|
3077
3124
|
}
|
|
3078
3125
|
|
|
3079
|
-
/*! @azure/msal-common v16.
|
|
3126
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3080
3127
|
|
|
3081
3128
|
/*
|
|
3082
3129
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3110,7 +3157,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3110
3157
|
}
|
|
3111
3158
|
}
|
|
3112
3159
|
|
|
3113
|
-
/*! @azure/msal-common v16.
|
|
3160
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3114
3161
|
|
|
3115
3162
|
/*
|
|
3116
3163
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3306,7 +3353,7 @@ class ScopeSet {
|
|
|
3306
3353
|
}
|
|
3307
3354
|
}
|
|
3308
3355
|
|
|
3309
|
-
/*! @azure/msal-common v16.
|
|
3356
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3310
3357
|
|
|
3311
3358
|
/*
|
|
3312
3359
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3587,6 +3634,20 @@ function addInstanceAware(parameters) {
|
|
|
3587
3634
|
parameters.set(INSTANCE_AWARE, "true");
|
|
3588
3635
|
}
|
|
3589
3636
|
}
|
|
3637
|
+
/**
|
|
3638
|
+
* Adds `pocd=1`, telling the STS that the client verified the popup driving
|
|
3639
|
+
* this request cannot be reached by an untrusted window, so the
|
|
3640
|
+
* Cross-Origin-Opener-Policy response header may be omitted.
|
|
3641
|
+
*
|
|
3642
|
+
* Only ever added when the check passed — a negative result is signalled by
|
|
3643
|
+
* omitting the parameter, which keeps the STS default (apply COOP) and stays
|
|
3644
|
+
* compatible with library versions that never send it.
|
|
3645
|
+
*/
|
|
3646
|
+
function addPopupOriginCheckDone(parameters) {
|
|
3647
|
+
if (!parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
|
|
3648
|
+
parameters.set(POPUP_ORIGIN_CHECK_DONE, "1");
|
|
3649
|
+
}
|
|
3650
|
+
}
|
|
3590
3651
|
/**
|
|
3591
3652
|
* Add extraParameters
|
|
3592
3653
|
* @param extraParams - String dictionary containing extra parameters to be added.
|
|
@@ -3792,7 +3853,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3792
3853
|
}
|
|
3793
3854
|
}
|
|
3794
3855
|
|
|
3795
|
-
/*! @azure/msal-common v16.
|
|
3856
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3796
3857
|
|
|
3797
3858
|
/*
|
|
3798
3859
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3813,7 +3874,8 @@ function stripLeadingHashOrQuery(responseString) {
|
|
|
3813
3874
|
return responseString;
|
|
3814
3875
|
}
|
|
3815
3876
|
/**
|
|
3816
|
-
* Returns
|
|
3877
|
+
* Returns flat fragment or query parameters as an authorization response.
|
|
3878
|
+
* Application routes and unrecognized responses return null.
|
|
3817
3879
|
*/
|
|
3818
3880
|
function getDeserializedResponse(responseString) {
|
|
3819
3881
|
// Check if given hash is empty
|
|
@@ -3823,7 +3885,15 @@ function getDeserializedResponse(responseString) {
|
|
|
3823
3885
|
try {
|
|
3824
3886
|
// Strip the # or ? symbol if present
|
|
3825
3887
|
const normalizedResponse = stripLeadingHashOrQuery(responseString);
|
|
3826
|
-
|
|
3888
|
+
/*
|
|
3889
|
+
* Require a flat parameter name, not an application route.
|
|
3890
|
+
* Reject routes like #/dashboard?tab=orders&code=... and
|
|
3891
|
+
* #/dashboard/orders&state=..., where ?, /, or # appears before
|
|
3892
|
+
* the first = or &. These characters are allowed in parameter values.
|
|
3893
|
+
*/
|
|
3894
|
+
if (!/^[^=&?#/]+(?:=|&|$)/.test(normalizedResponse)) {
|
|
3895
|
+
return null;
|
|
3896
|
+
}
|
|
3827
3897
|
const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));
|
|
3828
3898
|
// Check for known response properties
|
|
3829
3899
|
if (deserializedHash.code ||
|
|
@@ -3914,7 +3984,7 @@ function validateUrl(url, logger, correlationId) {
|
|
|
3914
3984
|
}
|
|
3915
3985
|
}
|
|
3916
3986
|
|
|
3917
|
-
/*! @azure/msal-common v16.
|
|
3987
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3918
3988
|
|
|
3919
3989
|
/*
|
|
3920
3990
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3962,7 +4032,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3962
4032
|
},
|
|
3963
4033
|
};
|
|
3964
4034
|
|
|
3965
|
-
/*! @azure/msal-common v16.
|
|
4035
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3966
4036
|
|
|
3967
4037
|
/*
|
|
3968
4038
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3985,7 +4055,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
3985
4055
|
},
|
|
3986
4056
|
};
|
|
3987
4057
|
|
|
3988
|
-
/*! @azure/msal-common v16.
|
|
4058
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3989
4059
|
/*
|
|
3990
4060
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3991
4061
|
* Licensed under the MIT License.
|
|
@@ -4274,12 +4344,12 @@ class Logger {
|
|
|
4274
4344
|
}
|
|
4275
4345
|
}
|
|
4276
4346
|
|
|
4277
|
-
/*! @azure/msal-common v16.
|
|
4347
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4278
4348
|
/* eslint-disable header/header */
|
|
4279
4349
|
const name$1 = "@azure/msal-common";
|
|
4280
|
-
const version$1 = "16.
|
|
4350
|
+
const version$1 = "16.15.0";
|
|
4281
4351
|
|
|
4282
|
-
/*! @azure/msal-common v16.
|
|
4352
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4283
4353
|
/*
|
|
4284
4354
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4285
4355
|
* Licensed under the MIT License.
|
|
@@ -4287,7 +4357,7 @@ const version$1 = "16.14.3";
|
|
|
4287
4357
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4288
4358
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4289
4359
|
|
|
4290
|
-
/*! @azure/msal-common v16.
|
|
4360
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4291
4361
|
|
|
4292
4362
|
/*
|
|
4293
4363
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4325,7 +4395,7 @@ function createCacheError(e) {
|
|
|
4325
4395
|
}
|
|
4326
4396
|
}
|
|
4327
4397
|
|
|
4328
|
-
/*! @azure/msal-common v16.
|
|
4398
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4329
4399
|
|
|
4330
4400
|
/*
|
|
4331
4401
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5513,7 +5583,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5513
5583
|
}
|
|
5514
5584
|
}
|
|
5515
5585
|
|
|
5516
|
-
/*! @azure/msal-common v16.
|
|
5586
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5517
5587
|
/*
|
|
5518
5588
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5519
5589
|
* Licensed under the MIT License.
|
|
@@ -5578,7 +5648,7 @@ const IntFields = new Set([
|
|
|
5578
5648
|
"fetchRetryCount",
|
|
5579
5649
|
]);
|
|
5580
5650
|
|
|
5581
|
-
/*! @azure/msal-common v16.
|
|
5651
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5582
5652
|
|
|
5583
5653
|
/*
|
|
5584
5654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5636,7 +5706,7 @@ class StubPerformanceClient {
|
|
|
5636
5706
|
}
|
|
5637
5707
|
}
|
|
5638
5708
|
|
|
5639
|
-
/*! @azure/msal-common v16.
|
|
5709
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5640
5710
|
|
|
5641
5711
|
/*
|
|
5642
5712
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5734,7 +5804,7 @@ function isOidcProtocolMode(config) {
|
|
|
5734
5804
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5735
5805
|
}
|
|
5736
5806
|
|
|
5737
|
-
/*! @azure/msal-common v16.
|
|
5807
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5738
5808
|
/*
|
|
5739
5809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5740
5810
|
* Licensed under the MIT License.
|
|
@@ -5761,7 +5831,7 @@ function isOidcProtocolMode(config) {
|
|
|
5761
5831
|
}
|
|
5762
5832
|
}
|
|
5763
5833
|
|
|
5764
|
-
/*! @azure/msal-common v16.
|
|
5834
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5765
5835
|
|
|
5766
5836
|
/*
|
|
5767
5837
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5782,7 +5852,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5782
5852
|
return new JoseHeaderError(code, correlationId);
|
|
5783
5853
|
}
|
|
5784
5854
|
|
|
5785
|
-
/*! @azure/msal-common v16.
|
|
5855
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5786
5856
|
/*
|
|
5787
5857
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5788
5858
|
* Licensed under the MIT License.
|
|
@@ -5807,7 +5877,7 @@ function isPlainObject(value) {
|
|
|
5807
5877
|
return Object.getPrototypeOf(value) === proto;
|
|
5808
5878
|
}
|
|
5809
5879
|
|
|
5810
|
-
/*! @azure/msal-common v16.
|
|
5880
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5811
5881
|
/*
|
|
5812
5882
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5813
5883
|
* Licensed under the MIT License.
|
|
@@ -5817,7 +5887,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5817
5887
|
const missingJwkError = "missing_jwk_error";
|
|
5818
5888
|
const invalidJwkError = "invalid_jwk_error";
|
|
5819
5889
|
|
|
5820
|
-
/*! @azure/msal-common v16.
|
|
5890
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5821
5891
|
|
|
5822
5892
|
/*
|
|
5823
5893
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5883,7 +5953,7 @@ class JoseHeader {
|
|
|
5883
5953
|
}
|
|
5884
5954
|
}
|
|
5885
5955
|
|
|
5886
|
-
/*! @azure/msal-common v16.
|
|
5956
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5887
5957
|
|
|
5888
5958
|
/*
|
|
5889
5959
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5984,7 +6054,7 @@ class PopTokenGenerator {
|
|
|
5984
6054
|
}
|
|
5985
6055
|
}
|
|
5986
6056
|
|
|
5987
|
-
/*! @azure/msal-common v16.
|
|
6057
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5988
6058
|
|
|
5989
6059
|
/*
|
|
5990
6060
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6129,7 +6199,7 @@ class DpopProofGenerator {
|
|
|
6129
6199
|
}
|
|
6130
6200
|
}
|
|
6131
6201
|
|
|
6132
|
-
/*! @azure/msal-common v16.
|
|
6202
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6133
6203
|
/*
|
|
6134
6204
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6135
6205
|
* Licensed under the MIT License.
|
|
@@ -6193,7 +6263,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6193
6263
|
uiNotAllowed: uiNotAllowed
|
|
6194
6264
|
});
|
|
6195
6265
|
|
|
6196
|
-
/*! @azure/msal-common v16.
|
|
6266
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6197
6267
|
|
|
6198
6268
|
/*
|
|
6199
6269
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6260,7 +6330,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6260
6330
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6261
6331
|
}
|
|
6262
6332
|
|
|
6263
|
-
/*! @azure/msal-common v16.
|
|
6333
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6264
6334
|
|
|
6265
6335
|
/*
|
|
6266
6336
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6279,7 +6349,7 @@ class ServerError extends AuthError {
|
|
|
6279
6349
|
}
|
|
6280
6350
|
}
|
|
6281
6351
|
|
|
6282
|
-
/*! @azure/msal-common v16.
|
|
6352
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6283
6353
|
|
|
6284
6354
|
/*
|
|
6285
6355
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6350,7 +6420,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6350
6420
|
}
|
|
6351
6421
|
}
|
|
6352
6422
|
|
|
6353
|
-
/*! @azure/msal-common v16.
|
|
6423
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6354
6424
|
|
|
6355
6425
|
/*
|
|
6356
6426
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6778,7 +6848,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6778
6848
|
return baseAccount;
|
|
6779
6849
|
}
|
|
6780
6850
|
|
|
6781
|
-
/*! @azure/msal-common v16.
|
|
6851
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6782
6852
|
/*
|
|
6783
6853
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6784
6854
|
* Licensed under the MIT License.
|
|
@@ -6788,7 +6858,7 @@ const CcsCredentialType = {
|
|
|
6788
6858
|
UPN: "UPN",
|
|
6789
6859
|
};
|
|
6790
6860
|
|
|
6791
|
-
/*! @azure/msal-common v16.
|
|
6861
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6792
6862
|
/*
|
|
6793
6863
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6794
6864
|
* Licensed under the MIT License.
|
|
@@ -6807,7 +6877,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6807
6877
|
}
|
|
6808
6878
|
}
|
|
6809
6879
|
|
|
6810
|
-
/*! @azure/msal-common v16.
|
|
6880
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6811
6881
|
|
|
6812
6882
|
/*
|
|
6813
6883
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6831,7 +6901,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6831
6901
|
};
|
|
6832
6902
|
}
|
|
6833
6903
|
|
|
6834
|
-
/*! @azure/msal-common v16.
|
|
6904
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6835
6905
|
|
|
6836
6906
|
/*
|
|
6837
6907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6866,13 +6936,14 @@ class ThrottlingUtils {
|
|
|
6866
6936
|
* Performs necessary throttling checks after a network request.
|
|
6867
6937
|
* @param cacheManager
|
|
6868
6938
|
* @param thumbprint
|
|
6869
|
-
* @param response
|
|
6939
|
+
* @param response - Token response with case-insensitive header names.
|
|
6870
6940
|
*/
|
|
6871
6941
|
static postProcess(cacheManager, thumbprint, response, correlationId) {
|
|
6942
|
+
const retryAfter = getRetryAfterHeader(response);
|
|
6872
6943
|
if (ThrottlingUtils.checkResponseStatus(response) ||
|
|
6873
|
-
|
|
6944
|
+
retryAfter !== undefined) {
|
|
6874
6945
|
const thumbprintValue = {
|
|
6875
|
-
throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(
|
|
6946
|
+
throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(retryAfter || "")),
|
|
6876
6947
|
error: response.body.error,
|
|
6877
6948
|
errorCodes: response.body.error_codes,
|
|
6878
6949
|
errorMessage: response.body.error_description,
|
|
@@ -6891,14 +6962,10 @@ class ThrottlingUtils {
|
|
|
6891
6962
|
}
|
|
6892
6963
|
/**
|
|
6893
6964
|
* Checks a NetworkResponse object's RetryAfter header
|
|
6894
|
-
* @param response
|
|
6965
|
+
* @param response - Token response with case-insensitive header names.
|
|
6895
6966
|
*/
|
|
6896
6967
|
static checkResponseForRetryAfter(response) {
|
|
6897
|
-
|
|
6898
|
-
return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) &&
|
|
6899
|
-
(response.status < 200 || response.status >= 300));
|
|
6900
|
-
}
|
|
6901
|
-
return false;
|
|
6968
|
+
return getRetryAfterHeader(response) !== undefined;
|
|
6902
6969
|
}
|
|
6903
6970
|
/**
|
|
6904
6971
|
* Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.
|
|
@@ -6915,9 +6982,16 @@ class ThrottlingUtils {
|
|
|
6915
6982
|
const key = this.generateThrottlingStorageKey(thumbprint);
|
|
6916
6983
|
cacheManager.removeItem(key, request.correlationId);
|
|
6917
6984
|
}
|
|
6985
|
+
}
|
|
6986
|
+
/** Reads Retry-After only for non-success responses. */
|
|
6987
|
+
function getRetryAfterHeader(response) {
|
|
6988
|
+
if ((response.status < 200 || response.status >= 300) && response.headers) {
|
|
6989
|
+
return getResponseHeader(response.headers, HeaderNames.RETRY_AFTER);
|
|
6990
|
+
}
|
|
6991
|
+
return undefined;
|
|
6918
6992
|
}
|
|
6919
6993
|
|
|
6920
|
-
/*! @azure/msal-common v16.
|
|
6994
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6921
6995
|
|
|
6922
6996
|
/*
|
|
6923
6997
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6948,7 +7022,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6948
7022
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6949
7023
|
}
|
|
6950
7024
|
|
|
6951
|
-
/*! @azure/msal-common v16.
|
|
7025
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6952
7026
|
|
|
6953
7027
|
/*
|
|
6954
7028
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7046,7 +7120,8 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
7046
7120
|
let response;
|
|
7047
7121
|
try {
|
|
7048
7122
|
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
|
|
7049
|
-
const responseHeaders = response.headers || {};
|
|
7123
|
+
const responseHeaders = normalizeResponseHeaders(response.headers || {});
|
|
7124
|
+
response = { ...response, headers: responseHeaders };
|
|
7050
7125
|
performanceClient?.addFields({
|
|
7051
7126
|
refreshTokenSize: response.body.refresh_token?.length || 0,
|
|
7052
7127
|
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "",
|
|
@@ -7055,16 +7130,16 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
7055
7130
|
}
|
|
7056
7131
|
catch (e) {
|
|
7057
7132
|
if (e instanceof NetworkError) {
|
|
7058
|
-
const responseHeaders = e.responseHeaders
|
|
7133
|
+
const responseHeaders = e.responseHeaders
|
|
7134
|
+
? normalizeResponseHeaders(e.responseHeaders)
|
|
7135
|
+
: undefined;
|
|
7059
7136
|
if (responseHeaders) {
|
|
7060
7137
|
performanceClient?.addFields({
|
|
7061
7138
|
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] ||
|
|
7062
7139
|
"",
|
|
7063
7140
|
requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
|
|
7064
|
-
contentTypeHeader: responseHeaders
|
|
7065
|
-
|
|
7066
|
-
contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||
|
|
7067
|
-
undefined,
|
|
7141
|
+
contentTypeHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_TYPE) || undefined,
|
|
7142
|
+
contentLengthHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_LENGTH) || undefined,
|
|
7068
7143
|
httpStatus: e.httpStatus,
|
|
7069
7144
|
}, correlationId);
|
|
7070
7145
|
}
|
|
@@ -7081,7 +7156,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
7081
7156
|
return response;
|
|
7082
7157
|
}
|
|
7083
7158
|
|
|
7084
|
-
/*! @azure/msal-common v16.
|
|
7159
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7085
7160
|
|
|
7086
7161
|
/*
|
|
7087
7162
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7325,6 +7400,9 @@ class AuthorizationCodeClient {
|
|
|
7325
7400
|
if (request.logoutHint) {
|
|
7326
7401
|
addLogoutHint(parameters, request.logoutHint);
|
|
7327
7402
|
}
|
|
7403
|
+
if (request.popupOriginCheckDone) {
|
|
7404
|
+
addPopupOriginCheckDone(parameters);
|
|
7405
|
+
}
|
|
7328
7406
|
if (request.extraQueryParameters) {
|
|
7329
7407
|
addExtraParameters(parameters, request.extraQueryParameters);
|
|
7330
7408
|
}
|
|
@@ -7345,7 +7423,7 @@ class AuthorizationCodeClient {
|
|
|
7345
7423
|
}
|
|
7346
7424
|
}
|
|
7347
7425
|
|
|
7348
|
-
/*! @azure/msal-common v16.
|
|
7426
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7349
7427
|
|
|
7350
7428
|
/*
|
|
7351
7429
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7480,6 +7558,9 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
7480
7558
|
!Object.keys(request.extraQueryParameters).includes(INSTANCE_AWARE))) {
|
|
7481
7559
|
addInstanceAware(parameters);
|
|
7482
7560
|
}
|
|
7561
|
+
if (request.popupOriginCheckDone) {
|
|
7562
|
+
addPopupOriginCheckDone(parameters);
|
|
7563
|
+
}
|
|
7483
7564
|
return parameters;
|
|
7484
7565
|
}
|
|
7485
7566
|
/**
|
|
@@ -7572,7 +7653,7 @@ function extractLoginHint(account) {
|
|
|
7572
7653
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7573
7654
|
}
|
|
7574
7655
|
|
|
7575
|
-
/*! @azure/msal-common v16.
|
|
7656
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7576
7657
|
|
|
7577
7658
|
/*
|
|
7578
7659
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8121,7 +8202,7 @@ class PerformanceClient {
|
|
|
8121
8202
|
}
|
|
8122
8203
|
}
|
|
8123
8204
|
|
|
8124
|
-
/*! @azure/msal-common v16.
|
|
8205
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8125
8206
|
|
|
8126
8207
|
/*
|
|
8127
8208
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8356,7 +8437,7 @@ class RefreshTokenClient {
|
|
|
8356
8437
|
}
|
|
8357
8438
|
}
|
|
8358
8439
|
|
|
8359
|
-
/*! @azure/msal-common v16.
|
|
8440
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8360
8441
|
|
|
8361
8442
|
/*
|
|
8362
8443
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8649,7 +8730,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
|
|
|
8649
8730
|
clearNativeBrokerErrorCode() { }
|
|
8650
8731
|
}
|
|
8651
8732
|
|
|
8652
|
-
/*! @azure/msal-common v16.
|
|
8733
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8653
8734
|
|
|
8654
8735
|
/*
|
|
8655
8736
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8776,7 +8857,7 @@ class SilentFlowClient {
|
|
|
8776
8857
|
}
|
|
8777
8858
|
}
|
|
8778
8859
|
|
|
8779
|
-
/*! @azure/msal-common v16.
|
|
8860
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8780
8861
|
|
|
8781
8862
|
/*
|
|
8782
8863
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8792,7 +8873,7 @@ const StubbedNetworkModule = {
|
|
|
8792
8873
|
},
|
|
8793
8874
|
};
|
|
8794
8875
|
|
|
8795
|
-
/*! @azure/msal-common v16.
|
|
8876
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8796
8877
|
|
|
8797
8878
|
/*
|
|
8798
8879
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9870,9 +9951,14 @@ function parseAuthResponseFromUrl() {
|
|
|
9870
9951
|
};
|
|
9871
9952
|
}
|
|
9872
9953
|
/**
|
|
9873
|
-
* Clears
|
|
9954
|
+
* Clears a recognized authentication response fragment, preserving the query string.
|
|
9955
|
+
* Assigns an empty hash, then removes the trailing # when history updates are available.
|
|
9874
9956
|
*/
|
|
9875
9957
|
function clearHash(contentWindow) {
|
|
9958
|
+
const serverParams = getDeserializedResponse(contentWindow.location.hash);
|
|
9959
|
+
if (!serverParams) {
|
|
9960
|
+
return;
|
|
9961
|
+
}
|
|
9876
9962
|
// Office.js sets history.replaceState to null
|
|
9877
9963
|
contentWindow.location.hash = "";
|
|
9878
9964
|
if (typeof contentWindow.history.replaceState === "function") {
|
|
@@ -11495,7 +11581,7 @@ const EventType = {
|
|
|
11495
11581
|
|
|
11496
11582
|
/* eslint-disable header/header */
|
|
11497
11583
|
const name = "@azure/msal-browser";
|
|
11498
|
-
const version = "5.
|
|
11584
|
+
const version = "5.27.0";
|
|
11499
11585
|
|
|
11500
11586
|
/*
|
|
11501
11587
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -13003,6 +13089,116 @@ function getActiveAccount(browserStorage, correlationId) {
|
|
|
13003
13089
|
return browserStorage.getActiveAccount(correlationId);
|
|
13004
13090
|
}
|
|
13005
13091
|
|
|
13092
|
+
/*
|
|
13093
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13094
|
+
* Licensed under the MIT License.
|
|
13095
|
+
*/
|
|
13096
|
+
const POPUP_POLL_INTERVAL_MS = 30;
|
|
13097
|
+
let activePopupPoller;
|
|
13098
|
+
/**
|
|
13099
|
+
* Cancels legacy popup polling when an interaction is superseded.
|
|
13100
|
+
*
|
|
13101
|
+
* @internal
|
|
13102
|
+
* @param logger Logger for the interaction.
|
|
13103
|
+
*/
|
|
13104
|
+
function cancelPendingPopupPollingResponse(logger) {
|
|
13105
|
+
if (activePopupPoller) {
|
|
13106
|
+
logger.verbose("0g9n3p", activePopupPoller.correlationId);
|
|
13107
|
+
activePopupPoller.cancel();
|
|
13108
|
+
}
|
|
13109
|
+
}
|
|
13110
|
+
/**
|
|
13111
|
+
* Monitors a popup window for a URL change to the same origin as the parent application.
|
|
13112
|
+
* Polls the popup at a specified interval until it is redirected back to the application,
|
|
13113
|
+
* closed by the user, or a navigation to a same-origin URL is detected. Once a same-origin
|
|
13114
|
+
* URL is detected, extracts the response string (query or hash) and resolves the promise.
|
|
13115
|
+
*
|
|
13116
|
+
* @param popupWindow - The popup window to monitor for navigation.
|
|
13117
|
+
* @param popupWindowParent - The parent window that opened the popup.
|
|
13118
|
+
* @param responseMode - Response mode (`"query"` | `"fragment"`) determines whether
|
|
13119
|
+
* to read `location.search` or `location.hash` from the popup once on the same
|
|
13120
|
+
* origin. Any value other than `"query"` is treated as fragment.
|
|
13121
|
+
* @param logger - Logger instance.
|
|
13122
|
+
* @param unloadWindow - Event handler to remove from the parent window on cleanup.
|
|
13123
|
+
* @param correlationId
|
|
13124
|
+
*/
|
|
13125
|
+
async function monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadWindow, correlationId) {
|
|
13126
|
+
let poller;
|
|
13127
|
+
return new Promise((resolve, reject) => {
|
|
13128
|
+
logger.verbose("0cp91u", correlationId);
|
|
13129
|
+
const intervalId = window.setInterval(() => {
|
|
13130
|
+
if (popupWindow.closed) {
|
|
13131
|
+
logger.error("0n69wb", correlationId);
|
|
13132
|
+
window.clearInterval(intervalId);
|
|
13133
|
+
reject(new BrowserAuthError(userCancelled, correlationId));
|
|
13134
|
+
return;
|
|
13135
|
+
}
|
|
13136
|
+
let href = "";
|
|
13137
|
+
try {
|
|
13138
|
+
/*
|
|
13139
|
+
* Will throw if cross origin,
|
|
13140
|
+
* which should be caught and ignored
|
|
13141
|
+
* since we need the interval to keep running while on STS UI.
|
|
13142
|
+
*/
|
|
13143
|
+
href = popupWindow.location.href;
|
|
13144
|
+
}
|
|
13145
|
+
catch (e) { }
|
|
13146
|
+
// Don't process blank pages or cross domain
|
|
13147
|
+
if (!href || href === "about:blank") {
|
|
13148
|
+
return;
|
|
13149
|
+
}
|
|
13150
|
+
window.clearInterval(intervalId);
|
|
13151
|
+
let responseString;
|
|
13152
|
+
if (responseMode === ResponseMode$1.QUERY) {
|
|
13153
|
+
responseString = popupWindow.location.search;
|
|
13154
|
+
}
|
|
13155
|
+
else {
|
|
13156
|
+
responseString = popupWindow.location.hash;
|
|
13157
|
+
}
|
|
13158
|
+
logger.verbose("0po9er", correlationId);
|
|
13159
|
+
resolve(responseString);
|
|
13160
|
+
}, POPUP_POLL_INTERVAL_MS);
|
|
13161
|
+
poller = {
|
|
13162
|
+
correlationId,
|
|
13163
|
+
cancel: () => {
|
|
13164
|
+
window.clearInterval(intervalId);
|
|
13165
|
+
if (activePopupPoller === poller) {
|
|
13166
|
+
activePopupPoller = undefined;
|
|
13167
|
+
}
|
|
13168
|
+
reject(new BrowserAuthError(interactionInProgressCancelled, correlationId));
|
|
13169
|
+
},
|
|
13170
|
+
};
|
|
13171
|
+
activePopupPoller = poller;
|
|
13172
|
+
}).finally(() => {
|
|
13173
|
+
if (poller && activePopupPoller === poller) {
|
|
13174
|
+
activePopupPoller = undefined;
|
|
13175
|
+
}
|
|
13176
|
+
cleanPopup(popupWindow, popupWindowParent, unloadWindow);
|
|
13177
|
+
});
|
|
13178
|
+
}
|
|
13179
|
+
/**
|
|
13180
|
+
* Performs cleanup operations after popup authentication.
|
|
13181
|
+
* Strips auth-response params (code/state) from the popup URL while it is still
|
|
13182
|
+
* open, closes the popup window, and removes the 'beforeunload' event listener
|
|
13183
|
+
* from the parent window.
|
|
13184
|
+
*
|
|
13185
|
+
* @param popupWindow - The popup window to be closed.
|
|
13186
|
+
* @param popupWindowParent - The parent window from which the event listener will be removed.
|
|
13187
|
+
* @param unloadWindow - The event handler function to remove.
|
|
13188
|
+
*/
|
|
13189
|
+
function cleanPopup(popupWindow, popupWindowParent, unloadWindow) {
|
|
13190
|
+
if (!popupWindow.closed) {
|
|
13191
|
+
try {
|
|
13192
|
+
clearAuthResponseFromUrl(popupWindow);
|
|
13193
|
+
}
|
|
13194
|
+
catch {
|
|
13195
|
+
// Popup may have become cross-origin or otherwise inaccessible; ignore.
|
|
13196
|
+
}
|
|
13197
|
+
}
|
|
13198
|
+
popupWindow.close();
|
|
13199
|
+
popupWindowParent.removeEventListener("beforeunload", unloadWindow);
|
|
13200
|
+
}
|
|
13201
|
+
|
|
13006
13202
|
/*
|
|
13007
13203
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13008
13204
|
* Licensed under the MIT License.
|
|
@@ -13382,6 +13578,90 @@ function validateRequestMethod(interactionRequest, protocolMode) {
|
|
|
13382
13578
|
return httpMethod;
|
|
13383
13579
|
}
|
|
13384
13580
|
|
|
13581
|
+
/*
|
|
13582
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13583
|
+
* Licensed under the MIT License.
|
|
13584
|
+
*/
|
|
13585
|
+
/**
|
|
13586
|
+
* `window.origin` of a document with an opaque origin, e.g. one sandboxed
|
|
13587
|
+
* without `allow-same-origin`. Read from `window.origin`, not
|
|
13588
|
+
* `location.origin`, which reports the real host even when sandboxed.
|
|
13589
|
+
*/
|
|
13590
|
+
const OPAQUE_ORIGIN = "null";
|
|
13591
|
+
/**
|
|
13592
|
+
* Returns `true` when every ancestor browsing context is same-origin with
|
|
13593
|
+
* `win`. A top-level document has no ancestors, so it always passes.
|
|
13594
|
+
*/
|
|
13595
|
+
function allAncestorsSameOrigin(win) {
|
|
13596
|
+
try {
|
|
13597
|
+
// Sandboxed: no origin to compare ancestors against.
|
|
13598
|
+
if (win.origin === OPAQUE_ORIGIN) {
|
|
13599
|
+
return false;
|
|
13600
|
+
}
|
|
13601
|
+
let current = win;
|
|
13602
|
+
// `window.parent` is self-referential at the top level, never falsy.
|
|
13603
|
+
while (current !== current.parent) {
|
|
13604
|
+
current = current.parent;
|
|
13605
|
+
// Throws SecurityError if this ancestor is cross-origin.
|
|
13606
|
+
void current.location.href;
|
|
13607
|
+
}
|
|
13608
|
+
return true;
|
|
13609
|
+
}
|
|
13610
|
+
catch {
|
|
13611
|
+
return false;
|
|
13612
|
+
}
|
|
13613
|
+
}
|
|
13614
|
+
/**
|
|
13615
|
+
* Returns `true` when the top-level window has no opener, or one that is
|
|
13616
|
+
* same-origin with it.
|
|
13617
|
+
*
|
|
13618
|
+
* Reads the opener from `win.top`, not `win`: a framed document always reports
|
|
13619
|
+
* `window.opener === null` and would pass while the top window's untrusted
|
|
13620
|
+
* opener still holds a handle on it.
|
|
13621
|
+
*/
|
|
13622
|
+
function topOpenerIsSameOriginOrAbsent(win) {
|
|
13623
|
+
try {
|
|
13624
|
+
const top = win.top;
|
|
13625
|
+
if (!top) {
|
|
13626
|
+
// Detached from its browsing context; treat as unsafe.
|
|
13627
|
+
return false;
|
|
13628
|
+
}
|
|
13629
|
+
const opener = top.opener;
|
|
13630
|
+
if (!opener || opener === top) {
|
|
13631
|
+
return true;
|
|
13632
|
+
}
|
|
13633
|
+
// Throws SecurityError if the opener is cross-origin.
|
|
13634
|
+
void opener.location.href;
|
|
13635
|
+
return true;
|
|
13636
|
+
}
|
|
13637
|
+
catch {
|
|
13638
|
+
return false;
|
|
13639
|
+
}
|
|
13640
|
+
}
|
|
13641
|
+
/**
|
|
13642
|
+
* Computes the `pocd` ("popup origin check done") authorize parameter value.
|
|
13643
|
+
*
|
|
13644
|
+
* `1` means no untrusted window can reach the popup, which is what lets Entra
|
|
13645
|
+
* omit the `Cross-Origin-Opener-Policy` response header for the request.
|
|
13646
|
+
*
|
|
13647
|
+
* @param config Resolved browser configuration.
|
|
13648
|
+
* @param win Window whose hosting environment is being checked. Defaults to the app window.
|
|
13649
|
+
* @returns `1` when the check passes, otherwise `0`.
|
|
13650
|
+
*/
|
|
13651
|
+
function computePocd(config, win = typeof window !== "undefined" ? window : undefined) {
|
|
13652
|
+
/*
|
|
13653
|
+
* Only an explicit false opts out; anything else computes the check, so an
|
|
13654
|
+
* unresolved config fails closed rather than asserting pocd=1.
|
|
13655
|
+
*/
|
|
13656
|
+
if (config.auth.originCheck === false) {
|
|
13657
|
+
return 1;
|
|
13658
|
+
}
|
|
13659
|
+
if (!win || !allAncestorsSameOrigin(win)) {
|
|
13660
|
+
return 0;
|
|
13661
|
+
}
|
|
13662
|
+
return topOpenerIsSameOriginOrAbsent(win) ? 1 : 0;
|
|
13663
|
+
}
|
|
13664
|
+
|
|
13385
13665
|
/*
|
|
13386
13666
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13387
13667
|
* Licensed under the MIT License.
|
|
@@ -13399,6 +13679,11 @@ class StandardInteractionClient extends BaseInteractionClient {
|
|
|
13399
13679
|
const validLogoutRequest = {
|
|
13400
13680
|
correlationId: this.correlationId,
|
|
13401
13681
|
...logoutRequest,
|
|
13682
|
+
/*
|
|
13683
|
+
* Computed here rather than per flow so every end-session request
|
|
13684
|
+
* carries it, matching the authorize path.
|
|
13685
|
+
*/
|
|
13686
|
+
popupOriginCheckDone: computePocd(this.config) === 1,
|
|
13402
13687
|
};
|
|
13403
13688
|
/**
|
|
13404
13689
|
* Set logout_hint to be login_hint from ID Token Claims if present
|
|
@@ -14876,7 +15161,16 @@ function instrumentClientData(response, correlationId, performanceClient) {
|
|
|
14876
15161
|
* @returns
|
|
14877
15162
|
*/
|
|
14878
15163
|
async function getStandardParameters(config, authority, request, logger, performanceClient) {
|
|
14879
|
-
const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority },
|
|
15164
|
+
const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, {
|
|
15165
|
+
...request,
|
|
15166
|
+
/*
|
|
15167
|
+
* Computed here rather than per flow so every authorize request
|
|
15168
|
+
* carries it — GET, POST and EAR, interactive and silent alike.
|
|
15169
|
+
* A request may assert it instead when the topology, rather than
|
|
15170
|
+
* the current window, is what makes the popup unreachable.
|
|
15171
|
+
*/
|
|
15172
|
+
popupOriginCheckDone: request.popupOriginCheckDone ?? computePocd(config) === 1,
|
|
15173
|
+
}, logger, performanceClient);
|
|
14880
15174
|
addLibraryInfo(parameters, {
|
|
14881
15175
|
sku: BrowserConstants.MSAL_SKU,
|
|
14882
15176
|
version: version,
|
|
@@ -14930,6 +15224,15 @@ async function getAuthCodeRequestUrl(config, authority, request, logger, perform
|
|
|
14930
15224
|
});
|
|
14931
15225
|
return getAuthorizeUrl(authority, parameters);
|
|
14932
15226
|
}
|
|
15227
|
+
function getAuthorizeFormAction(authority, request, parameters) {
|
|
15228
|
+
const queryParams = new Map();
|
|
15229
|
+
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
15230
|
+
if (parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
|
|
15231
|
+
queryParams.delete(POPUP_ORIGIN_CHECK_DONE);
|
|
15232
|
+
}
|
|
15233
|
+
addCorrelationId(queryParams, request.correlationId);
|
|
15234
|
+
return getAuthorizeUrl(authority, queryParams);
|
|
15235
|
+
}
|
|
14933
15236
|
/**
|
|
14934
15237
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
14935
15238
|
*/
|
|
@@ -14945,11 +15248,7 @@ async function getEARFormData(config, authority, request, logger, performanceCli
|
|
|
14945
15248
|
addExtraParameters(parameters, {
|
|
14946
15249
|
...request.extraParameters,
|
|
14947
15250
|
});
|
|
14948
|
-
const
|
|
14949
|
-
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
14950
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
14951
|
-
addCorrelationId(queryParams, request.correlationId);
|
|
14952
|
-
const action = getAuthorizeUrl(authority, queryParams);
|
|
15251
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
14953
15252
|
return { action, fields: Object.fromEntries(parameters) };
|
|
14954
15253
|
}
|
|
14955
15254
|
/**
|
|
@@ -14970,12 +15269,7 @@ async function getCodeFormData(config, authority, request, logger, performanceCl
|
|
|
14970
15269
|
addExtraParameters(parameters, {
|
|
14971
15270
|
...request.extraParameters,
|
|
14972
15271
|
});
|
|
14973
|
-
|
|
14974
|
-
const queryParams = new Map();
|
|
14975
|
-
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
14976
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
14977
|
-
addCorrelationId(queryParams, request.correlationId);
|
|
14978
|
-
const action = getAuthorizeUrl(authority, queryParams);
|
|
15272
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
14979
15273
|
return { action, fields: Object.fromEntries(parameters) };
|
|
14980
15274
|
}
|
|
14981
15275
|
/**
|
|
@@ -15362,7 +15656,7 @@ function getHeaderDict(headers) {
|
|
|
15362
15656
|
*/
|
|
15363
15657
|
// Default timeout for popup windows and iframes in milliseconds
|
|
15364
15658
|
const DEFAULT_POPUP_TIMEOUT_MS = 60000;
|
|
15365
|
-
const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
|
|
15659
|
+
const DEFAULT_IFRAME_TIMEOUT_MS$1 = 10000;
|
|
15366
15660
|
const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
|
|
15367
15661
|
const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
|
|
15368
15662
|
/**
|
|
@@ -15403,6 +15697,8 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
15403
15697
|
instanceAware: false,
|
|
15404
15698
|
isMcp: false,
|
|
15405
15699
|
verifySSO: false,
|
|
15700
|
+
// Legacy polling needs COOP omitted, so it implies asserting pocd=1.
|
|
15701
|
+
originCheck: !userInputSystem?.enableLegacyPolling,
|
|
15406
15702
|
};
|
|
15407
15703
|
// Default cache options for browser
|
|
15408
15704
|
const DEFAULT_CACHE_OPTIONS = {
|
|
@@ -15427,7 +15723,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
15427
15723
|
: StubbedNetworkModule,
|
|
15428
15724
|
navigationClient: new NavigationClient(),
|
|
15429
15725
|
popupBridgeTimeout: userInputSystem?.popupBridgeTimeout || DEFAULT_POPUP_TIMEOUT_MS,
|
|
15430
|
-
iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS,
|
|
15726
|
+
iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS$1,
|
|
15431
15727
|
redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,
|
|
15432
15728
|
allowRedirectInIframe: false,
|
|
15433
15729
|
navigatePopups: true,
|
|
@@ -15436,6 +15732,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
15436
15732
|
DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
|
|
15437
15733
|
protocolMode: ProtocolMode.AAD,
|
|
15438
15734
|
serverTelemetryEnabled: false,
|
|
15735
|
+
enableLegacyPolling: false,
|
|
15439
15736
|
};
|
|
15440
15737
|
const providedSystemOptions = {
|
|
15441
15738
|
...DEFAULT_BROWSER_SYSTEM_OPTIONS,
|
|
@@ -15453,11 +15750,17 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
15453
15750
|
iframeTimeoutTelemetry: false,
|
|
15454
15751
|
allowPlatformBrokerWithDOM: false,
|
|
15455
15752
|
};
|
|
15753
|
+
let logger;
|
|
15754
|
+
const getLogger = () => {
|
|
15755
|
+
if (!logger) {
|
|
15756
|
+
logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
15757
|
+
}
|
|
15758
|
+
return logger;
|
|
15759
|
+
};
|
|
15456
15760
|
// Throw an error if user has set OIDCOptions without being in OIDC protocol mode
|
|
15457
15761
|
if (userInputSystem?.protocolMode !== ProtocolMode.OIDC &&
|
|
15458
15762
|
userInputAuth?.OIDCOptions) {
|
|
15459
|
-
|
|
15460
|
-
logger.warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
|
|
15763
|
+
getLogger().warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
|
|
15461
15764
|
}
|
|
15462
15765
|
// Throw an error if user has set allowPlatformBroker to true with OIDC protocol mode
|
|
15463
15766
|
if (userInputSystem?.protocolMode &&
|
|
@@ -15465,6 +15768,24 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
15465
15768
|
providedSystemOptions?.allowPlatformBroker) {
|
|
15466
15769
|
throw createClientConfigurationError(cannotAllowPlatformBroker, "");
|
|
15467
15770
|
}
|
|
15771
|
+
/*
|
|
15772
|
+
* The origin check computes 0 in the embedded contexts legacy polling
|
|
15773
|
+
* serves, so re-enabling it there breaks the flow. Honor it, but warn.
|
|
15774
|
+
*/
|
|
15775
|
+
if (userInputSystem?.enableLegacyPolling &&
|
|
15776
|
+
userInputAuth?.originCheck === true) {
|
|
15777
|
+
getLogger().warning("buildConfiguration: system.enableLegacyPolling is true and auth.originCheck is explicitly true. Legacy polling requires pocd=1, which the origin check will not produce in an embedded context. Unset auth.originCheck to let legacy polling assert it.", "");
|
|
15778
|
+
}
|
|
15779
|
+
/*
|
|
15780
|
+
* Opting out is a deliberate risk transfer, not an error — but the app
|
|
15781
|
+
* cannot know at config time that the risky topology is actually present.
|
|
15782
|
+
*/
|
|
15783
|
+
if ((userInputAuth?.originCheck ?? DEFAULT_AUTH_OPTIONS.originCheck) ===
|
|
15784
|
+
false &&
|
|
15785
|
+
typeof window !== "undefined" &&
|
|
15786
|
+
!topOpenerIsSameOriginOrAbsent(window)) {
|
|
15787
|
+
getLogger().warning("buildConfiguration: auth.originCheck is disabled and the top-level window has a cross-origin opener. MSAL will assert pocd=1, so the STS omits Cross-Origin-Opener-Policy and that opener can reach the auth popup. The application is responsible for this risk.", "");
|
|
15788
|
+
}
|
|
15468
15789
|
const overlayedConfig = {
|
|
15469
15790
|
auth: {
|
|
15470
15791
|
...DEFAULT_AUTH_OPTIONS,
|
|
@@ -16290,6 +16611,9 @@ class PopupClient extends StandardInteractionClient {
|
|
|
16290
16611
|
popupWindowAttributes: logoutRequest?.popupWindowAttributes || {},
|
|
16291
16612
|
popupWindowParent: logoutRequest?.popupWindowParent ?? window,
|
|
16292
16613
|
};
|
|
16614
|
+
validLogoutRequest.popupOriginCheckDone =
|
|
16615
|
+
this.getPopupOriginCheckDone(popupParams.popupWindowParent) ??
|
|
16616
|
+
validLogoutRequest.popupOriginCheckDone;
|
|
16293
16617
|
const authority = logoutRequest && logoutRequest.authority;
|
|
16294
16618
|
const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;
|
|
16295
16619
|
// navigatePopups flag set to false. Acquires token without first opening popup. Popup will be opened later asynchronously.
|
|
@@ -16354,6 +16678,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
16354
16678
|
...request,
|
|
16355
16679
|
codeChallenge: pkce.challenge,
|
|
16356
16680
|
...tokenBindingParams,
|
|
16681
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
16357
16682
|
};
|
|
16358
16683
|
try {
|
|
16359
16684
|
// Initialize the client
|
|
@@ -16417,6 +16742,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
16417
16742
|
earJwk: earJwk,
|
|
16418
16743
|
codeChallenge: pkce.challenge,
|
|
16419
16744
|
...tokenBindingParams,
|
|
16745
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
16420
16746
|
};
|
|
16421
16747
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
16422
16748
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
@@ -16689,6 +17015,27 @@ class PopupClient extends StandardInteractionClient {
|
|
|
16689
17015
|
getRelayStateId(state, correlationId) {
|
|
16690
17016
|
return parseRequestState(base64Decode, state, correlationId).libraryState.id;
|
|
16691
17017
|
}
|
|
17018
|
+
/**
|
|
17019
|
+
* Asserts `pocd=1` for the relay flow. Direct popups also require the
|
|
17020
|
+
* environment of a delegated opening window to pass the origin check.
|
|
17021
|
+
*
|
|
17022
|
+
* With a relay the IdP window is a grandchild popup, which an untrusted
|
|
17023
|
+
* ancestor cannot reach by name — so the topology satisfies the check by
|
|
17024
|
+
* construction. The current window is framed and would otherwise compute
|
|
17025
|
+
* `0`. Without a delegated parent, the standard app check remains unchanged.
|
|
17026
|
+
*
|
|
17027
|
+
* @param popupWindowParent Window that opens the popup.
|
|
17028
|
+
*/
|
|
17029
|
+
getPopupOriginCheckDone(popupWindowParent) {
|
|
17030
|
+
if (this.config.auth.popupRelayUri) {
|
|
17031
|
+
return true;
|
|
17032
|
+
}
|
|
17033
|
+
if (popupWindowParent !== window) {
|
|
17034
|
+
return (computePocd(this.config) === 1 &&
|
|
17035
|
+
computePocd(this.config, popupWindowParent) === 1);
|
|
17036
|
+
}
|
|
17037
|
+
return undefined;
|
|
17038
|
+
}
|
|
16692
17039
|
/**
|
|
16693
17040
|
* Opens the interactive popup for a POST-form /authorize request. Shared by
|
|
16694
17041
|
* the auth-code POST and EAR flows, which are identical apart from the form
|
|
@@ -17011,7 +17358,6 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
17011
17358
|
}
|
|
17012
17359
|
return [null, ""];
|
|
17013
17360
|
}
|
|
17014
|
-
clearHash(window);
|
|
17015
17361
|
this.logger.verbose("00uvho", this.correlationId);
|
|
17016
17362
|
return [response, responseString];
|
|
17017
17363
|
}
|
|
@@ -17982,7 +18328,32 @@ class StandardController {
|
|
|
17982
18328
|
* @returns
|
|
17983
18329
|
*/
|
|
17984
18330
|
async handleRedirectPromiseInternal(options) {
|
|
17985
|
-
|
|
18331
|
+
// Preserve the response for RedirectClient before removing it from the URL.
|
|
18332
|
+
const responseString = options?.hash ||
|
|
18333
|
+
(this.config.auth.OIDCOptions.responseMode ===
|
|
18334
|
+
ResponseMode$1.QUERY
|
|
18335
|
+
? window.location.search
|
|
18336
|
+
: window.location.hash);
|
|
18337
|
+
const anyClientInteractionInProgress = this.browserStorage.isInteractionInProgress(false);
|
|
18338
|
+
const currentClientInteraction = this.browserStorage.isInteractionInProgress(true);
|
|
18339
|
+
const isBridgeCallback = isInPopup() ||
|
|
18340
|
+
(isInIframe() &&
|
|
18341
|
+
!this.config.system.allowRedirectInIframe);
|
|
18342
|
+
/*
|
|
18343
|
+
* Clear recognized response fragments for:
|
|
18344
|
+
* - Stale callbacks with no pending interaction.
|
|
18345
|
+
* - This client's login callback, even if request setup or response validation fails.
|
|
18346
|
+
* - This client's logout callback containing state, before the SIGNOUT early return.
|
|
18347
|
+
* Leave another client's callback untouched. clearHash preserves query strings
|
|
18348
|
+
* and application routes, and does nothing when no response fragment is present.
|
|
18349
|
+
* Skip popup and non-redirect iframe callbacks: legacy apps may call HRP
|
|
18350
|
+
* before their redirect bridge reads and broadcasts the response.
|
|
18351
|
+
*/
|
|
18352
|
+
if (!isBridgeCallback &&
|
|
18353
|
+
(!anyClientInteractionInProgress || currentClientInteraction)) {
|
|
18354
|
+
clearHash(window);
|
|
18355
|
+
}
|
|
18356
|
+
if (!currentClientInteraction) {
|
|
17986
18357
|
this.logger.info("0le6uv", "");
|
|
17987
18358
|
return null;
|
|
17988
18359
|
}
|
|
@@ -17990,7 +18361,7 @@ class StandardController {
|
|
|
17990
18361
|
if (interactionType === INTERACTION_TYPE.SIGNOUT) {
|
|
17991
18362
|
this.logger.verbose("1ywcv2", "");
|
|
17992
18363
|
this.browserStorage.setInteractionInProgress(false);
|
|
17993
|
-
return
|
|
18364
|
+
return null;
|
|
17994
18365
|
}
|
|
17995
18366
|
const loggedInAccounts = this.getAllAccounts();
|
|
17996
18367
|
const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
|
|
@@ -18020,7 +18391,9 @@ class StandardController {
|
|
|
18020
18391
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
18021
18392
|
this.logger.trace("0znzs5", correlationId);
|
|
18022
18393
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
18023
|
-
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options
|
|
18394
|
+
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options?.hash
|
|
18395
|
+
? options
|
|
18396
|
+
: { ...options, hash: responseString });
|
|
18024
18397
|
}
|
|
18025
18398
|
}
|
|
18026
18399
|
catch (e) {
|
|
@@ -18168,6 +18541,9 @@ class StandardController {
|
|
|
18168
18541
|
this.logger.verbose("0ch87b", correlationId);
|
|
18169
18542
|
preflightCheck(this.initialized, atPopupMeasurement, this.config, request);
|
|
18170
18543
|
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN, request.overrideInteractionInProgress, correlationId);
|
|
18544
|
+
if (request.overrideInteractionInProgress) {
|
|
18545
|
+
cancelPendingPopupPollingResponse(this.logger);
|
|
18546
|
+
}
|
|
18171
18547
|
}
|
|
18172
18548
|
catch (e) {
|
|
18173
18549
|
// Since this function is syncronous we need to reject
|
|
@@ -20543,6 +20919,79 @@ NestedAppOperatingContext.MODULE_NAME = "";
|
|
|
20543
20919
|
*/
|
|
20544
20920
|
NestedAppOperatingContext.ID = "NestedAppOperatingContext";
|
|
20545
20921
|
|
|
20922
|
+
/*
|
|
20923
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20924
|
+
* Licensed under the MIT License.
|
|
20925
|
+
*/
|
|
20926
|
+
const IFRAME_POLL_INTERVAL_MS = 50;
|
|
20927
|
+
const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
|
|
20928
|
+
/**
|
|
20929
|
+
* Monitors an iframe content window until it loads a URL with a known hash, or hits a specified timeout.
|
|
20930
|
+
*
|
|
20931
|
+
* @param iframe - The hidden iframe to monitor.
|
|
20932
|
+
* @param timeout - Maximum time (ms) to wait for navigation before rejecting with
|
|
20933
|
+
* `monitor_window_timeout`.
|
|
20934
|
+
* @param logger - Logger instance.
|
|
20935
|
+
* @param correlationId
|
|
20936
|
+
* @param responseMode - `"query"` or `"fragment"` — determines whether to read
|
|
20937
|
+
* `location.search` or `location.hash`. Any value other than `"query"` is
|
|
20938
|
+
* treated as fragment.
|
|
20939
|
+
*/
|
|
20940
|
+
async function monitorIframeForHash(iframe, timeout, logger, correlationId, responseMode) {
|
|
20941
|
+
return new Promise((resolve, reject) => {
|
|
20942
|
+
if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {
|
|
20943
|
+
logger.warning(`137tec ${timeout} ${DEFAULT_IFRAME_TIMEOUT_MS}`, correlationId);
|
|
20944
|
+
}
|
|
20945
|
+
/*
|
|
20946
|
+
* Polling for iframes can be purely timing based,
|
|
20947
|
+
* since we don't need to account for interaction.
|
|
20948
|
+
*/
|
|
20949
|
+
const timeoutId = window.setTimeout(() => {
|
|
20950
|
+
window.clearInterval(intervalId);
|
|
20951
|
+
reject(new AuthError(timedOut, correlationId, undefined, "monitor_window_timeout"));
|
|
20952
|
+
}, timeout);
|
|
20953
|
+
const intervalId = window.setInterval(() => {
|
|
20954
|
+
const contentWindow = iframe.contentWindow;
|
|
20955
|
+
if (!contentWindow) {
|
|
20956
|
+
return;
|
|
20957
|
+
}
|
|
20958
|
+
let href = "";
|
|
20959
|
+
try {
|
|
20960
|
+
/*
|
|
20961
|
+
* Will throw if cross origin,
|
|
20962
|
+
* which should be caught and ignored
|
|
20963
|
+
* since we need the interval to keep running while on STS UI.
|
|
20964
|
+
*/
|
|
20965
|
+
href = contentWindow.location.href;
|
|
20966
|
+
}
|
|
20967
|
+
catch (e) { }
|
|
20968
|
+
if (!href || href === "about:blank") {
|
|
20969
|
+
return;
|
|
20970
|
+
}
|
|
20971
|
+
const responseString = responseMode === ResponseMode$1.QUERY
|
|
20972
|
+
? contentWindow.location.search
|
|
20973
|
+
: contentWindow.location.hash;
|
|
20974
|
+
window.clearTimeout(timeoutId);
|
|
20975
|
+
window.clearInterval(intervalId);
|
|
20976
|
+
resolve(responseString);
|
|
20977
|
+
}, IFRAME_POLL_INTERVAL_MS);
|
|
20978
|
+
}).finally(() => {
|
|
20979
|
+
/*
|
|
20980
|
+
* Strip auth-response params from the iframe URL. The monitor owns the
|
|
20981
|
+
* iframe for the duration of the poll, mirroring cleanPopup in
|
|
20982
|
+
* PopupMonitor.
|
|
20983
|
+
*/
|
|
20984
|
+
try {
|
|
20985
|
+
if (iframe.contentWindow) {
|
|
20986
|
+
clearAuthResponseFromUrl(iframe.contentWindow);
|
|
20987
|
+
}
|
|
20988
|
+
}
|
|
20989
|
+
catch {
|
|
20990
|
+
// Iframe may already be navigated away or cross-origin; ignore.
|
|
20991
|
+
}
|
|
20992
|
+
});
|
|
20993
|
+
}
|
|
20994
|
+
|
|
20546
20995
|
/*
|
|
20547
20996
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20548
20997
|
* Licensed under the MIT License.
|
|
@@ -20585,27 +21034,29 @@ class PublicClientApplication {
|
|
|
20585
21034
|
/**
|
|
20586
21035
|
* Waits for the auth response from a popup window opened by MSAL.
|
|
20587
21036
|
*
|
|
20588
|
-
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge
|
|
20589
|
-
*
|
|
20590
|
-
*
|
|
21037
|
+
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
|
|
21038
|
+
* or to the v4-style same-origin location poller when
|
|
21039
|
+
* `system.enableLegacyPolling` is set. Subclasses must return the raw response
|
|
21040
|
+
* string (hash/query/fragment), or reject with an `AuthError` on failure.
|
|
20591
21041
|
*
|
|
20592
21042
|
* @internal
|
|
20593
21043
|
* @param request The in-flight authorization or end-session request.
|
|
20594
21044
|
* @param popupWindow The popup window opened by MSAL.
|
|
20595
21045
|
* @param popupWindowParent The parent window that opened the popup.
|
|
20596
21046
|
*/
|
|
20597
|
-
async waitForPopupResponse(request,
|
|
20598
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20599
|
-
popupWindow,
|
|
20600
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20601
|
-
popupWindowParent) {
|
|
21047
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
20602
21048
|
const controller = this.controller;
|
|
20603
|
-
|
|
21049
|
+
const config = controller.getConfiguration();
|
|
21050
|
+
if (config.system.enableLegacyPolling) {
|
|
21051
|
+
return waitForPopupPollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), request, popupWindow, popupWindowParent);
|
|
21052
|
+
}
|
|
21053
|
+
return waitForBridgeResponse(config.system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
|
|
20604
21054
|
}
|
|
20605
21055
|
/**
|
|
20606
21056
|
* Waits for the auth response from a hidden iframe used by MSAL silent flows.
|
|
20607
21057
|
*
|
|
20608
|
-
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge
|
|
21058
|
+
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
|
|
21059
|
+
* or to the v4-style location poller when `system.enableLegacyPolling` is set.
|
|
20609
21060
|
* Subclasses must return the raw response string (hash/query/fragment), or reject
|
|
20610
21061
|
* with an `AuthError` on failure.
|
|
20611
21062
|
*
|
|
@@ -20613,11 +21064,12 @@ class PublicClientApplication {
|
|
|
20613
21064
|
* @param iframe The hidden iframe MSAL attached to the document.
|
|
20614
21065
|
* @param request The in-flight authorization request.
|
|
20615
21066
|
*/
|
|
20616
|
-
async waitForIframeResponse(
|
|
20617
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20618
|
-
iframe, request) {
|
|
21067
|
+
async waitForIframeResponse(iframe, request) {
|
|
20619
21068
|
const controller = this.controller;
|
|
20620
21069
|
const config = controller.getConfiguration();
|
|
21070
|
+
if (config.system.enableLegacyPolling) {
|
|
21071
|
+
return waitForIframePollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), iframe, request);
|
|
21072
|
+
}
|
|
20621
21073
|
return waitForBridgeResponse(config.system.iframeBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient(), config.experimental);
|
|
20622
21074
|
}
|
|
20623
21075
|
/**
|
|
@@ -20886,6 +21338,40 @@ async function createStandardPublicClientApplication(configuration) {
|
|
|
20886
21338
|
const pca = new PublicClientApplication(configuration);
|
|
20887
21339
|
await pca.initialize();
|
|
20888
21340
|
return pca;
|
|
21341
|
+
}
|
|
21342
|
+
/**
|
|
21343
|
+
* Collects a popup auth response using the v4-style same-origin location
|
|
21344
|
+
* poller instead of the `BroadcastChannel` redirect bridge.
|
|
21345
|
+
*/
|
|
21346
|
+
async function waitForPopupPollingResponse(config, logger, performanceClient, request, popupWindow, popupWindowParent) {
|
|
21347
|
+
const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
|
|
21348
|
+
? ResponseMode$1.QUERY
|
|
21349
|
+
: ResponseMode$1.FRAGMENT;
|
|
21350
|
+
performanceClient.addFields({ usesLegacyPolling: true }, request.correlationId);
|
|
21351
|
+
const unloadHandler = () => {
|
|
21352
|
+
try {
|
|
21353
|
+
if (popupWindow && !popupWindow.closed) {
|
|
21354
|
+
popupWindow.close();
|
|
21355
|
+
}
|
|
21356
|
+
}
|
|
21357
|
+
catch {
|
|
21358
|
+
/* ignore */
|
|
21359
|
+
}
|
|
21360
|
+
};
|
|
21361
|
+
popupWindowParent.addEventListener("beforeunload", unloadHandler);
|
|
21362
|
+
return monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadHandler, request.correlationId);
|
|
21363
|
+
}
|
|
21364
|
+
/**
|
|
21365
|
+
* Collects a silent-iframe auth response using the v4-style location poller
|
|
21366
|
+
* instead of the `BroadcastChannel` redirect bridge.
|
|
21367
|
+
*/
|
|
21368
|
+
async function waitForIframePollingResponse(config, logger, performanceClient, iframe, request) {
|
|
21369
|
+
const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
|
|
21370
|
+
? ResponseMode$1.QUERY
|
|
21371
|
+
: ResponseMode$1.FRAGMENT;
|
|
21372
|
+
const iframePollTimeout = config.system.iframeBridgeTimeout;
|
|
21373
|
+
performanceClient.addFields({ usesLegacyPolling: true, iframePollTimeout }, request.correlationId);
|
|
21374
|
+
return monitorIframeForHash(iframe, iframePollTimeout, logger, request.correlationId, responseMode);
|
|
20889
21375
|
}
|
|
20890
21376
|
|
|
20891
21377
|
/*
|
|
@@ -21519,7 +22005,7 @@ exports.ClientAuthError = ClientAuthError;
|
|
|
21519
22005
|
exports.ClientAuthErrorCodes = ClientAuthErrorCodes;
|
|
21520
22006
|
exports.ClientConfigurationError = ClientConfigurationError;
|
|
21521
22007
|
exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
|
|
21522
|
-
exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
|
|
22008
|
+
exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS$1;
|
|
21523
22009
|
exports.EventHandler = EventHandler;
|
|
21524
22010
|
exports.EventMessageUtils = EventMessageUtils;
|
|
21525
22011
|
exports.EventType = EventType;
|