@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.27.0 2026-10-27 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msalCustomAuth = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v16.
|
|
9
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -58,9 +58,15 @@
|
|
|
58
58
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
59
59
|
const RESOURCE = "resource";
|
|
60
60
|
const CLI_DATA = "clidata";
|
|
61
|
-
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
61
|
+
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
62
|
+
/**
|
|
63
|
+
* Popup-origin-check-done. Signals to the STS that the client verified the
|
|
64
|
+
* popup cannot be reached by an untrusted window, so the
|
|
65
|
+
* Cross-Origin-Opener-Policy response header may be omitted.
|
|
66
|
+
*/
|
|
67
|
+
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
62
68
|
|
|
63
|
-
/*! @azure/msal-common v16.
|
|
69
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
64
70
|
/*
|
|
65
71
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
66
72
|
* Licensed under the MIT License.
|
|
@@ -294,7 +300,7 @@
|
|
|
294
300
|
// Token renewal offset default in seconds
|
|
295
301
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
296
302
|
|
|
297
|
-
/*! @azure/msal-common v16.
|
|
303
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
298
304
|
/*
|
|
299
305
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
300
306
|
* Licensed under the MIT License.
|
|
@@ -323,7 +329,7 @@
|
|
|
323
329
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
324
330
|
}
|
|
325
331
|
|
|
326
|
-
/*! @azure/msal-common v16.
|
|
332
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
327
333
|
|
|
328
334
|
/*
|
|
329
335
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -346,7 +352,7 @@
|
|
|
346
352
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
347
353
|
}
|
|
348
354
|
|
|
349
|
-
/*! @azure/msal-common v16.
|
|
355
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
350
356
|
/*
|
|
351
357
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
352
358
|
* Licensed under the MIT License.
|
|
@@ -384,7 +390,7 @@
|
|
|
384
390
|
const resourceParameterRequired = "resource_parameter_required";
|
|
385
391
|
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
386
392
|
|
|
387
|
-
/*! @azure/msal-common v16.
|
|
393
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
388
394
|
|
|
389
395
|
/*
|
|
390
396
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -422,7 +428,7 @@
|
|
|
422
428
|
};
|
|
423
429
|
}
|
|
424
430
|
|
|
425
|
-
/*! @azure/msal-common v16.
|
|
431
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
426
432
|
|
|
427
433
|
/*
|
|
428
434
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -488,7 +494,7 @@
|
|
|
488
494
|
return matches[2];
|
|
489
495
|
}
|
|
490
496
|
|
|
491
|
-
/*! @azure/msal-common v16.
|
|
497
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
492
498
|
|
|
493
499
|
/*
|
|
494
500
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -576,7 +582,7 @@
|
|
|
576
582
|
return updatedAccountInfo;
|
|
577
583
|
}
|
|
578
584
|
|
|
579
|
-
/*! @azure/msal-common v16.
|
|
585
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
580
586
|
/*
|
|
581
587
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
582
588
|
* Licensed under the MIT License.
|
|
@@ -590,7 +596,7 @@
|
|
|
590
596
|
Ciam: 3,
|
|
591
597
|
};
|
|
592
598
|
|
|
593
|
-
/*! @azure/msal-common v16.
|
|
599
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
594
600
|
/*
|
|
595
601
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
596
602
|
* Licensed under the MIT License.
|
|
@@ -612,7 +618,7 @@
|
|
|
612
618
|
return null;
|
|
613
619
|
}
|
|
614
620
|
|
|
615
|
-
/*! @azure/msal-common v16.
|
|
621
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
616
622
|
/*
|
|
617
623
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
618
624
|
* Licensed under the MIT License.
|
|
@@ -636,7 +642,7 @@
|
|
|
636
642
|
EAR: "EAR",
|
|
637
643
|
};
|
|
638
644
|
|
|
639
|
-
/*! @azure/msal-common v16.
|
|
645
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
640
646
|
/**
|
|
641
647
|
* Returns the AccountInfo interface for this account.
|
|
642
648
|
* @internal
|
|
@@ -825,7 +831,7 @@
|
|
|
825
831
|
entity.hasOwnProperty("authorityType"));
|
|
826
832
|
}
|
|
827
833
|
|
|
828
|
-
/*! @azure/msal-common v16.
|
|
834
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
829
835
|
/*
|
|
830
836
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
831
837
|
* Licensed under the MIT License.
|
|
@@ -835,7 +841,7 @@
|
|
|
835
841
|
*/
|
|
836
842
|
const unexpectedError = "unexpected_error";
|
|
837
843
|
|
|
838
|
-
/*! @azure/msal-common v16.
|
|
844
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
839
845
|
|
|
840
846
|
/*
|
|
841
847
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -855,7 +861,47 @@
|
|
|
855
861
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
856
862
|
}
|
|
857
863
|
|
|
858
|
-
/*! @azure/msal-common v16.
|
|
864
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
865
|
+
/*
|
|
866
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
867
|
+
* Licensed under the MIT License.
|
|
868
|
+
*/
|
|
869
|
+
// Track only our normalized copies, never caller-owned mutable inputs.
|
|
870
|
+
const normalizedHeaderRecords = new WeakSet();
|
|
871
|
+
/**
|
|
872
|
+
* Creates a lowercase-keyed snapshot without changing header values or the input.
|
|
873
|
+
* Reuses snapshots produced by this function to avoid repeated normalization.
|
|
874
|
+
* @internal
|
|
875
|
+
*/
|
|
876
|
+
function normalizeResponseHeaders(headers) {
|
|
877
|
+
if (normalizedHeaderRecords.has(headers)) {
|
|
878
|
+
return headers;
|
|
879
|
+
}
|
|
880
|
+
const normalized = Object.fromEntries(Object.entries(headers).map(([name, value]) => [
|
|
881
|
+
name.toLowerCase(),
|
|
882
|
+
value,
|
|
883
|
+
]));
|
|
884
|
+
normalizedHeaderRecords.add(normalized);
|
|
885
|
+
return normalized;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Reads a response header case-insensitively.
|
|
889
|
+
* Normalized snapshots are never scanned, even when a header is missing.
|
|
890
|
+
* @internal
|
|
891
|
+
*/
|
|
892
|
+
function getResponseHeader(headers, name) {
|
|
893
|
+
const key = name.toLowerCase();
|
|
894
|
+
if (Object.prototype.hasOwnProperty.call(headers, key)) {
|
|
895
|
+
return headers[key];
|
|
896
|
+
}
|
|
897
|
+
if (normalizedHeaderRecords.has(headers)) {
|
|
898
|
+
return undefined;
|
|
899
|
+
}
|
|
900
|
+
const headerName = Object.keys(headers).find((header) => header.toLowerCase() === key);
|
|
901
|
+
return headerName === undefined ? undefined : headers[headerName];
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
859
905
|
/*
|
|
860
906
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
861
907
|
* Licensed under the MIT License.
|
|
@@ -886,7 +932,7 @@
|
|
|
886
932
|
const invalidDpopNonce = "invalid_dpop_nonce";
|
|
887
933
|
const dpopMissingResourceContext = "dpop_missing_resource_context";
|
|
888
934
|
|
|
889
|
-
/*! @azure/msal-common v16.
|
|
935
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
890
936
|
/*
|
|
891
937
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
892
938
|
* Licensed under the MIT License.
|
|
@@ -898,7 +944,7 @@
|
|
|
898
944
|
response.hasOwnProperty("jwks_uri"));
|
|
899
945
|
}
|
|
900
946
|
|
|
901
|
-
/*! @azure/msal-common v16.
|
|
947
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
902
948
|
/*
|
|
903
949
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
904
950
|
* Licensed under the MIT License.
|
|
@@ -978,7 +1024,7 @@
|
|
|
978
1024
|
}
|
|
979
1025
|
}
|
|
980
1026
|
|
|
981
|
-
/*! @azure/msal-common v16.
|
|
1027
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
982
1028
|
|
|
983
1029
|
/*
|
|
984
1030
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1136,7 +1182,7 @@
|
|
|
1136
1182
|
}
|
|
1137
1183
|
}
|
|
1138
1184
|
|
|
1139
|
-
/*! @azure/msal-common v16.
|
|
1185
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1140
1186
|
|
|
1141
1187
|
/*
|
|
1142
1188
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1290,7 +1336,7 @@
|
|
|
1290
1336
|
return null;
|
|
1291
1337
|
}
|
|
1292
1338
|
|
|
1293
|
-
/*! @azure/msal-common v16.
|
|
1339
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1294
1340
|
/*
|
|
1295
1341
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1296
1342
|
* Licensed under the MIT License.
|
|
@@ -1299,7 +1345,7 @@
|
|
|
1299
1345
|
// AzureCloudInstance is not specified.
|
|
1300
1346
|
None: "none"};
|
|
1301
1347
|
|
|
1302
|
-
/*! @azure/msal-common v16.
|
|
1348
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1303
1349
|
/*
|
|
1304
1350
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1305
1351
|
* Licensed under the MIT License.
|
|
@@ -1309,7 +1355,7 @@
|
|
|
1309
1355
|
response.hasOwnProperty("metadata"));
|
|
1310
1356
|
}
|
|
1311
1357
|
|
|
1312
|
-
/*! @azure/msal-common v16.
|
|
1358
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1313
1359
|
/*
|
|
1314
1360
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1315
1361
|
* Licensed under the MIT License.
|
|
@@ -1319,7 +1365,7 @@
|
|
|
1319
1365
|
response.hasOwnProperty("error_description"));
|
|
1320
1366
|
}
|
|
1321
1367
|
|
|
1322
|
-
/*! @azure/msal-common v16.
|
|
1368
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1323
1369
|
/*
|
|
1324
1370
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1325
1371
|
* Licensed under the MIT License.
|
|
@@ -1390,7 +1436,7 @@
|
|
|
1390
1436
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1391
1437
|
const SetUserData = "setUserData";
|
|
1392
1438
|
|
|
1393
|
-
/*! @azure/msal-common v16.
|
|
1439
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1394
1440
|
/*
|
|
1395
1441
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1396
1442
|
* Licensed under the MIT License.
|
|
@@ -1483,7 +1529,7 @@
|
|
|
1483
1529
|
};
|
|
1484
1530
|
};
|
|
1485
1531
|
|
|
1486
|
-
/*! @azure/msal-common v16.
|
|
1532
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1487
1533
|
|
|
1488
1534
|
/*
|
|
1489
1535
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1594,7 +1640,7 @@
|
|
|
1594
1640
|
},
|
|
1595
1641
|
};
|
|
1596
1642
|
|
|
1597
|
-
/*! @azure/msal-common v16.
|
|
1643
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1598
1644
|
/*
|
|
1599
1645
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1600
1646
|
* Licensed under the MIT License.
|
|
@@ -1659,7 +1705,7 @@
|
|
|
1659
1705
|
return cachedAtSec > nowSeconds();
|
|
1660
1706
|
}
|
|
1661
1707
|
|
|
1662
|
-
/*! @azure/msal-common v16.
|
|
1708
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1663
1709
|
|
|
1664
1710
|
/*
|
|
1665
1711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1946,7 +1992,7 @@
|
|
|
1946
1992
|
return [...attributeTokens].sort().join(" ");
|
|
1947
1993
|
}
|
|
1948
1994
|
|
|
1949
|
-
/*! @azure/msal-common v16.
|
|
1995
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1950
1996
|
|
|
1951
1997
|
/*
|
|
1952
1998
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2914,7 +2960,7 @@
|
|
|
2914
2960
|
};
|
|
2915
2961
|
}
|
|
2916
2962
|
|
|
2917
|
-
/*! @azure/msal-common v16.
|
|
2963
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
2918
2964
|
|
|
2919
2965
|
/*
|
|
2920
2966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2948,7 +2994,7 @@
|
|
|
2948
2994
|
}
|
|
2949
2995
|
}
|
|
2950
2996
|
|
|
2951
|
-
/*! @azure/msal-common v16.
|
|
2997
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
2952
2998
|
|
|
2953
2999
|
/*
|
|
2954
3000
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3144,7 +3190,7 @@
|
|
|
3144
3190
|
}
|
|
3145
3191
|
}
|
|
3146
3192
|
|
|
3147
|
-
/*! @azure/msal-common v16.
|
|
3193
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3148
3194
|
|
|
3149
3195
|
/*
|
|
3150
3196
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3425,6 +3471,20 @@
|
|
|
3425
3471
|
parameters.set(INSTANCE_AWARE, "true");
|
|
3426
3472
|
}
|
|
3427
3473
|
}
|
|
3474
|
+
/**
|
|
3475
|
+
* Adds `pocd=1`, telling the STS that the client verified the popup driving
|
|
3476
|
+
* this request cannot be reached by an untrusted window, so the
|
|
3477
|
+
* Cross-Origin-Opener-Policy response header may be omitted.
|
|
3478
|
+
*
|
|
3479
|
+
* Only ever added when the check passed — a negative result is signalled by
|
|
3480
|
+
* omitting the parameter, which keeps the STS default (apply COOP) and stays
|
|
3481
|
+
* compatible with library versions that never send it.
|
|
3482
|
+
*/
|
|
3483
|
+
function addPopupOriginCheckDone(parameters) {
|
|
3484
|
+
if (!parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
|
|
3485
|
+
parameters.set(POPUP_ORIGIN_CHECK_DONE, "1");
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3428
3488
|
/**
|
|
3429
3489
|
* Add extraParameters
|
|
3430
3490
|
* @param extraParams - String dictionary containing extra parameters to be added.
|
|
@@ -3630,7 +3690,7 @@
|
|
|
3630
3690
|
}
|
|
3631
3691
|
}
|
|
3632
3692
|
|
|
3633
|
-
/*! @azure/msal-common v16.
|
|
3693
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3634
3694
|
|
|
3635
3695
|
/*
|
|
3636
3696
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3651,7 +3711,8 @@
|
|
|
3651
3711
|
return responseString;
|
|
3652
3712
|
}
|
|
3653
3713
|
/**
|
|
3654
|
-
* Returns
|
|
3714
|
+
* Returns flat fragment or query parameters as an authorization response.
|
|
3715
|
+
* Application routes and unrecognized responses return null.
|
|
3655
3716
|
*/
|
|
3656
3717
|
function getDeserializedResponse(responseString) {
|
|
3657
3718
|
// Check if given hash is empty
|
|
@@ -3661,7 +3722,15 @@
|
|
|
3661
3722
|
try {
|
|
3662
3723
|
// Strip the # or ? symbol if present
|
|
3663
3724
|
const normalizedResponse = stripLeadingHashOrQuery(responseString);
|
|
3664
|
-
|
|
3725
|
+
/*
|
|
3726
|
+
* Require a flat parameter name, not an application route.
|
|
3727
|
+
* Reject routes like #/dashboard?tab=orders&code=... and
|
|
3728
|
+
* #/dashboard/orders&state=..., where ?, /, or # appears before
|
|
3729
|
+
* the first = or &. These characters are allowed in parameter values.
|
|
3730
|
+
*/
|
|
3731
|
+
if (!/^[^=&?#/]+(?:=|&|$)/.test(normalizedResponse)) {
|
|
3732
|
+
return null;
|
|
3733
|
+
}
|
|
3665
3734
|
const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));
|
|
3666
3735
|
// Check for known response properties
|
|
3667
3736
|
if (deserializedHash.code ||
|
|
@@ -3752,7 +3821,7 @@
|
|
|
3752
3821
|
}
|
|
3753
3822
|
}
|
|
3754
3823
|
|
|
3755
|
-
/*! @azure/msal-common v16.
|
|
3824
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3756
3825
|
|
|
3757
3826
|
/*
|
|
3758
3827
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3800,7 +3869,7 @@
|
|
|
3800
3869
|
},
|
|
3801
3870
|
};
|
|
3802
3871
|
|
|
3803
|
-
/*! @azure/msal-common v16.
|
|
3872
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3804
3873
|
|
|
3805
3874
|
/*
|
|
3806
3875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3823,7 +3892,7 @@
|
|
|
3823
3892
|
},
|
|
3824
3893
|
};
|
|
3825
3894
|
|
|
3826
|
-
/*! @azure/msal-common v16.
|
|
3895
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3827
3896
|
/*
|
|
3828
3897
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3829
3898
|
* Licensed under the MIT License.
|
|
@@ -4098,12 +4167,12 @@
|
|
|
4098
4167
|
}
|
|
4099
4168
|
}
|
|
4100
4169
|
|
|
4101
|
-
/*! @azure/msal-common v16.
|
|
4170
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4102
4171
|
/* eslint-disable header/header */
|
|
4103
4172
|
const name$1 = "@azure/msal-common";
|
|
4104
|
-
const version$1 = "16.
|
|
4173
|
+
const version$1 = "16.15.0";
|
|
4105
4174
|
|
|
4106
|
-
/*! @azure/msal-common v16.
|
|
4175
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4107
4176
|
/*
|
|
4108
4177
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4109
4178
|
* Licensed under the MIT License.
|
|
@@ -4111,7 +4180,7 @@
|
|
|
4111
4180
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4112
4181
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4113
4182
|
|
|
4114
|
-
/*! @azure/msal-common v16.
|
|
4183
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4115
4184
|
|
|
4116
4185
|
/*
|
|
4117
4186
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4149,7 +4218,7 @@
|
|
|
4149
4218
|
}
|
|
4150
4219
|
}
|
|
4151
4220
|
|
|
4152
|
-
/*! @azure/msal-common v16.
|
|
4221
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4153
4222
|
|
|
4154
4223
|
/*
|
|
4155
4224
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5336,7 +5405,7 @@
|
|
|
5336
5405
|
}
|
|
5337
5406
|
}
|
|
5338
5407
|
|
|
5339
|
-
/*! @azure/msal-common v16.
|
|
5408
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5340
5409
|
/*
|
|
5341
5410
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5342
5411
|
* Licensed under the MIT License.
|
|
@@ -5350,7 +5419,7 @@
|
|
|
5350
5419
|
const PerformanceEventStatus = {
|
|
5351
5420
|
InProgress: 1};
|
|
5352
5421
|
|
|
5353
|
-
/*! @azure/msal-common v16.
|
|
5422
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5354
5423
|
|
|
5355
5424
|
/*
|
|
5356
5425
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5408,7 +5477,7 @@
|
|
|
5408
5477
|
}
|
|
5409
5478
|
}
|
|
5410
5479
|
|
|
5411
|
-
/*! @azure/msal-common v16.
|
|
5480
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5412
5481
|
|
|
5413
5482
|
/*
|
|
5414
5483
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5506,7 +5575,7 @@
|
|
|
5506
5575
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5507
5576
|
}
|
|
5508
5577
|
|
|
5509
|
-
/*! @azure/msal-common v16.
|
|
5578
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5510
5579
|
/*
|
|
5511
5580
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5512
5581
|
* Licensed under the MIT License.
|
|
@@ -5533,7 +5602,7 @@
|
|
|
5533
5602
|
}
|
|
5534
5603
|
}
|
|
5535
5604
|
|
|
5536
|
-
/*! @azure/msal-common v16.
|
|
5605
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5537
5606
|
|
|
5538
5607
|
/*
|
|
5539
5608
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5554,7 +5623,7 @@
|
|
|
5554
5623
|
return new JoseHeaderError(code, correlationId);
|
|
5555
5624
|
}
|
|
5556
5625
|
|
|
5557
|
-
/*! @azure/msal-common v16.
|
|
5626
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5558
5627
|
/*
|
|
5559
5628
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5560
5629
|
* Licensed under the MIT License.
|
|
@@ -5579,7 +5648,7 @@
|
|
|
5579
5648
|
return Object.getPrototypeOf(value) === proto;
|
|
5580
5649
|
}
|
|
5581
5650
|
|
|
5582
|
-
/*! @azure/msal-common v16.
|
|
5651
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5583
5652
|
/*
|
|
5584
5653
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5585
5654
|
* Licensed under the MIT License.
|
|
@@ -5589,7 +5658,7 @@
|
|
|
5589
5658
|
const missingJwkError = "missing_jwk_error";
|
|
5590
5659
|
const invalidJwkError = "invalid_jwk_error";
|
|
5591
5660
|
|
|
5592
|
-
/*! @azure/msal-common v16.
|
|
5661
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5593
5662
|
|
|
5594
5663
|
/*
|
|
5595
5664
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5655,7 +5724,7 @@
|
|
|
5655
5724
|
}
|
|
5656
5725
|
}
|
|
5657
5726
|
|
|
5658
|
-
/*! @azure/msal-common v16.
|
|
5727
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5659
5728
|
|
|
5660
5729
|
/*
|
|
5661
5730
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5756,7 +5825,7 @@
|
|
|
5756
5825
|
}
|
|
5757
5826
|
}
|
|
5758
5827
|
|
|
5759
|
-
/*! @azure/msal-common v16.
|
|
5828
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5760
5829
|
|
|
5761
5830
|
/*
|
|
5762
5831
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5901,7 +5970,7 @@
|
|
|
5901
5970
|
}
|
|
5902
5971
|
}
|
|
5903
5972
|
|
|
5904
|
-
/*! @azure/msal-common v16.
|
|
5973
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5905
5974
|
/*
|
|
5906
5975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5907
5976
|
* Licensed under the MIT License.
|
|
@@ -5952,7 +6021,7 @@
|
|
|
5952
6021
|
*/
|
|
5953
6022
|
const interruptedUser = "interrupted_user";
|
|
5954
6023
|
|
|
5955
|
-
/*! @azure/msal-common v16.
|
|
6024
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5956
6025
|
|
|
5957
6026
|
/*
|
|
5958
6027
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6019,7 +6088,7 @@
|
|
|
6019
6088
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6020
6089
|
}
|
|
6021
6090
|
|
|
6022
|
-
/*! @azure/msal-common v16.
|
|
6091
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6023
6092
|
|
|
6024
6093
|
/*
|
|
6025
6094
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6038,7 +6107,7 @@
|
|
|
6038
6107
|
}
|
|
6039
6108
|
}
|
|
6040
6109
|
|
|
6041
|
-
/*! @azure/msal-common v16.
|
|
6110
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6042
6111
|
|
|
6043
6112
|
/*
|
|
6044
6113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6109,7 +6178,7 @@
|
|
|
6109
6178
|
}
|
|
6110
6179
|
}
|
|
6111
6180
|
|
|
6112
|
-
/*! @azure/msal-common v16.
|
|
6181
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6113
6182
|
|
|
6114
6183
|
/*
|
|
6115
6184
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6537,7 +6606,7 @@
|
|
|
6537
6606
|
return baseAccount;
|
|
6538
6607
|
}
|
|
6539
6608
|
|
|
6540
|
-
/*! @azure/msal-common v16.
|
|
6609
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6541
6610
|
/*
|
|
6542
6611
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6543
6612
|
* Licensed under the MIT License.
|
|
@@ -6547,7 +6616,7 @@
|
|
|
6547
6616
|
UPN: "UPN",
|
|
6548
6617
|
};
|
|
6549
6618
|
|
|
6550
|
-
/*! @azure/msal-common v16.
|
|
6619
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6551
6620
|
/*
|
|
6552
6621
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6553
6622
|
* Licensed under the MIT License.
|
|
@@ -6566,7 +6635,7 @@
|
|
|
6566
6635
|
}
|
|
6567
6636
|
}
|
|
6568
6637
|
|
|
6569
|
-
/*! @azure/msal-common v16.
|
|
6638
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6570
6639
|
|
|
6571
6640
|
/*
|
|
6572
6641
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6590,7 +6659,7 @@
|
|
|
6590
6659
|
};
|
|
6591
6660
|
}
|
|
6592
6661
|
|
|
6593
|
-
/*! @azure/msal-common v16.
|
|
6662
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6594
6663
|
|
|
6595
6664
|
/*
|
|
6596
6665
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6625,13 +6694,14 @@
|
|
|
6625
6694
|
* Performs necessary throttling checks after a network request.
|
|
6626
6695
|
* @param cacheManager
|
|
6627
6696
|
* @param thumbprint
|
|
6628
|
-
* @param response
|
|
6697
|
+
* @param response - Token response with case-insensitive header names.
|
|
6629
6698
|
*/
|
|
6630
6699
|
static postProcess(cacheManager, thumbprint, response, correlationId) {
|
|
6700
|
+
const retryAfter = getRetryAfterHeader(response);
|
|
6631
6701
|
if (ThrottlingUtils.checkResponseStatus(response) ||
|
|
6632
|
-
|
|
6702
|
+
retryAfter !== undefined) {
|
|
6633
6703
|
const thumbprintValue = {
|
|
6634
|
-
throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(
|
|
6704
|
+
throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(retryAfter || "")),
|
|
6635
6705
|
error: response.body.error,
|
|
6636
6706
|
errorCodes: response.body.error_codes,
|
|
6637
6707
|
errorMessage: response.body.error_description,
|
|
@@ -6650,14 +6720,10 @@
|
|
|
6650
6720
|
}
|
|
6651
6721
|
/**
|
|
6652
6722
|
* Checks a NetworkResponse object's RetryAfter header
|
|
6653
|
-
* @param response
|
|
6723
|
+
* @param response - Token response with case-insensitive header names.
|
|
6654
6724
|
*/
|
|
6655
6725
|
static checkResponseForRetryAfter(response) {
|
|
6656
|
-
|
|
6657
|
-
return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) &&
|
|
6658
|
-
(response.status < 200 || response.status >= 300));
|
|
6659
|
-
}
|
|
6660
|
-
return false;
|
|
6726
|
+
return getRetryAfterHeader(response) !== undefined;
|
|
6661
6727
|
}
|
|
6662
6728
|
/**
|
|
6663
6729
|
* Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.
|
|
@@ -6674,9 +6740,16 @@
|
|
|
6674
6740
|
const key = this.generateThrottlingStorageKey(thumbprint);
|
|
6675
6741
|
cacheManager.removeItem(key, request.correlationId);
|
|
6676
6742
|
}
|
|
6743
|
+
}
|
|
6744
|
+
/** Reads Retry-After only for non-success responses. */
|
|
6745
|
+
function getRetryAfterHeader(response) {
|
|
6746
|
+
if ((response.status < 200 || response.status >= 300) && response.headers) {
|
|
6747
|
+
return getResponseHeader(response.headers, HeaderNames.RETRY_AFTER);
|
|
6748
|
+
}
|
|
6749
|
+
return undefined;
|
|
6677
6750
|
}
|
|
6678
6751
|
|
|
6679
|
-
/*! @azure/msal-common v16.
|
|
6752
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6680
6753
|
|
|
6681
6754
|
/*
|
|
6682
6755
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6707,7 +6780,7 @@
|
|
|
6707
6780
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6708
6781
|
}
|
|
6709
6782
|
|
|
6710
|
-
/*! @azure/msal-common v16.
|
|
6783
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6711
6784
|
|
|
6712
6785
|
/*
|
|
6713
6786
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6805,7 +6878,8 @@
|
|
|
6805
6878
|
let response;
|
|
6806
6879
|
try {
|
|
6807
6880
|
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
|
|
6808
|
-
const responseHeaders = response.headers || {};
|
|
6881
|
+
const responseHeaders = normalizeResponseHeaders(response.headers || {});
|
|
6882
|
+
response = { ...response, headers: responseHeaders };
|
|
6809
6883
|
performanceClient?.addFields({
|
|
6810
6884
|
refreshTokenSize: response.body.refresh_token?.length || 0,
|
|
6811
6885
|
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "",
|
|
@@ -6814,16 +6888,16 @@
|
|
|
6814
6888
|
}
|
|
6815
6889
|
catch (e) {
|
|
6816
6890
|
if (e instanceof NetworkError) {
|
|
6817
|
-
const responseHeaders = e.responseHeaders
|
|
6891
|
+
const responseHeaders = e.responseHeaders
|
|
6892
|
+
? normalizeResponseHeaders(e.responseHeaders)
|
|
6893
|
+
: undefined;
|
|
6818
6894
|
if (responseHeaders) {
|
|
6819
6895
|
performanceClient?.addFields({
|
|
6820
6896
|
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] ||
|
|
6821
6897
|
"",
|
|
6822
6898
|
requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
|
|
6823
|
-
contentTypeHeader: responseHeaders
|
|
6824
|
-
|
|
6825
|
-
contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||
|
|
6826
|
-
undefined,
|
|
6899
|
+
contentTypeHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_TYPE) || undefined,
|
|
6900
|
+
contentLengthHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_LENGTH) || undefined,
|
|
6827
6901
|
httpStatus: e.httpStatus,
|
|
6828
6902
|
}, correlationId);
|
|
6829
6903
|
}
|
|
@@ -6840,7 +6914,7 @@
|
|
|
6840
6914
|
return response;
|
|
6841
6915
|
}
|
|
6842
6916
|
|
|
6843
|
-
/*! @azure/msal-common v16.
|
|
6917
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6844
6918
|
|
|
6845
6919
|
/*
|
|
6846
6920
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7084,6 +7158,9 @@
|
|
|
7084
7158
|
if (request.logoutHint) {
|
|
7085
7159
|
addLogoutHint(parameters, request.logoutHint);
|
|
7086
7160
|
}
|
|
7161
|
+
if (request.popupOriginCheckDone) {
|
|
7162
|
+
addPopupOriginCheckDone(parameters);
|
|
7163
|
+
}
|
|
7087
7164
|
if (request.extraQueryParameters) {
|
|
7088
7165
|
addExtraParameters(parameters, request.extraQueryParameters);
|
|
7089
7166
|
}
|
|
@@ -7104,7 +7181,7 @@
|
|
|
7104
7181
|
}
|
|
7105
7182
|
}
|
|
7106
7183
|
|
|
7107
|
-
/*! @azure/msal-common v16.
|
|
7184
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7108
7185
|
|
|
7109
7186
|
/*
|
|
7110
7187
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7239,6 +7316,9 @@
|
|
|
7239
7316
|
!Object.keys(request.extraQueryParameters).includes(INSTANCE_AWARE))) {
|
|
7240
7317
|
addInstanceAware(parameters);
|
|
7241
7318
|
}
|
|
7319
|
+
if (request.popupOriginCheckDone) {
|
|
7320
|
+
addPopupOriginCheckDone(parameters);
|
|
7321
|
+
}
|
|
7242
7322
|
return parameters;
|
|
7243
7323
|
}
|
|
7244
7324
|
/**
|
|
@@ -7331,7 +7411,7 @@
|
|
|
7331
7411
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7332
7412
|
}
|
|
7333
7413
|
|
|
7334
|
-
/*! @azure/msal-common v16.
|
|
7414
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7335
7415
|
|
|
7336
7416
|
/*
|
|
7337
7417
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7566,7 +7646,7 @@
|
|
|
7566
7646
|
}
|
|
7567
7647
|
}
|
|
7568
7648
|
|
|
7569
|
-
/*! @azure/msal-common v16.
|
|
7649
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7570
7650
|
|
|
7571
7651
|
/*
|
|
7572
7652
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7859,7 +7939,7 @@
|
|
|
7859
7939
|
clearNativeBrokerErrorCode() { }
|
|
7860
7940
|
}
|
|
7861
7941
|
|
|
7862
|
-
/*! @azure/msal-common v16.
|
|
7942
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7863
7943
|
|
|
7864
7944
|
/*
|
|
7865
7945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7986,7 +8066,7 @@
|
|
|
7986
8066
|
}
|
|
7987
8067
|
}
|
|
7988
8068
|
|
|
7989
|
-
/*! @azure/msal-common v16.
|
|
8069
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7990
8070
|
|
|
7991
8071
|
/*
|
|
7992
8072
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8002,7 +8082,7 @@
|
|
|
8002
8082
|
},
|
|
8003
8083
|
};
|
|
8004
8084
|
|
|
8005
|
-
/*! @azure/msal-common v16.
|
|
8085
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8006
8086
|
|
|
8007
8087
|
/*
|
|
8008
8088
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8438,7 +8518,7 @@
|
|
|
8438
8518
|
|
|
8439
8519
|
/* eslint-disable header/header */
|
|
8440
8520
|
const name = "@azure/msal-browser";
|
|
8441
|
-
const version = "5.
|
|
8521
|
+
const version = "5.27.0";
|
|
8442
8522
|
|
|
8443
8523
|
/*
|
|
8444
8524
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9884,9 +9964,14 @@
|
|
|
9884
9964
|
};
|
|
9885
9965
|
}
|
|
9886
9966
|
/**
|
|
9887
|
-
* Clears
|
|
9967
|
+
* Clears a recognized authentication response fragment, preserving the query string.
|
|
9968
|
+
* Assigns an empty hash, then removes the trailing # when history updates are available.
|
|
9888
9969
|
*/
|
|
9889
9970
|
function clearHash(contentWindow) {
|
|
9971
|
+
const serverParams = getDeserializedResponse(contentWindow.location.hash);
|
|
9972
|
+
if (!serverParams) {
|
|
9973
|
+
return;
|
|
9974
|
+
}
|
|
9890
9975
|
// Office.js sets history.replaceState to null
|
|
9891
9976
|
contentWindow.location.hash = "";
|
|
9892
9977
|
if (typeof contentWindow.history.replaceState === "function") {
|
|
@@ -9894,6 +9979,16 @@
|
|
|
9894
9979
|
contentWindow.history.replaceState(null, "", `${contentWindow.location.origin}${contentWindow.location.pathname}${contentWindow.location.search}`);
|
|
9895
9980
|
}
|
|
9896
9981
|
}
|
|
9982
|
+
/**
|
|
9983
|
+
* Strips both hash and query string from the given window's URL by replacing
|
|
9984
|
+
* with origin + pathname only. Used to remove auth response parameters
|
|
9985
|
+
* (auth code, state, etc.) before the window is closed or navigated away.
|
|
9986
|
+
*/
|
|
9987
|
+
function clearAuthResponseFromUrl(contentWindow) {
|
|
9988
|
+
if (typeof contentWindow.history?.replaceState === "function") {
|
|
9989
|
+
contentWindow.history.replaceState(null, "", `${contentWindow.location.origin}${contentWindow.location.pathname}`);
|
|
9990
|
+
}
|
|
9991
|
+
}
|
|
9897
9992
|
/**
|
|
9898
9993
|
* Replaces current hash with hash from provided url
|
|
9899
9994
|
*/
|
|
@@ -11079,6 +11174,90 @@
|
|
|
11079
11174
|
return httpMethod;
|
|
11080
11175
|
}
|
|
11081
11176
|
|
|
11177
|
+
/*
|
|
11178
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11179
|
+
* Licensed under the MIT License.
|
|
11180
|
+
*/
|
|
11181
|
+
/**
|
|
11182
|
+
* `window.origin` of a document with an opaque origin, e.g. one sandboxed
|
|
11183
|
+
* without `allow-same-origin`. Read from `window.origin`, not
|
|
11184
|
+
* `location.origin`, which reports the real host even when sandboxed.
|
|
11185
|
+
*/
|
|
11186
|
+
const OPAQUE_ORIGIN = "null";
|
|
11187
|
+
/**
|
|
11188
|
+
* Returns `true` when every ancestor browsing context is same-origin with
|
|
11189
|
+
* `win`. A top-level document has no ancestors, so it always passes.
|
|
11190
|
+
*/
|
|
11191
|
+
function allAncestorsSameOrigin(win) {
|
|
11192
|
+
try {
|
|
11193
|
+
// Sandboxed: no origin to compare ancestors against.
|
|
11194
|
+
if (win.origin === OPAQUE_ORIGIN) {
|
|
11195
|
+
return false;
|
|
11196
|
+
}
|
|
11197
|
+
let current = win;
|
|
11198
|
+
// `window.parent` is self-referential at the top level, never falsy.
|
|
11199
|
+
while (current !== current.parent) {
|
|
11200
|
+
current = current.parent;
|
|
11201
|
+
// Throws SecurityError if this ancestor is cross-origin.
|
|
11202
|
+
void current.location.href;
|
|
11203
|
+
}
|
|
11204
|
+
return true;
|
|
11205
|
+
}
|
|
11206
|
+
catch {
|
|
11207
|
+
return false;
|
|
11208
|
+
}
|
|
11209
|
+
}
|
|
11210
|
+
/**
|
|
11211
|
+
* Returns `true` when the top-level window has no opener, or one that is
|
|
11212
|
+
* same-origin with it.
|
|
11213
|
+
*
|
|
11214
|
+
* Reads the opener from `win.top`, not `win`: a framed document always reports
|
|
11215
|
+
* `window.opener === null` and would pass while the top window's untrusted
|
|
11216
|
+
* opener still holds a handle on it.
|
|
11217
|
+
*/
|
|
11218
|
+
function topOpenerIsSameOriginOrAbsent(win) {
|
|
11219
|
+
try {
|
|
11220
|
+
const top = win.top;
|
|
11221
|
+
if (!top) {
|
|
11222
|
+
// Detached from its browsing context; treat as unsafe.
|
|
11223
|
+
return false;
|
|
11224
|
+
}
|
|
11225
|
+
const opener = top.opener;
|
|
11226
|
+
if (!opener || opener === top) {
|
|
11227
|
+
return true;
|
|
11228
|
+
}
|
|
11229
|
+
// Throws SecurityError if the opener is cross-origin.
|
|
11230
|
+
void opener.location.href;
|
|
11231
|
+
return true;
|
|
11232
|
+
}
|
|
11233
|
+
catch {
|
|
11234
|
+
return false;
|
|
11235
|
+
}
|
|
11236
|
+
}
|
|
11237
|
+
/**
|
|
11238
|
+
* Computes the `pocd` ("popup origin check done") authorize parameter value.
|
|
11239
|
+
*
|
|
11240
|
+
* `1` means no untrusted window can reach the popup, which is what lets Entra
|
|
11241
|
+
* omit the `Cross-Origin-Opener-Policy` response header for the request.
|
|
11242
|
+
*
|
|
11243
|
+
* @param config Resolved browser configuration.
|
|
11244
|
+
* @param win Window whose hosting environment is being checked. Defaults to the app window.
|
|
11245
|
+
* @returns `1` when the check passes, otherwise `0`.
|
|
11246
|
+
*/
|
|
11247
|
+
function computePocd(config, win = typeof window !== "undefined" ? window : undefined) {
|
|
11248
|
+
/*
|
|
11249
|
+
* Only an explicit false opts out; anything else computes the check, so an
|
|
11250
|
+
* unresolved config fails closed rather than asserting pocd=1.
|
|
11251
|
+
*/
|
|
11252
|
+
if (config.auth.originCheck === false) {
|
|
11253
|
+
return 1;
|
|
11254
|
+
}
|
|
11255
|
+
if (!win || !allAncestorsSameOrigin(win)) {
|
|
11256
|
+
return 0;
|
|
11257
|
+
}
|
|
11258
|
+
return topOpenerIsSameOriginOrAbsent(win) ? 1 : 0;
|
|
11259
|
+
}
|
|
11260
|
+
|
|
11082
11261
|
/*
|
|
11083
11262
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11084
11263
|
* Licensed under the MIT License.
|
|
@@ -11096,6 +11275,11 @@
|
|
|
11096
11275
|
const validLogoutRequest = {
|
|
11097
11276
|
correlationId: this.correlationId,
|
|
11098
11277
|
...logoutRequest,
|
|
11278
|
+
/*
|
|
11279
|
+
* Computed here rather than per flow so every end-session request
|
|
11280
|
+
* carries it, matching the authorize path.
|
|
11281
|
+
*/
|
|
11282
|
+
popupOriginCheckDone: computePocd(this.config) === 1,
|
|
11099
11283
|
};
|
|
11100
11284
|
/**
|
|
11101
11285
|
* Set logout_hint to be login_hint from ID Token Claims if present
|
|
@@ -19815,6 +19999,116 @@
|
|
|
19815
19999
|
return browserStorage.getActiveAccount(correlationId);
|
|
19816
20000
|
}
|
|
19817
20001
|
|
|
20002
|
+
/*
|
|
20003
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20004
|
+
* Licensed under the MIT License.
|
|
20005
|
+
*/
|
|
20006
|
+
const POPUP_POLL_INTERVAL_MS = 30;
|
|
20007
|
+
let activePopupPoller;
|
|
20008
|
+
/**
|
|
20009
|
+
* Cancels legacy popup polling when an interaction is superseded.
|
|
20010
|
+
*
|
|
20011
|
+
* @internal
|
|
20012
|
+
* @param logger Logger for the interaction.
|
|
20013
|
+
*/
|
|
20014
|
+
function cancelPendingPopupPollingResponse(logger) {
|
|
20015
|
+
if (activePopupPoller) {
|
|
20016
|
+
logger.verbose("PopupMonitor.cancelPendingPopupPollingResponse - Cancelling pending popup poller", activePopupPoller.correlationId);
|
|
20017
|
+
activePopupPoller.cancel();
|
|
20018
|
+
}
|
|
20019
|
+
}
|
|
20020
|
+
/**
|
|
20021
|
+
* Monitors a popup window for a URL change to the same origin as the parent application.
|
|
20022
|
+
* Polls the popup at a specified interval until it is redirected back to the application,
|
|
20023
|
+
* closed by the user, or a navigation to a same-origin URL is detected. Once a same-origin
|
|
20024
|
+
* URL is detected, extracts the response string (query or hash) and resolves the promise.
|
|
20025
|
+
*
|
|
20026
|
+
* @param popupWindow - The popup window to monitor for navigation.
|
|
20027
|
+
* @param popupWindowParent - The parent window that opened the popup.
|
|
20028
|
+
* @param responseMode - Response mode (`"query"` | `"fragment"`) determines whether
|
|
20029
|
+
* to read `location.search` or `location.hash` from the popup once on the same
|
|
20030
|
+
* origin. Any value other than `"query"` is treated as fragment.
|
|
20031
|
+
* @param logger - Logger instance.
|
|
20032
|
+
* @param unloadWindow - Event handler to remove from the parent window on cleanup.
|
|
20033
|
+
* @param correlationId
|
|
20034
|
+
*/
|
|
20035
|
+
async function monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadWindow, correlationId) {
|
|
20036
|
+
let poller;
|
|
20037
|
+
return new Promise((resolve, reject) => {
|
|
20038
|
+
logger.verbose("PopupMonitor.monitorPopupForHash - polling started", correlationId);
|
|
20039
|
+
const intervalId = window.setInterval(() => {
|
|
20040
|
+
if (popupWindow.closed) {
|
|
20041
|
+
logger.error("PopupMonitor.monitorPopupForHash - window closed", correlationId);
|
|
20042
|
+
window.clearInterval(intervalId);
|
|
20043
|
+
reject(new BrowserAuthError(userCancelled, correlationId));
|
|
20044
|
+
return;
|
|
20045
|
+
}
|
|
20046
|
+
let href = "";
|
|
20047
|
+
try {
|
|
20048
|
+
/*
|
|
20049
|
+
* Will throw if cross origin,
|
|
20050
|
+
* which should be caught and ignored
|
|
20051
|
+
* since we need the interval to keep running while on STS UI.
|
|
20052
|
+
*/
|
|
20053
|
+
href = popupWindow.location.href;
|
|
20054
|
+
}
|
|
20055
|
+
catch (e) { }
|
|
20056
|
+
// Don't process blank pages or cross domain
|
|
20057
|
+
if (!href || href === "about:blank") {
|
|
20058
|
+
return;
|
|
20059
|
+
}
|
|
20060
|
+
window.clearInterval(intervalId);
|
|
20061
|
+
let responseString;
|
|
20062
|
+
if (responseMode === ResponseMode.QUERY) {
|
|
20063
|
+
responseString = popupWindow.location.search;
|
|
20064
|
+
}
|
|
20065
|
+
else {
|
|
20066
|
+
responseString = popupWindow.location.hash;
|
|
20067
|
+
}
|
|
20068
|
+
logger.verbose("PopupMonitor.monitorPopupForHash - popup window is on same origin as caller", correlationId);
|
|
20069
|
+
resolve(responseString);
|
|
20070
|
+
}, POPUP_POLL_INTERVAL_MS);
|
|
20071
|
+
poller = {
|
|
20072
|
+
correlationId,
|
|
20073
|
+
cancel: () => {
|
|
20074
|
+
window.clearInterval(intervalId);
|
|
20075
|
+
if (activePopupPoller === poller) {
|
|
20076
|
+
activePopupPoller = undefined;
|
|
20077
|
+
}
|
|
20078
|
+
reject(new BrowserAuthError(interactionInProgressCancelled, correlationId));
|
|
20079
|
+
},
|
|
20080
|
+
};
|
|
20081
|
+
activePopupPoller = poller;
|
|
20082
|
+
}).finally(() => {
|
|
20083
|
+
if (poller && activePopupPoller === poller) {
|
|
20084
|
+
activePopupPoller = undefined;
|
|
20085
|
+
}
|
|
20086
|
+
cleanPopup(popupWindow, popupWindowParent, unloadWindow);
|
|
20087
|
+
});
|
|
20088
|
+
}
|
|
20089
|
+
/**
|
|
20090
|
+
* Performs cleanup operations after popup authentication.
|
|
20091
|
+
* Strips auth-response params (code/state) from the popup URL while it is still
|
|
20092
|
+
* open, closes the popup window, and removes the 'beforeunload' event listener
|
|
20093
|
+
* from the parent window.
|
|
20094
|
+
*
|
|
20095
|
+
* @param popupWindow - The popup window to be closed.
|
|
20096
|
+
* @param popupWindowParent - The parent window from which the event listener will be removed.
|
|
20097
|
+
* @param unloadWindow - The event handler function to remove.
|
|
20098
|
+
*/
|
|
20099
|
+
function cleanPopup(popupWindow, popupWindowParent, unloadWindow) {
|
|
20100
|
+
if (!popupWindow.closed) {
|
|
20101
|
+
try {
|
|
20102
|
+
clearAuthResponseFromUrl(popupWindow);
|
|
20103
|
+
}
|
|
20104
|
+
catch {
|
|
20105
|
+
// Popup may have become cross-origin or otherwise inaccessible; ignore.
|
|
20106
|
+
}
|
|
20107
|
+
}
|
|
20108
|
+
popupWindow.close();
|
|
20109
|
+
popupWindowParent.removeEventListener("beforeunload", unloadWindow);
|
|
20110
|
+
}
|
|
20111
|
+
|
|
19818
20112
|
/*
|
|
19819
20113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19820
20114
|
* Licensed under the MIT License.
|
|
@@ -21205,7 +21499,16 @@
|
|
|
21205
21499
|
* @returns
|
|
21206
21500
|
*/
|
|
21207
21501
|
async function getStandardParameters(config, authority, request, logger, performanceClient) {
|
|
21208
|
-
const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority },
|
|
21502
|
+
const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, {
|
|
21503
|
+
...request,
|
|
21504
|
+
/*
|
|
21505
|
+
* Computed here rather than per flow so every authorize request
|
|
21506
|
+
* carries it — GET, POST and EAR, interactive and silent alike.
|
|
21507
|
+
* A request may assert it instead when the topology, rather than
|
|
21508
|
+
* the current window, is what makes the popup unreachable.
|
|
21509
|
+
*/
|
|
21510
|
+
popupOriginCheckDone: request.popupOriginCheckDone ?? computePocd(config) === 1,
|
|
21511
|
+
}, logger, performanceClient);
|
|
21209
21512
|
addLibraryInfo(parameters, {
|
|
21210
21513
|
sku: BrowserConstants.MSAL_SKU,
|
|
21211
21514
|
version: version,
|
|
@@ -21259,6 +21562,15 @@
|
|
|
21259
21562
|
});
|
|
21260
21563
|
return getAuthorizeUrl(authority, parameters);
|
|
21261
21564
|
}
|
|
21565
|
+
function getAuthorizeFormAction(authority, request, parameters) {
|
|
21566
|
+
const queryParams = new Map();
|
|
21567
|
+
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
21568
|
+
if (parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
|
|
21569
|
+
queryParams.delete(POPUP_ORIGIN_CHECK_DONE);
|
|
21570
|
+
}
|
|
21571
|
+
addCorrelationId(queryParams, request.correlationId);
|
|
21572
|
+
return getAuthorizeUrl(authority, queryParams);
|
|
21573
|
+
}
|
|
21262
21574
|
/**
|
|
21263
21575
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
21264
21576
|
*/
|
|
@@ -21274,11 +21586,7 @@
|
|
|
21274
21586
|
addExtraParameters(parameters, {
|
|
21275
21587
|
...request.extraParameters,
|
|
21276
21588
|
});
|
|
21277
|
-
const
|
|
21278
|
-
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
21279
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
21280
|
-
addCorrelationId(queryParams, request.correlationId);
|
|
21281
|
-
const action = getAuthorizeUrl(authority, queryParams);
|
|
21589
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
21282
21590
|
return { action, fields: Object.fromEntries(parameters) };
|
|
21283
21591
|
}
|
|
21284
21592
|
/**
|
|
@@ -21299,12 +21607,7 @@
|
|
|
21299
21607
|
addExtraParameters(parameters, {
|
|
21300
21608
|
...request.extraParameters,
|
|
21301
21609
|
});
|
|
21302
|
-
|
|
21303
|
-
const queryParams = new Map();
|
|
21304
|
-
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
21305
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
21306
|
-
addCorrelationId(queryParams, request.correlationId);
|
|
21307
|
-
const action = getAuthorizeUrl(authority, queryParams);
|
|
21610
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
21308
21611
|
return { action, fields: Object.fromEntries(parameters) };
|
|
21309
21612
|
}
|
|
21310
21613
|
/**
|
|
@@ -21691,7 +21994,7 @@
|
|
|
21691
21994
|
*/
|
|
21692
21995
|
// Default timeout for popup windows and iframes in milliseconds
|
|
21693
21996
|
const DEFAULT_POPUP_TIMEOUT_MS = 60000;
|
|
21694
|
-
const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
|
|
21997
|
+
const DEFAULT_IFRAME_TIMEOUT_MS$1 = 10000;
|
|
21695
21998
|
const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
|
|
21696
21999
|
const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
|
|
21697
22000
|
/**
|
|
@@ -21732,6 +22035,8 @@
|
|
|
21732
22035
|
instanceAware: false,
|
|
21733
22036
|
isMcp: false,
|
|
21734
22037
|
verifySSO: false,
|
|
22038
|
+
// Legacy polling needs COOP omitted, so it implies asserting pocd=1.
|
|
22039
|
+
originCheck: !userInputSystem?.enableLegacyPolling,
|
|
21735
22040
|
};
|
|
21736
22041
|
// Default cache options for browser
|
|
21737
22042
|
const DEFAULT_CACHE_OPTIONS = {
|
|
@@ -21756,7 +22061,7 @@
|
|
|
21756
22061
|
: StubbedNetworkModule,
|
|
21757
22062
|
navigationClient: new NavigationClient(),
|
|
21758
22063
|
popupBridgeTimeout: userInputSystem?.popupBridgeTimeout || DEFAULT_POPUP_TIMEOUT_MS,
|
|
21759
|
-
iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS,
|
|
22064
|
+
iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS$1,
|
|
21760
22065
|
redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,
|
|
21761
22066
|
allowRedirectInIframe: false,
|
|
21762
22067
|
navigatePopups: true,
|
|
@@ -21765,6 +22070,7 @@
|
|
|
21765
22070
|
DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
|
|
21766
22071
|
protocolMode: ProtocolMode.AAD,
|
|
21767
22072
|
serverTelemetryEnabled: false,
|
|
22073
|
+
enableLegacyPolling: false,
|
|
21768
22074
|
};
|
|
21769
22075
|
const providedSystemOptions = {
|
|
21770
22076
|
...DEFAULT_BROWSER_SYSTEM_OPTIONS,
|
|
@@ -21782,11 +22088,17 @@
|
|
|
21782
22088
|
iframeTimeoutTelemetry: false,
|
|
21783
22089
|
allowPlatformBrokerWithDOM: false,
|
|
21784
22090
|
};
|
|
22091
|
+
let logger;
|
|
22092
|
+
const getLogger = () => {
|
|
22093
|
+
if (!logger) {
|
|
22094
|
+
logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
22095
|
+
}
|
|
22096
|
+
return logger;
|
|
22097
|
+
};
|
|
21785
22098
|
// Throw an error if user has set OIDCOptions without being in OIDC protocol mode
|
|
21786
22099
|
if (userInputSystem?.protocolMode !== ProtocolMode.OIDC &&
|
|
21787
22100
|
userInputAuth?.OIDCOptions) {
|
|
21788
|
-
|
|
21789
|
-
logger.warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
|
|
22101
|
+
getLogger().warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
|
|
21790
22102
|
}
|
|
21791
22103
|
// Throw an error if user has set allowPlatformBroker to true with OIDC protocol mode
|
|
21792
22104
|
if (userInputSystem?.protocolMode &&
|
|
@@ -21794,6 +22106,24 @@
|
|
|
21794
22106
|
providedSystemOptions?.allowPlatformBroker) {
|
|
21795
22107
|
throw createClientConfigurationError(cannotAllowPlatformBroker, "");
|
|
21796
22108
|
}
|
|
22109
|
+
/*
|
|
22110
|
+
* The origin check computes 0 in the embedded contexts legacy polling
|
|
22111
|
+
* serves, so re-enabling it there breaks the flow. Honor it, but warn.
|
|
22112
|
+
*/
|
|
22113
|
+
if (userInputSystem?.enableLegacyPolling &&
|
|
22114
|
+
userInputAuth?.originCheck === true) {
|
|
22115
|
+
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.", "");
|
|
22116
|
+
}
|
|
22117
|
+
/*
|
|
22118
|
+
* Opting out is a deliberate risk transfer, not an error — but the app
|
|
22119
|
+
* cannot know at config time that the risky topology is actually present.
|
|
22120
|
+
*/
|
|
22121
|
+
if ((userInputAuth?.originCheck ?? DEFAULT_AUTH_OPTIONS.originCheck) ===
|
|
22122
|
+
false &&
|
|
22123
|
+
typeof window !== "undefined" &&
|
|
22124
|
+
!topOpenerIsSameOriginOrAbsent(window)) {
|
|
22125
|
+
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.", "");
|
|
22126
|
+
}
|
|
21797
22127
|
const overlayedConfig = {
|
|
21798
22128
|
auth: {
|
|
21799
22129
|
...DEFAULT_AUTH_OPTIONS,
|
|
@@ -22602,6 +22932,9 @@
|
|
|
22602
22932
|
popupWindowAttributes: logoutRequest?.popupWindowAttributes || {},
|
|
22603
22933
|
popupWindowParent: logoutRequest?.popupWindowParent ?? window,
|
|
22604
22934
|
};
|
|
22935
|
+
validLogoutRequest.popupOriginCheckDone =
|
|
22936
|
+
this.getPopupOriginCheckDone(popupParams.popupWindowParent) ??
|
|
22937
|
+
validLogoutRequest.popupOriginCheckDone;
|
|
22605
22938
|
const authority = logoutRequest && logoutRequest.authority;
|
|
22606
22939
|
const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;
|
|
22607
22940
|
// navigatePopups flag set to false. Acquires token without first opening popup. Popup will be opened later asynchronously.
|
|
@@ -22666,6 +22999,7 @@
|
|
|
22666
22999
|
...request,
|
|
22667
23000
|
codeChallenge: pkce.challenge,
|
|
22668
23001
|
...tokenBindingParams,
|
|
23002
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
22669
23003
|
};
|
|
22670
23004
|
try {
|
|
22671
23005
|
// Initialize the client
|
|
@@ -22729,6 +23063,7 @@
|
|
|
22729
23063
|
earJwk: earJwk,
|
|
22730
23064
|
codeChallenge: pkce.challenge,
|
|
22731
23065
|
...tokenBindingParams,
|
|
23066
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
22732
23067
|
};
|
|
22733
23068
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
22734
23069
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
@@ -23001,6 +23336,27 @@
|
|
|
23001
23336
|
getRelayStateId(state, correlationId) {
|
|
23002
23337
|
return parseRequestState(base64Decode, state, correlationId).libraryState.id;
|
|
23003
23338
|
}
|
|
23339
|
+
/**
|
|
23340
|
+
* Asserts `pocd=1` for the relay flow. Direct popups also require the
|
|
23341
|
+
* environment of a delegated opening window to pass the origin check.
|
|
23342
|
+
*
|
|
23343
|
+
* With a relay the IdP window is a grandchild popup, which an untrusted
|
|
23344
|
+
* ancestor cannot reach by name — so the topology satisfies the check by
|
|
23345
|
+
* construction. The current window is framed and would otherwise compute
|
|
23346
|
+
* `0`. Without a delegated parent, the standard app check remains unchanged.
|
|
23347
|
+
*
|
|
23348
|
+
* @param popupWindowParent Window that opens the popup.
|
|
23349
|
+
*/
|
|
23350
|
+
getPopupOriginCheckDone(popupWindowParent) {
|
|
23351
|
+
if (this.config.auth.popupRelayUri) {
|
|
23352
|
+
return true;
|
|
23353
|
+
}
|
|
23354
|
+
if (popupWindowParent !== window) {
|
|
23355
|
+
return (computePocd(this.config) === 1 &&
|
|
23356
|
+
computePocd(this.config, popupWindowParent) === 1);
|
|
23357
|
+
}
|
|
23358
|
+
return undefined;
|
|
23359
|
+
}
|
|
23004
23360
|
/**
|
|
23005
23361
|
* Opens the interactive popup for a POST-form /authorize request. Shared by
|
|
23006
23362
|
* the auth-code POST and EAR flows, which are identical apart from the form
|
|
@@ -23323,7 +23679,6 @@
|
|
|
23323
23679
|
}
|
|
23324
23680
|
return [null, ""];
|
|
23325
23681
|
}
|
|
23326
|
-
clearHash(window);
|
|
23327
23682
|
this.logger.verbose("Hash contains known properties, returning response hash", this.correlationId);
|
|
23328
23683
|
return [response, responseString];
|
|
23329
23684
|
}
|
|
@@ -24282,7 +24637,32 @@
|
|
|
24282
24637
|
* @returns
|
|
24283
24638
|
*/
|
|
24284
24639
|
async handleRedirectPromiseInternal(options) {
|
|
24285
|
-
|
|
24640
|
+
// Preserve the response for RedirectClient before removing it from the URL.
|
|
24641
|
+
const responseString = options?.hash ||
|
|
24642
|
+
(this.config.auth.OIDCOptions.responseMode ===
|
|
24643
|
+
ResponseMode.QUERY
|
|
24644
|
+
? window.location.search
|
|
24645
|
+
: window.location.hash);
|
|
24646
|
+
const anyClientInteractionInProgress = this.browserStorage.isInteractionInProgress(false);
|
|
24647
|
+
const currentClientInteraction = this.browserStorage.isInteractionInProgress(true);
|
|
24648
|
+
const isBridgeCallback = isInPopup() ||
|
|
24649
|
+
(isInIframe() &&
|
|
24650
|
+
!this.config.system.allowRedirectInIframe);
|
|
24651
|
+
/*
|
|
24652
|
+
* Clear recognized response fragments for:
|
|
24653
|
+
* - Stale callbacks with no pending interaction.
|
|
24654
|
+
* - This client's login callback, even if request setup or response validation fails.
|
|
24655
|
+
* - This client's logout callback containing state, before the SIGNOUT early return.
|
|
24656
|
+
* Leave another client's callback untouched. clearHash preserves query strings
|
|
24657
|
+
* and application routes, and does nothing when no response fragment is present.
|
|
24658
|
+
* Skip popup and non-redirect iframe callbacks: legacy apps may call HRP
|
|
24659
|
+
* before their redirect bridge reads and broadcasts the response.
|
|
24660
|
+
*/
|
|
24661
|
+
if (!isBridgeCallback &&
|
|
24662
|
+
(!anyClientInteractionInProgress || currentClientInteraction)) {
|
|
24663
|
+
clearHash(window);
|
|
24664
|
+
}
|
|
24665
|
+
if (!currentClientInteraction) {
|
|
24286
24666
|
this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null.", "");
|
|
24287
24667
|
return null;
|
|
24288
24668
|
}
|
|
@@ -24290,7 +24670,7 @@
|
|
|
24290
24670
|
if (interactionType === INTERACTION_TYPE.SIGNOUT) {
|
|
24291
24671
|
this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out", "");
|
|
24292
24672
|
this.browserStorage.setInteractionInProgress(false);
|
|
24293
|
-
return
|
|
24673
|
+
return null;
|
|
24294
24674
|
}
|
|
24295
24675
|
const loggedInAccounts = this.getAllAccounts();
|
|
24296
24676
|
const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
|
|
@@ -24320,7 +24700,9 @@
|
|
|
24320
24700
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
24321
24701
|
this.logger.trace("handleRedirectPromise - acquiring token from web flow", correlationId);
|
|
24322
24702
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
24323
|
-
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options
|
|
24703
|
+
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options?.hash
|
|
24704
|
+
? options
|
|
24705
|
+
: { ...options, hash: responseString });
|
|
24324
24706
|
}
|
|
24325
24707
|
}
|
|
24326
24708
|
catch (e) {
|
|
@@ -24468,6 +24850,9 @@
|
|
|
24468
24850
|
this.logger.verbose("acquireTokenPopup called", correlationId);
|
|
24469
24851
|
preflightCheck(this.initialized, atPopupMeasurement, this.config, request);
|
|
24470
24852
|
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN, request.overrideInteractionInProgress, correlationId);
|
|
24853
|
+
if (request.overrideInteractionInProgress) {
|
|
24854
|
+
cancelPendingPopupPollingResponse(this.logger);
|
|
24855
|
+
}
|
|
24471
24856
|
}
|
|
24472
24857
|
catch (e) {
|
|
24473
24858
|
// Since this function is syncronous we need to reject
|
|
@@ -26566,6 +26951,79 @@
|
|
|
26566
26951
|
*/
|
|
26567
26952
|
NestedAppOperatingContext.ID = "NestedAppOperatingContext";
|
|
26568
26953
|
|
|
26954
|
+
/*
|
|
26955
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
26956
|
+
* Licensed under the MIT License.
|
|
26957
|
+
*/
|
|
26958
|
+
const IFRAME_POLL_INTERVAL_MS = 50;
|
|
26959
|
+
const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
|
|
26960
|
+
/**
|
|
26961
|
+
* Monitors an iframe content window until it loads a URL with a known hash, or hits a specified timeout.
|
|
26962
|
+
*
|
|
26963
|
+
* @param iframe - The hidden iframe to monitor.
|
|
26964
|
+
* @param timeout - Maximum time (ms) to wait for navigation before rejecting with
|
|
26965
|
+
* `monitor_window_timeout`.
|
|
26966
|
+
* @param logger - Logger instance.
|
|
26967
|
+
* @param correlationId
|
|
26968
|
+
* @param responseMode - `"query"` or `"fragment"` — determines whether to read
|
|
26969
|
+
* `location.search` or `location.hash`. Any value other than `"query"` is
|
|
26970
|
+
* treated as fragment.
|
|
26971
|
+
*/
|
|
26972
|
+
async function monitorIframeForHash(iframe, timeout, logger, correlationId, responseMode) {
|
|
26973
|
+
return new Promise((resolve, reject) => {
|
|
26974
|
+
if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {
|
|
26975
|
+
logger.warning(`system.iframeBridgeTimeout set to lower (${timeout}ms) than the default (${DEFAULT_IFRAME_TIMEOUT_MS}ms). This may result in timeouts.`, correlationId);
|
|
26976
|
+
}
|
|
26977
|
+
/*
|
|
26978
|
+
* Polling for iframes can be purely timing based,
|
|
26979
|
+
* since we don't need to account for interaction.
|
|
26980
|
+
*/
|
|
26981
|
+
const timeoutId = window.setTimeout(() => {
|
|
26982
|
+
window.clearInterval(intervalId);
|
|
26983
|
+
reject(new AuthError(timedOut, correlationId, undefined, "monitor_window_timeout"));
|
|
26984
|
+
}, timeout);
|
|
26985
|
+
const intervalId = window.setInterval(() => {
|
|
26986
|
+
const contentWindow = iframe.contentWindow;
|
|
26987
|
+
if (!contentWindow) {
|
|
26988
|
+
return;
|
|
26989
|
+
}
|
|
26990
|
+
let href = "";
|
|
26991
|
+
try {
|
|
26992
|
+
/*
|
|
26993
|
+
* Will throw if cross origin,
|
|
26994
|
+
* which should be caught and ignored
|
|
26995
|
+
* since we need the interval to keep running while on STS UI.
|
|
26996
|
+
*/
|
|
26997
|
+
href = contentWindow.location.href;
|
|
26998
|
+
}
|
|
26999
|
+
catch (e) { }
|
|
27000
|
+
if (!href || href === "about:blank") {
|
|
27001
|
+
return;
|
|
27002
|
+
}
|
|
27003
|
+
const responseString = responseMode === ResponseMode.QUERY
|
|
27004
|
+
? contentWindow.location.search
|
|
27005
|
+
: contentWindow.location.hash;
|
|
27006
|
+
window.clearTimeout(timeoutId);
|
|
27007
|
+
window.clearInterval(intervalId);
|
|
27008
|
+
resolve(responseString);
|
|
27009
|
+
}, IFRAME_POLL_INTERVAL_MS);
|
|
27010
|
+
}).finally(() => {
|
|
27011
|
+
/*
|
|
27012
|
+
* Strip auth-response params from the iframe URL. The monitor owns the
|
|
27013
|
+
* iframe for the duration of the poll, mirroring cleanPopup in
|
|
27014
|
+
* PopupMonitor.
|
|
27015
|
+
*/
|
|
27016
|
+
try {
|
|
27017
|
+
if (iframe.contentWindow) {
|
|
27018
|
+
clearAuthResponseFromUrl(iframe.contentWindow);
|
|
27019
|
+
}
|
|
27020
|
+
}
|
|
27021
|
+
catch {
|
|
27022
|
+
// Iframe may already be navigated away or cross-origin; ignore.
|
|
27023
|
+
}
|
|
27024
|
+
});
|
|
27025
|
+
}
|
|
27026
|
+
|
|
26569
27027
|
/*
|
|
26570
27028
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
26571
27029
|
* Licensed under the MIT License.
|
|
@@ -26608,27 +27066,29 @@
|
|
|
26608
27066
|
/**
|
|
26609
27067
|
* Waits for the auth response from a popup window opened by MSAL.
|
|
26610
27068
|
*
|
|
26611
|
-
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge
|
|
26612
|
-
*
|
|
26613
|
-
*
|
|
27069
|
+
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
|
|
27070
|
+
* or to the v4-style same-origin location poller when
|
|
27071
|
+
* `system.enableLegacyPolling` is set. Subclasses must return the raw response
|
|
27072
|
+
* string (hash/query/fragment), or reject with an `AuthError` on failure.
|
|
26614
27073
|
*
|
|
26615
27074
|
* @internal
|
|
26616
27075
|
* @param request The in-flight authorization or end-session request.
|
|
26617
27076
|
* @param popupWindow The popup window opened by MSAL.
|
|
26618
27077
|
* @param popupWindowParent The parent window that opened the popup.
|
|
26619
27078
|
*/
|
|
26620
|
-
async waitForPopupResponse(request,
|
|
26621
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26622
|
-
popupWindow,
|
|
26623
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26624
|
-
popupWindowParent) {
|
|
27079
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
26625
27080
|
const controller = this.controller;
|
|
26626
|
-
|
|
27081
|
+
const config = controller.getConfiguration();
|
|
27082
|
+
if (config.system.enableLegacyPolling) {
|
|
27083
|
+
return waitForPopupPollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), request, popupWindow, popupWindowParent);
|
|
27084
|
+
}
|
|
27085
|
+
return waitForBridgeResponse(config.system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
|
|
26627
27086
|
}
|
|
26628
27087
|
/**
|
|
26629
27088
|
* Waits for the auth response from a hidden iframe used by MSAL silent flows.
|
|
26630
27089
|
*
|
|
26631
|
-
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge
|
|
27090
|
+
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
|
|
27091
|
+
* or to the v4-style location poller when `system.enableLegacyPolling` is set.
|
|
26632
27092
|
* Subclasses must return the raw response string (hash/query/fragment), or reject
|
|
26633
27093
|
* with an `AuthError` on failure.
|
|
26634
27094
|
*
|
|
@@ -26636,11 +27096,12 @@
|
|
|
26636
27096
|
* @param iframe The hidden iframe MSAL attached to the document.
|
|
26637
27097
|
* @param request The in-flight authorization request.
|
|
26638
27098
|
*/
|
|
26639
|
-
async waitForIframeResponse(
|
|
26640
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26641
|
-
iframe, request) {
|
|
27099
|
+
async waitForIframeResponse(iframe, request) {
|
|
26642
27100
|
const controller = this.controller;
|
|
26643
27101
|
const config = controller.getConfiguration();
|
|
27102
|
+
if (config.system.enableLegacyPolling) {
|
|
27103
|
+
return waitForIframePollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), iframe, request);
|
|
27104
|
+
}
|
|
26644
27105
|
return waitForBridgeResponse(config.system.iframeBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient(), config.experimental);
|
|
26645
27106
|
}
|
|
26646
27107
|
/**
|
|
@@ -26873,6 +27334,40 @@
|
|
|
26873
27334
|
clearCache(logoutRequest) {
|
|
26874
27335
|
return this.controller.clearCache(logoutRequest);
|
|
26875
27336
|
}
|
|
27337
|
+
}
|
|
27338
|
+
/**
|
|
27339
|
+
* Collects a popup auth response using the v4-style same-origin location
|
|
27340
|
+
* poller instead of the `BroadcastChannel` redirect bridge.
|
|
27341
|
+
*/
|
|
27342
|
+
async function waitForPopupPollingResponse(config, logger, performanceClient, request, popupWindow, popupWindowParent) {
|
|
27343
|
+
const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode.QUERY
|
|
27344
|
+
? ResponseMode.QUERY
|
|
27345
|
+
: ResponseMode.FRAGMENT;
|
|
27346
|
+
performanceClient.addFields({ usesLegacyPolling: true }, request.correlationId);
|
|
27347
|
+
const unloadHandler = () => {
|
|
27348
|
+
try {
|
|
27349
|
+
if (popupWindow && !popupWindow.closed) {
|
|
27350
|
+
popupWindow.close();
|
|
27351
|
+
}
|
|
27352
|
+
}
|
|
27353
|
+
catch {
|
|
27354
|
+
/* ignore */
|
|
27355
|
+
}
|
|
27356
|
+
};
|
|
27357
|
+
popupWindowParent.addEventListener("beforeunload", unloadHandler);
|
|
27358
|
+
return monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadHandler, request.correlationId);
|
|
27359
|
+
}
|
|
27360
|
+
/**
|
|
27361
|
+
* Collects a silent-iframe auth response using the v4-style location poller
|
|
27362
|
+
* instead of the `BroadcastChannel` redirect bridge.
|
|
27363
|
+
*/
|
|
27364
|
+
async function waitForIframePollingResponse(config, logger, performanceClient, iframe, request) {
|
|
27365
|
+
const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode.QUERY
|
|
27366
|
+
? ResponseMode.QUERY
|
|
27367
|
+
: ResponseMode.FRAGMENT;
|
|
27368
|
+
const iframePollTimeout = config.system.iframeBridgeTimeout;
|
|
27369
|
+
performanceClient.addFields({ usesLegacyPolling: true, iframePollTimeout }, request.correlationId);
|
|
27370
|
+
return monitorIframeForHash(iframe, iframePollTimeout, logger, request.correlationId, responseMode);
|
|
26876
27371
|
}
|
|
26877
27372
|
|
|
26878
27373
|
/*
|