@azure/msal-browser 5.29.0 → 5.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +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 +2 -3
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +11 -2
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +185 -3
- package/dist/crypto/BrowserCrypto.mjs.map +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/AuthMethodRegistrationRequiredStateV2.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/AuthMethodVerificationRequiredStateV2.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/auth_flow/v2/state/PasswordRequiredStateV2.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/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.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/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/ExistingAccountCodeRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.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 +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +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 +27 -21
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +13 -11
- 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 +5 -8
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +5 -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 +701 -697
- 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 +24 -6
- package/dist/popup_relay/constants.mjs.map +1 -1
- package/dist/popup_relay/index.mjs +142 -44
- package/dist/popup_relay/index.mjs.map +1 -1
- package/dist/popup_relay/relayClient.mjs +66 -23
- package/dist/popup_relay/relayClient.mjs.map +1 -1
- package/dist/protocol/Authorize.mjs +70 -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 +2 -1
- package/dist/request/SilentRequestHelpers.mjs.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +9 -2
- package/dist/telemetry/BrowserPerformanceEvents.mjs.map +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 +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +1 -1
- package/dist/utils/PopupOriginCheck.mjs +1 -1
- 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 +13 -9
- package/lib/custom-auth-path/msal-custom-auth.cjs +519 -143
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +519 -143
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +13 -9
- package/lib/msal-browser.cjs +523 -145
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +523 -145
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +231 -60
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +231 -60
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +2 -2
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +39 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +39 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +2 -2
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +1 -5
- package/src/config/Configuration.ts +35 -0
- package/src/crypto/BrowserCrypto.ts +363 -0
- package/src/error/AsymmetricEarSubErrors.ts +18 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/PopupClient.ts +59 -29
- package/src/interaction_client/RedirectClient.ts +15 -14
- package/src/interaction_client/SilentIframeClient.ts +9 -13
- package/src/interaction_client/StandardInteractionClient.ts +4 -0
- package/src/packageMetadata.ts +1 -1
- package/src/popup_relay/constants.ts +34 -3
- package/src/popup_relay/index.ts +200 -45
- package/src/popup_relay/relayClient.ts +108 -24
- package/src/protocol/Authorize.ts +118 -11
- package/src/request/PopupRequest.ts +1 -0
- package/src/request/RedirectRequest.ts +1 -0
- package/src/request/SilentRequestHelpers.ts +1 -0
- package/src/request/SsoSilentRequest.ts +1 -0
- package/src/telemetry/BrowserPerformanceEvents.ts +7 -0
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +14 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/crypto/BrowserCrypto.d.ts +34 -0
- package/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/error/AsymmetricEarSubErrors.d.ts +14 -0
- package/types/error/AsymmetricEarSubErrors.d.ts.map +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts +3 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts +0 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/popup_relay/constants.d.ts +10 -3
- package/types/popup_relay/constants.d.ts.map +1 -1
- package/types/popup_relay/index.d.ts +27 -11
- package/types/popup_relay/index.d.ts.map +1 -1
- package/types/popup_relay/relayClient.d.ts +9 -11
- package/types/popup_relay/relayClient.d.ts.map +1 -1
- package/types/protocol/Authorize.d.ts +5 -0
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/PopupRequest.d.ts +1 -1
- package/types/request/PopupRequest.d.ts.map +1 -1
- package/types/request/RedirectRequest.d.ts +1 -1
- package/types/request/RedirectRequest.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/request/SsoSilentRequest.d.ts +1 -1
- package/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +7 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.30.0 2026-11-18 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v16.
|
|
5
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -62,7 +62,7 @@ const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
|
62
62
|
*/
|
|
63
63
|
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
64
64
|
|
|
65
|
-
/*! @azure/msal-common v16.
|
|
65
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
66
66
|
/*
|
|
67
67
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
68
68
|
* Licensed under the MIT License.
|
|
@@ -301,7 +301,7 @@ const JsonWebTokenTypes$1 = {
|
|
|
301
301
|
// Token renewal offset default in seconds
|
|
302
302
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
303
303
|
|
|
304
|
-
/*! @azure/msal-common v16.
|
|
304
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
305
305
|
/*
|
|
306
306
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
307
307
|
* Licensed under the MIT License.
|
|
@@ -330,7 +330,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
330
330
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
/*! @azure/msal-common v16.
|
|
333
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
334
334
|
|
|
335
335
|
/*
|
|
336
336
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -353,7 +353,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
353
353
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
/*! @azure/msal-common v16.
|
|
356
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
357
357
|
/*
|
|
358
358
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
359
359
|
* Licensed under the MIT License.
|
|
@@ -439,7 +439,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
439
439
|
userCanceled: userCanceled
|
|
440
440
|
});
|
|
441
441
|
|
|
442
|
-
/*! @azure/msal-common v16.
|
|
442
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
443
443
|
|
|
444
444
|
/*
|
|
445
445
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -477,7 +477,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
-
/*! @azure/msal-common v16.
|
|
480
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
481
481
|
|
|
482
482
|
/*
|
|
483
483
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -543,7 +543,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
543
543
|
return matches[2];
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
/*! @azure/msal-common v16.
|
|
546
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
547
547
|
|
|
548
548
|
/*
|
|
549
549
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -631,7 +631,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
631
631
|
return updatedAccountInfo;
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
-
/*! @azure/msal-common v16.
|
|
634
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
635
635
|
/*
|
|
636
636
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
637
637
|
* Licensed under the MIT License.
|
|
@@ -645,7 +645,7 @@ const AuthorityType = {
|
|
|
645
645
|
Ciam: 3,
|
|
646
646
|
};
|
|
647
647
|
|
|
648
|
-
/*! @azure/msal-common v16.
|
|
648
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
649
649
|
/*
|
|
650
650
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
651
651
|
* Licensed under the MIT License.
|
|
@@ -667,7 +667,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
667
667
|
return null;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
/*! @azure/msal-common v16.
|
|
670
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
671
671
|
/*
|
|
672
672
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
673
673
|
* Licensed under the MIT License.
|
|
@@ -691,7 +691,7 @@ const ProtocolMode = {
|
|
|
691
691
|
EAR: "EAR",
|
|
692
692
|
};
|
|
693
693
|
|
|
694
|
-
/*! @azure/msal-common v16.
|
|
694
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
695
695
|
/**
|
|
696
696
|
* Returns the AccountInfo interface for this account.
|
|
697
697
|
* @internal
|
|
@@ -880,7 +880,7 @@ function isAccountEntity(entity) {
|
|
|
880
880
|
entity.hasOwnProperty("authorityType"));
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
/*! @azure/msal-common v16.
|
|
883
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
884
884
|
/*
|
|
885
885
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
886
886
|
* Licensed under the MIT License.
|
|
@@ -897,7 +897,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
897
897
|
unexpectedError: unexpectedError
|
|
898
898
|
});
|
|
899
899
|
|
|
900
|
-
/*! @azure/msal-common v16.
|
|
900
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
901
901
|
|
|
902
902
|
/*
|
|
903
903
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -917,7 +917,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
917
917
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
918
918
|
}
|
|
919
919
|
|
|
920
|
-
/*! @azure/msal-common v16.
|
|
920
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
921
921
|
/*
|
|
922
922
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
923
923
|
* Licensed under the MIT License.
|
|
@@ -957,7 +957,7 @@ function getResponseHeader(headers, name) {
|
|
|
957
957
|
return headerName === undefined ? undefined : headers[headerName];
|
|
958
958
|
}
|
|
959
959
|
|
|
960
|
-
/*! @azure/msal-common v16.
|
|
960
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
961
961
|
/*
|
|
962
962
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
963
963
|
* Licensed under the MIT License.
|
|
@@ -1027,7 +1027,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1027
1027
|
urlParseError: urlParseError
|
|
1028
1028
|
});
|
|
1029
1029
|
|
|
1030
|
-
/*! @azure/msal-common v16.
|
|
1030
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1031
1031
|
|
|
1032
1032
|
/*
|
|
1033
1033
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1086,7 +1086,7 @@ class AuthenticationHeaderParser {
|
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
-
/*! @azure/msal-common v16.
|
|
1089
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1090
1090
|
/*
|
|
1091
1091
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1092
1092
|
* Licensed under the MIT License.
|
|
@@ -1098,7 +1098,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
1098
1098
|
response.hasOwnProperty("jwks_uri"));
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
|
-
/*! @azure/msal-common v16.
|
|
1101
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1102
1102
|
/*
|
|
1103
1103
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1104
1104
|
* Licensed under the MIT License.
|
|
@@ -1178,12 +1178,18 @@ class StringUtils {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
|
-
/*! @azure/msal-common v16.
|
|
1181
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1182
1182
|
|
|
1183
1183
|
/*
|
|
1184
1184
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1185
1185
|
* Licensed under the MIT License.
|
|
1186
1186
|
*/
|
|
1187
|
+
// Matches ASCII controls, space, DEL, backslash, or the userinfo separator (@).
|
|
1188
|
+
const UNSAFE_AUTHORITY = /[\x00-\x20\x7f\\@]/;
|
|
1189
|
+
const DEFAULT_PORTS = {
|
|
1190
|
+
"https:": ":443",
|
|
1191
|
+
"http:": ":80",
|
|
1192
|
+
};
|
|
1187
1193
|
/**
|
|
1188
1194
|
* Url object class which can perform various transformations on url strings.
|
|
1189
1195
|
*/
|
|
@@ -1299,6 +1305,29 @@ class UrlString {
|
|
|
1299
1305
|
AbsolutePath: match[5],
|
|
1300
1306
|
QueryString: match[7],
|
|
1301
1307
|
};
|
|
1308
|
+
let parsedUrl;
|
|
1309
|
+
try {
|
|
1310
|
+
parsedUrl = new URL(this.urlString);
|
|
1311
|
+
}
|
|
1312
|
+
catch {
|
|
1313
|
+
throw createClientConfigurationError(urlParseError, this.correlationId);
|
|
1314
|
+
}
|
|
1315
|
+
const host = urlComponents.HostNameAndPort?.toLowerCase();
|
|
1316
|
+
const schemeAndAuthority = `${urlComponents.Protocol}//${host}`;
|
|
1317
|
+
const defaultPort = DEFAULT_PORTS[parsedUrl.protocol] ?? "";
|
|
1318
|
+
/*
|
|
1319
|
+
* Cross-check the original host; reparsing parsedUrl would hide parser differences.
|
|
1320
|
+
* URL has validated IPv6 syntax, so only bracketed hosts need a normalization comparison.
|
|
1321
|
+
*/
|
|
1322
|
+
const hostMatches = host === parsedUrl.host ||
|
|
1323
|
+
host === `${parsedUrl.host}${defaultPort}` ||
|
|
1324
|
+
(host?.startsWith("[") &&
|
|
1325
|
+
new URL(`${urlComponents.Protocol}//${host}`).host ===
|
|
1326
|
+
parsedUrl.host);
|
|
1327
|
+
// Check authority ambiguity without restricting resource paths, queries, or fragments.
|
|
1328
|
+
if (UNSAFE_AUTHORITY.test(schemeAndAuthority) || !hostMatches) {
|
|
1329
|
+
throw createClientConfigurationError(urlParseError, this.correlationId);
|
|
1330
|
+
}
|
|
1302
1331
|
let pathSegments = urlComponents.AbsolutePath.split("/");
|
|
1303
1332
|
pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements
|
|
1304
1333
|
urlComponents.PathSegments = pathSegments;
|
|
@@ -1336,7 +1365,7 @@ class UrlString {
|
|
|
1336
1365
|
}
|
|
1337
1366
|
}
|
|
1338
1367
|
|
|
1339
|
-
/*! @azure/msal-common v16.
|
|
1368
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1340
1369
|
|
|
1341
1370
|
/*
|
|
1342
1371
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1490,7 +1519,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1490
1519
|
return null;
|
|
1491
1520
|
}
|
|
1492
1521
|
|
|
1493
|
-
/*! @azure/msal-common v16.
|
|
1522
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1494
1523
|
/*
|
|
1495
1524
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1496
1525
|
* Licensed under the MIT License.
|
|
@@ -1508,7 +1537,7 @@ const AzureCloudInstance = {
|
|
|
1508
1537
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1509
1538
|
};
|
|
1510
1539
|
|
|
1511
|
-
/*! @azure/msal-common v16.
|
|
1540
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1512
1541
|
/*
|
|
1513
1542
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1514
1543
|
* Licensed under the MIT License.
|
|
@@ -1518,7 +1547,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1518
1547
|
response.hasOwnProperty("metadata"));
|
|
1519
1548
|
}
|
|
1520
1549
|
|
|
1521
|
-
/*! @azure/msal-common v16.
|
|
1550
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1522
1551
|
/*
|
|
1523
1552
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1524
1553
|
* Licensed under the MIT License.
|
|
@@ -1528,7 +1557,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1528
1557
|
response.hasOwnProperty("error_description"));
|
|
1529
1558
|
}
|
|
1530
1559
|
|
|
1531
|
-
/*! @azure/msal-common v16.
|
|
1560
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1532
1561
|
/*
|
|
1533
1562
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1534
1563
|
* Licensed under the MIT License.
|
|
@@ -1599,7 +1628,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1599
1628
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1600
1629
|
const SetUserData = "setUserData";
|
|
1601
1630
|
|
|
1602
|
-
/*! @azure/msal-common v16.
|
|
1631
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1603
1632
|
/*
|
|
1604
1633
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1605
1634
|
* Licensed under the MIT License.
|
|
@@ -1635,7 +1664,8 @@ const invoke = (callback, eventName, logger, telemetryClient, correlationId) =>
|
|
|
1635
1664
|
catch (e) {
|
|
1636
1665
|
logger.trace(`0cfd8i ${eventName}`, correlationId);
|
|
1637
1666
|
try {
|
|
1638
|
-
|
|
1667
|
+
// Prevent numeric error details from being treated as minified log hashes.
|
|
1668
|
+
logger.tracePii(`028ef8 ${JSON.stringify(e)}`, correlationId);
|
|
1639
1669
|
}
|
|
1640
1670
|
catch (e) {
|
|
1641
1671
|
logger.trace("00dty7", correlationId);
|
|
@@ -1679,7 +1709,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1679
1709
|
.catch((e) => {
|
|
1680
1710
|
logger.trace(`0cfd8i ${eventName}`, correlationId);
|
|
1681
1711
|
try {
|
|
1682
|
-
logger.
|
|
1712
|
+
logger.tracePii(`028ef8 ${JSON.stringify(e)}`, correlationId);
|
|
1683
1713
|
}
|
|
1684
1714
|
catch (e) {
|
|
1685
1715
|
logger.trace("00dty7", correlationId);
|
|
@@ -1692,12 +1722,26 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1692
1722
|
};
|
|
1693
1723
|
};
|
|
1694
1724
|
|
|
1695
|
-
/*! @azure/msal-common v16.
|
|
1725
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1696
1726
|
|
|
1697
1727
|
/*
|
|
1698
1728
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1699
1729
|
* Licensed under the MIT License.
|
|
1700
1730
|
*/
|
|
1731
|
+
// Starts with an ASCII letter; remaining characters are ASCII letters, digits, or hyphens.
|
|
1732
|
+
const REGION_NAME_PATTERN = /^[a-z][a-z0-9-]*$/i;
|
|
1733
|
+
// A region becomes a DNS label, limited to 63 octets by RFC 1035 section 2.3.4.
|
|
1734
|
+
const MAX_REGION_NAME_LENGTH = 63;
|
|
1735
|
+
/**
|
|
1736
|
+
* Whether a region can safely be used as a single DNS label.
|
|
1737
|
+
*/
|
|
1738
|
+
function isValidRegion(region) {
|
|
1739
|
+
return (typeof region === "string" &&
|
|
1740
|
+
region.length <= MAX_REGION_NAME_LENGTH &&
|
|
1741
|
+
REGION_NAME_PATTERN.test(region) &&
|
|
1742
|
+
// Keep the trailing-hyphen rule explicit rather than complicating the pattern.
|
|
1743
|
+
!region.endsWith("-"));
|
|
1744
|
+
}
|
|
1701
1745
|
class RegionDiscovery {
|
|
1702
1746
|
constructor(networkInterface, logger, performanceClient, correlationId) {
|
|
1703
1747
|
this.networkInterface = networkInterface;
|
|
@@ -1757,12 +1801,16 @@ class RegionDiscovery {
|
|
|
1757
1801
|
regionDiscoveryMetadata.region_source =
|
|
1758
1802
|
RegionDiscoverySources.ENVIRONMENT_VARIABLE;
|
|
1759
1803
|
}
|
|
1760
|
-
//
|
|
1761
|
-
if (!autodetectedRegionName) {
|
|
1804
|
+
// Untrusted discovery values must be a single DNS label before becoming a host prefix.
|
|
1805
|
+
if (!autodetectedRegionName || !isValidRegion(autodetectedRegionName)) {
|
|
1806
|
+
if (autodetectedRegionName) {
|
|
1807
|
+
this.logger.warning("0n83q0", this.correlationId);
|
|
1808
|
+
}
|
|
1762
1809
|
regionDiscoveryMetadata.region_source =
|
|
1763
1810
|
RegionDiscoverySources.FAILED_AUTO_DETECTION;
|
|
1811
|
+
return null;
|
|
1764
1812
|
}
|
|
1765
|
-
return autodetectedRegionName
|
|
1813
|
+
return autodetectedRegionName;
|
|
1766
1814
|
}
|
|
1767
1815
|
/**
|
|
1768
1816
|
* Make the call to the IMDS endpoint
|
|
@@ -1803,7 +1851,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1803
1851
|
},
|
|
1804
1852
|
};
|
|
1805
1853
|
|
|
1806
|
-
/*! @azure/msal-common v16.
|
|
1854
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1807
1855
|
/*
|
|
1808
1856
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1809
1857
|
* Licensed under the MIT License.
|
|
@@ -1868,7 +1916,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1868
1916
|
return cachedAtSec > nowSeconds();
|
|
1869
1917
|
}
|
|
1870
1918
|
|
|
1871
|
-
/*! @azure/msal-common v16.
|
|
1919
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1872
1920
|
|
|
1873
1921
|
/*
|
|
1874
1922
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2155,7 +2203,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
2155
2203
|
return [...attributeTokens].sort().join(" ");
|
|
2156
2204
|
}
|
|
2157
2205
|
|
|
2158
|
-
/*! @azure/msal-common v16.
|
|
2206
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
2159
2207
|
|
|
2160
2208
|
/*
|
|
2161
2209
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3008,6 +3056,9 @@ class Authority {
|
|
|
3008
3056
|
* @param region string
|
|
3009
3057
|
*/
|
|
3010
3058
|
static buildRegionalAuthorityString(host, region, correlationId, queryString) {
|
|
3059
|
+
if (!isValidRegion(region)) {
|
|
3060
|
+
throw createClientConfigurationError(urlParseError, correlationId);
|
|
3061
|
+
}
|
|
3011
3062
|
// Create and validate a Url string object with the initial authority string
|
|
3012
3063
|
const authorityUrlInstance = new UrlString(host, correlationId);
|
|
3013
3064
|
authorityUrlInstance.validateAsUri();
|
|
@@ -3018,7 +3069,7 @@ class Authority {
|
|
|
3018
3069
|
}
|
|
3019
3070
|
// Include the query string portion of the url
|
|
3020
3071
|
const url = UrlString.constructAuthorityUriFromObject({
|
|
3021
|
-
...
|
|
3072
|
+
...authorityUrlParts,
|
|
3022
3073
|
HostNameAndPort: hostNameAndPort,
|
|
3023
3074
|
}, correlationId).urlString;
|
|
3024
3075
|
// Add the query string if a query string was provided
|
|
@@ -3123,7 +3174,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3123
3174
|
};
|
|
3124
3175
|
}
|
|
3125
3176
|
|
|
3126
|
-
/*! @azure/msal-common v16.
|
|
3177
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3127
3178
|
|
|
3128
3179
|
/*
|
|
3129
3180
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3157,7 +3208,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3157
3208
|
}
|
|
3158
3209
|
}
|
|
3159
3210
|
|
|
3160
|
-
/*! @azure/msal-common v16.
|
|
3211
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3161
3212
|
|
|
3162
3213
|
/*
|
|
3163
3214
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3353,7 +3404,7 @@ class ScopeSet {
|
|
|
3353
3404
|
}
|
|
3354
3405
|
}
|
|
3355
3406
|
|
|
3356
|
-
/*! @azure/msal-common v16.
|
|
3407
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3357
3408
|
|
|
3358
3409
|
/*
|
|
3359
3410
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3821,12 +3872,13 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
|
|
|
3821
3872
|
* Add EAR (Encrypted Authorize Response) request parameters
|
|
3822
3873
|
* @param parameters
|
|
3823
3874
|
* @param jwk
|
|
3875
|
+
* @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
|
|
3824
3876
|
*/
|
|
3825
|
-
function addEARParameters(parameters, jwk) {
|
|
3877
|
+
function addEARParameters(parameters, jwk, jweCrypto) {
|
|
3826
3878
|
parameters.set(EAR_JWK, encodeURIComponent(jwk));
|
|
3827
|
-
//
|
|
3879
|
+
// Default symmetric EAR metadata; asymmetric requests supply their APV.
|
|
3828
3880
|
const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
|
|
3829
|
-
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
3881
|
+
parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
|
|
3830
3882
|
}
|
|
3831
3883
|
function addResource(parameters, resource) {
|
|
3832
3884
|
if (resource) {
|
|
@@ -3853,7 +3905,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3853
3905
|
}
|
|
3854
3906
|
}
|
|
3855
3907
|
|
|
3856
|
-
/*! @azure/msal-common v16.
|
|
3908
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3857
3909
|
|
|
3858
3910
|
/*
|
|
3859
3911
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3984,7 +4036,7 @@ function validateUrl(url, logger, correlationId) {
|
|
|
3984
4036
|
}
|
|
3985
4037
|
}
|
|
3986
4038
|
|
|
3987
|
-
/*! @azure/msal-common v16.
|
|
4039
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3988
4040
|
|
|
3989
4041
|
/*
|
|
3990
4042
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4032,7 +4084,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
4032
4084
|
},
|
|
4033
4085
|
};
|
|
4034
4086
|
|
|
4035
|
-
/*! @azure/msal-common v16.
|
|
4087
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4036
4088
|
|
|
4037
4089
|
/*
|
|
4038
4090
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4055,7 +4107,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
4055
4107
|
},
|
|
4056
4108
|
};
|
|
4057
4109
|
|
|
4058
|
-
/*! @azure/msal-common v16.
|
|
4110
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4059
4111
|
/*
|
|
4060
4112
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4061
4113
|
* Licensed under the MIT License.
|
|
@@ -4344,12 +4396,12 @@ class Logger {
|
|
|
4344
4396
|
}
|
|
4345
4397
|
}
|
|
4346
4398
|
|
|
4347
|
-
/*! @azure/msal-common v16.
|
|
4399
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4348
4400
|
/* eslint-disable header/header */
|
|
4349
4401
|
const name$1 = "@azure/msal-common";
|
|
4350
|
-
const version$1 = "16.
|
|
4402
|
+
const version$1 = "16.17.0";
|
|
4351
4403
|
|
|
4352
|
-
/*! @azure/msal-common v16.
|
|
4404
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4353
4405
|
/*
|
|
4354
4406
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4355
4407
|
* Licensed under the MIT License.
|
|
@@ -4357,7 +4409,7 @@ const version$1 = "16.16.1";
|
|
|
4357
4409
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4358
4410
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4359
4411
|
|
|
4360
|
-
/*! @azure/msal-common v16.
|
|
4412
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4361
4413
|
|
|
4362
4414
|
/*
|
|
4363
4415
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4395,7 +4447,7 @@ function createCacheError(e) {
|
|
|
4395
4447
|
}
|
|
4396
4448
|
}
|
|
4397
4449
|
|
|
4398
|
-
/*! @azure/msal-common v16.
|
|
4450
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4399
4451
|
|
|
4400
4452
|
/*
|
|
4401
4453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5623,7 +5675,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5623
5675
|
}
|
|
5624
5676
|
}
|
|
5625
5677
|
|
|
5626
|
-
/*! @azure/msal-common v16.
|
|
5678
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5627
5679
|
/*
|
|
5628
5680
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5629
5681
|
* Licensed under the MIT License.
|
|
@@ -5685,10 +5737,11 @@ const IntFields = new Set([
|
|
|
5685
5737
|
"networkRtt",
|
|
5686
5738
|
"redirectBridgeTimeoutMs",
|
|
5687
5739
|
"redirectBridgeMessageVersion",
|
|
5740
|
+
"popupRelayProtocolVersion",
|
|
5688
5741
|
"fetchRetryCount",
|
|
5689
5742
|
]);
|
|
5690
5743
|
|
|
5691
|
-
/*! @azure/msal-common v16.
|
|
5744
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5692
5745
|
|
|
5693
5746
|
/*
|
|
5694
5747
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5746,7 +5799,7 @@ class StubPerformanceClient {
|
|
|
5746
5799
|
}
|
|
5747
5800
|
}
|
|
5748
5801
|
|
|
5749
|
-
/*! @azure/msal-common v16.
|
|
5802
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5750
5803
|
|
|
5751
5804
|
/*
|
|
5752
5805
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5844,7 +5897,7 @@ function isOidcProtocolMode(config) {
|
|
|
5844
5897
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5845
5898
|
}
|
|
5846
5899
|
|
|
5847
|
-
/*! @azure/msal-common v16.
|
|
5900
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5848
5901
|
/*
|
|
5849
5902
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5850
5903
|
* Licensed under the MIT License.
|
|
@@ -5871,7 +5924,7 @@ function isOidcProtocolMode(config) {
|
|
|
5871
5924
|
}
|
|
5872
5925
|
}
|
|
5873
5926
|
|
|
5874
|
-
/*! @azure/msal-common v16.
|
|
5927
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5875
5928
|
|
|
5876
5929
|
/*
|
|
5877
5930
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5892,7 +5945,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5892
5945
|
return new JoseHeaderError(code, correlationId);
|
|
5893
5946
|
}
|
|
5894
5947
|
|
|
5895
|
-
/*! @azure/msal-common v16.
|
|
5948
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5896
5949
|
/*
|
|
5897
5950
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5898
5951
|
* Licensed under the MIT License.
|
|
@@ -5917,7 +5970,7 @@ function isPlainObject(value) {
|
|
|
5917
5970
|
return Object.getPrototypeOf(value) === proto;
|
|
5918
5971
|
}
|
|
5919
5972
|
|
|
5920
|
-
/*! @azure/msal-common v16.
|
|
5973
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5921
5974
|
/*
|
|
5922
5975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5923
5976
|
* Licensed under the MIT License.
|
|
@@ -5927,7 +5980,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5927
5980
|
const missingJwkError = "missing_jwk_error";
|
|
5928
5981
|
const invalidJwkError = "invalid_jwk_error";
|
|
5929
5982
|
|
|
5930
|
-
/*! @azure/msal-common v16.
|
|
5983
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5931
5984
|
|
|
5932
5985
|
/*
|
|
5933
5986
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5993,7 +6046,7 @@ class JoseHeader {
|
|
|
5993
6046
|
}
|
|
5994
6047
|
}
|
|
5995
6048
|
|
|
5996
|
-
/*! @azure/msal-common v16.
|
|
6049
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5997
6050
|
|
|
5998
6051
|
/*
|
|
5999
6052
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6094,7 +6147,7 @@ class PopTokenGenerator {
|
|
|
6094
6147
|
}
|
|
6095
6148
|
}
|
|
6096
6149
|
|
|
6097
|
-
/*! @azure/msal-common v16.
|
|
6150
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6098
6151
|
|
|
6099
6152
|
/*
|
|
6100
6153
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6249,7 +6302,7 @@ class DpopProofGenerator {
|
|
|
6249
6302
|
}
|
|
6250
6303
|
}
|
|
6251
6304
|
|
|
6252
|
-
/*! @azure/msal-common v16.
|
|
6305
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6253
6306
|
/*
|
|
6254
6307
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6255
6308
|
* Licensed under the MIT License.
|
|
@@ -6313,7 +6366,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6313
6366
|
uiNotAllowed: uiNotAllowed
|
|
6314
6367
|
});
|
|
6315
6368
|
|
|
6316
|
-
/*! @azure/msal-common v16.
|
|
6369
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6317
6370
|
|
|
6318
6371
|
/*
|
|
6319
6372
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6380,7 +6433,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6380
6433
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6381
6434
|
}
|
|
6382
6435
|
|
|
6383
|
-
/*! @azure/msal-common v16.
|
|
6436
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6384
6437
|
|
|
6385
6438
|
/*
|
|
6386
6439
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6399,7 +6452,7 @@ class ServerError extends AuthError {
|
|
|
6399
6452
|
}
|
|
6400
6453
|
}
|
|
6401
6454
|
|
|
6402
|
-
/*! @azure/msal-common v16.
|
|
6455
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6403
6456
|
|
|
6404
6457
|
/*
|
|
6405
6458
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6470,7 +6523,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6470
6523
|
}
|
|
6471
6524
|
}
|
|
6472
6525
|
|
|
6473
|
-
/*! @azure/msal-common v16.
|
|
6526
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6474
6527
|
|
|
6475
6528
|
/*
|
|
6476
6529
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6898,7 +6951,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6898
6951
|
return baseAccount;
|
|
6899
6952
|
}
|
|
6900
6953
|
|
|
6901
|
-
/*! @azure/msal-common v16.
|
|
6954
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6902
6955
|
/*
|
|
6903
6956
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6904
6957
|
* Licensed under the MIT License.
|
|
@@ -6908,7 +6961,7 @@ const CcsCredentialType = {
|
|
|
6908
6961
|
UPN: "UPN",
|
|
6909
6962
|
};
|
|
6910
6963
|
|
|
6911
|
-
/*! @azure/msal-common v16.
|
|
6964
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6912
6965
|
/*
|
|
6913
6966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6914
6967
|
* Licensed under the MIT License.
|
|
@@ -6927,7 +6980,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6927
6980
|
}
|
|
6928
6981
|
}
|
|
6929
6982
|
|
|
6930
|
-
/*! @azure/msal-common v16.
|
|
6983
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6931
6984
|
|
|
6932
6985
|
/*
|
|
6933
6986
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6951,7 +7004,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6951
7004
|
};
|
|
6952
7005
|
}
|
|
6953
7006
|
|
|
6954
|
-
/*! @azure/msal-common v16.
|
|
7007
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6955
7008
|
|
|
6956
7009
|
/*
|
|
6957
7010
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7041,7 +7094,7 @@ function getRetryAfterHeader(response) {
|
|
|
7041
7094
|
return undefined;
|
|
7042
7095
|
}
|
|
7043
7096
|
|
|
7044
|
-
/*! @azure/msal-common v16.
|
|
7097
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7045
7098
|
|
|
7046
7099
|
/*
|
|
7047
7100
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7072,7 +7125,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
7072
7125
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
7073
7126
|
}
|
|
7074
7127
|
|
|
7075
|
-
/*! @azure/msal-common v16.
|
|
7128
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7076
7129
|
|
|
7077
7130
|
/*
|
|
7078
7131
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7206,7 +7259,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
7206
7259
|
return response;
|
|
7207
7260
|
}
|
|
7208
7261
|
|
|
7209
|
-
/*! @azure/msal-common v16.
|
|
7262
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7210
7263
|
|
|
7211
7264
|
/*
|
|
7212
7265
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7249,7 +7302,8 @@ class AuthorizationCodeClient {
|
|
|
7249
7302
|
throw createClientAuthError(requestCannotBeMade, request.correlationId);
|
|
7250
7303
|
}
|
|
7251
7304
|
// Check for new cloud instance
|
|
7252
|
-
if (
|
|
7305
|
+
if (this.config.authOptions.instanceAware === true &&
|
|
7306
|
+
authCodePayload?.cloud_instance_host_name) {
|
|
7253
7307
|
await invokeAsync(this.updateTokenEndpointAuthority.bind(this), UpdateTokenEndpointAuthority, this.logger, this.performanceClient, request.correlationId)(authCodePayload.cloud_instance_host_name, request.correlationId);
|
|
7254
7308
|
}
|
|
7255
7309
|
const reqTimestamp = nowSeconds();
|
|
@@ -7473,7 +7527,7 @@ class AuthorizationCodeClient {
|
|
|
7473
7527
|
}
|
|
7474
7528
|
}
|
|
7475
7529
|
|
|
7476
|
-
/*! @azure/msal-common v16.
|
|
7530
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7477
7531
|
|
|
7478
7532
|
/*
|
|
7479
7533
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7658,13 +7712,13 @@ function validateAuthorizationResponse(serverResponse, requestState, correlation
|
|
|
7658
7712
|
decodedServerResponseState = decodeURIComponent(serverResponse.state);
|
|
7659
7713
|
}
|
|
7660
7714
|
catch (e) {
|
|
7661
|
-
throw createClientAuthError(invalidState, correlationId
|
|
7715
|
+
throw createClientAuthError(invalidState, correlationId);
|
|
7662
7716
|
}
|
|
7663
7717
|
try {
|
|
7664
7718
|
decodedRequestState = decodeURIComponent(requestState);
|
|
7665
7719
|
}
|
|
7666
7720
|
catch (e) {
|
|
7667
|
-
throw createClientAuthError(invalidState, correlationId
|
|
7721
|
+
throw createClientAuthError(invalidState, correlationId);
|
|
7668
7722
|
}
|
|
7669
7723
|
if (decodedServerResponseState !== decodedRequestState) {
|
|
7670
7724
|
throw createClientAuthError(stateMismatch, correlationId);
|
|
@@ -7703,7 +7757,7 @@ function extractLoginHint(account) {
|
|
|
7703
7757
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7704
7758
|
}
|
|
7705
7759
|
|
|
7706
|
-
/*! @azure/msal-common v16.
|
|
7760
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7707
7761
|
|
|
7708
7762
|
/*
|
|
7709
7763
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8252,7 +8306,7 @@ class PerformanceClient {
|
|
|
8252
8306
|
}
|
|
8253
8307
|
}
|
|
8254
8308
|
|
|
8255
|
-
/*! @azure/msal-common v16.
|
|
8309
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8256
8310
|
|
|
8257
8311
|
/*
|
|
8258
8312
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8487,7 +8541,7 @@ class RefreshTokenClient {
|
|
|
8487
8541
|
}
|
|
8488
8542
|
}
|
|
8489
8543
|
|
|
8490
|
-
/*! @azure/msal-common v16.
|
|
8544
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8491
8545
|
|
|
8492
8546
|
/*
|
|
8493
8547
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8780,7 +8834,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
|
|
|
8780
8834
|
clearNativeBrokerErrorCode() { }
|
|
8781
8835
|
}
|
|
8782
8836
|
|
|
8783
|
-
/*! @azure/msal-common v16.
|
|
8837
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8784
8838
|
|
|
8785
8839
|
/*
|
|
8786
8840
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8907,7 +8961,7 @@ class SilentFlowClient {
|
|
|
8907
8961
|
}
|
|
8908
8962
|
}
|
|
8909
8963
|
|
|
8910
|
-
/*! @azure/msal-common v16.
|
|
8964
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8911
8965
|
|
|
8912
8966
|
/*
|
|
8913
8967
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8923,7 +8977,7 @@ const StubbedNetworkModule = {
|
|
|
8923
8977
|
},
|
|
8924
8978
|
};
|
|
8925
8979
|
|
|
8926
|
-
/*! @azure/msal-common v16.
|
|
8980
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8927
8981
|
|
|
8928
8982
|
/*
|
|
8929
8983
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9090,6 +9144,13 @@ const UrlEncodeArr = "urlEncodeArr";
|
|
|
9090
9144
|
const Encrypt = "encrypt";
|
|
9091
9145
|
const Decrypt = "decrypt";
|
|
9092
9146
|
const GenerateEarKey = "generateEarKey";
|
|
9147
|
+
const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
|
|
9148
|
+
const ImportAsymmetricEarKey = "importAsymmetricEarKey";
|
|
9149
|
+
const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
|
|
9150
|
+
const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
|
|
9151
|
+
const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
|
|
9152
|
+
const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
|
|
9153
|
+
const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
|
|
9093
9154
|
const DecryptEarResponse = "decryptEarResponse";
|
|
9094
9155
|
const LoadAccount = "loadAccount";
|
|
9095
9156
|
const LoadIdToken = "loadIdToken";
|
|
@@ -9160,11 +9221,13 @@ const tokenBindingKeyJwkThumbprintMismatch = "token_binding_key_jwk_thumbprint_m
|
|
|
9160
9221
|
const failedToBuildHeaders = "failed_to_build_headers";
|
|
9161
9222
|
const failedToParseHeaders = "failed_to_parse_headers";
|
|
9162
9223
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
9224
|
+
const asymmetricEarKeyError = "asymmetric_ear_key_error";
|
|
9163
9225
|
const timedOut = "timed_out";
|
|
9164
9226
|
const emptyResponse = "empty_response";
|
|
9165
9227
|
|
|
9166
9228
|
var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
9167
9229
|
__proto__: null,
|
|
9230
|
+
asymmetricEarKeyError: asymmetricEarKeyError,
|
|
9168
9231
|
authCodeOrNativeAccountIdRequired: authCodeOrNativeAccountIdRequired,
|
|
9169
9232
|
authCodeRequired: authCodeRequired,
|
|
9170
9233
|
authRequestNotSetError: authRequestNotSetError,
|
|
@@ -9560,6 +9623,10 @@ const HKDF = "HKDF";
|
|
|
9560
9623
|
const S256_HASH_ALG = "SHA-256";
|
|
9561
9624
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
9562
9625
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
9626
|
+
const ECDH_P384_ALGORITHM = {
|
|
9627
|
+
name: "ECDH",
|
|
9628
|
+
namedCurve: "P-384",
|
|
9629
|
+
};
|
|
9563
9630
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
9564
9631
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
9565
9632
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -9697,6 +9764,16 @@ async function generateKeyPair(extractable, usages, algorithm) {
|
|
|
9697
9764
|
async function exportJwk(key) {
|
|
9698
9765
|
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
9699
9766
|
}
|
|
9767
|
+
/**
|
|
9768
|
+
* Imports key as Json Web Key (JWK), can set extractable and usages.
|
|
9769
|
+
* @param key
|
|
9770
|
+
* @param extractable
|
|
9771
|
+
* @param usages
|
|
9772
|
+
* @param algorithm
|
|
9773
|
+
*/
|
|
9774
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9775
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9776
|
+
}
|
|
9700
9777
|
/**
|
|
9701
9778
|
* Signs given data with given key.
|
|
9702
9779
|
* @param key
|
|
@@ -9719,6 +9796,172 @@ async function generateEarKey() {
|
|
|
9719
9796
|
};
|
|
9720
9797
|
return base64Encode(JSON.stringify(jwk));
|
|
9721
9798
|
}
|
|
9799
|
+
/**
|
|
9800
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
9801
|
+
* @internal
|
|
9802
|
+
*/
|
|
9803
|
+
async function generateAsymmetricEarKey() {
|
|
9804
|
+
const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9805
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
9806
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
9807
|
+
return {
|
|
9808
|
+
privateJwk,
|
|
9809
|
+
publicJwk,
|
|
9810
|
+
};
|
|
9811
|
+
}
|
|
9812
|
+
/**
|
|
9813
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
9814
|
+
* @internal
|
|
9815
|
+
*/
|
|
9816
|
+
async function importAsymmetricEarKey(privateJwk, correlationId = "") {
|
|
9817
|
+
if (privateJwk?.kty !== "EC" ||
|
|
9818
|
+
privateJwk.crv !== "P-384" ||
|
|
9819
|
+
!privateJwk.d) {
|
|
9820
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
|
|
9821
|
+
}
|
|
9822
|
+
try {
|
|
9823
|
+
return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9824
|
+
}
|
|
9825
|
+
catch {
|
|
9826
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
|
|
9827
|
+
}
|
|
9828
|
+
}
|
|
9829
|
+
/**
|
|
9830
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
9831
|
+
* @internal
|
|
9832
|
+
*/
|
|
9833
|
+
function generateAsymmetricEarApv(publicJwk) {
|
|
9834
|
+
const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
|
|
9835
|
+
if (point.length !== 97) {
|
|
9836
|
+
throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
|
|
9837
|
+
}
|
|
9838
|
+
const nonce = new Uint8Array(24);
|
|
9839
|
+
window.crypto.getRandomValues(nonce);
|
|
9840
|
+
return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
|
|
9841
|
+
}
|
|
9842
|
+
/**
|
|
9843
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
9844
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
9845
|
+
* @internal
|
|
9846
|
+
*/
|
|
9847
|
+
async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
|
|
9848
|
+
const correlationId = telemetry?.correlationId || "";
|
|
9849
|
+
const measure = (eventName, operation) => telemetry
|
|
9850
|
+
? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
|
|
9851
|
+
: operation();
|
|
9852
|
+
if (apv !== requestApv) {
|
|
9853
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
|
|
9854
|
+
}
|
|
9855
|
+
const parts = earJwe.split(".");
|
|
9856
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
9857
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9858
|
+
}
|
|
9859
|
+
let header;
|
|
9860
|
+
try {
|
|
9861
|
+
header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
|
|
9862
|
+
}
|
|
9863
|
+
catch {
|
|
9864
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9865
|
+
}
|
|
9866
|
+
if (!header ||
|
|
9867
|
+
header.alg !== "ECDH-ES" ||
|
|
9868
|
+
header.enc !== "A256GCM" ||
|
|
9869
|
+
header.crit !== undefined ||
|
|
9870
|
+
header.zip !== undefined ||
|
|
9871
|
+
header.epk?.kty !== "EC" ||
|
|
9872
|
+
header.epk.crv !== "P-384" ||
|
|
9873
|
+
header.epk.d !== undefined ||
|
|
9874
|
+
(header.apv !== undefined && header.apv !== apv)) {
|
|
9875
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9876
|
+
}
|
|
9877
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
9878
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
9879
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
9880
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
9881
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
9882
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
9883
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
9884
|
+
if (x.length !== 48 ||
|
|
9885
|
+
y.length !== 48 ||
|
|
9886
|
+
iv.length !== 12 ||
|
|
9887
|
+
tag.length !== 16) {
|
|
9888
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9889
|
+
}
|
|
9890
|
+
let key;
|
|
9891
|
+
try {
|
|
9892
|
+
const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
|
|
9893
|
+
const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
|
|
9894
|
+
kty: "EC",
|
|
9895
|
+
crv: "P-384",
|
|
9896
|
+
x: header.epk.x,
|
|
9897
|
+
y: header.epk.y,
|
|
9898
|
+
}, false, [], ECDH_P384_ALGORITHM));
|
|
9899
|
+
const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
|
|
9900
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
9901
|
+
const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
|
|
9902
|
+
let derivedKey;
|
|
9903
|
+
try {
|
|
9904
|
+
derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
|
|
9905
|
+
}
|
|
9906
|
+
finally {
|
|
9907
|
+
secret.fill(0);
|
|
9908
|
+
input.fill(0);
|
|
9909
|
+
}
|
|
9910
|
+
try {
|
|
9911
|
+
key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
|
|
9912
|
+
}
|
|
9913
|
+
finally {
|
|
9914
|
+
new Uint8Array(derivedKey).fill(0);
|
|
9915
|
+
}
|
|
9916
|
+
}
|
|
9917
|
+
catch (error) {
|
|
9918
|
+
if (error instanceof AuthError) {
|
|
9919
|
+
throw error;
|
|
9920
|
+
}
|
|
9921
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
|
|
9922
|
+
}
|
|
9923
|
+
try {
|
|
9924
|
+
const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
|
|
9925
|
+
name: AES_GCM,
|
|
9926
|
+
iv,
|
|
9927
|
+
tagLength: 128,
|
|
9928
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
9929
|
+
}, key, concatEarBytes(ciphertext, tag)));
|
|
9930
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
9931
|
+
}
|
|
9932
|
+
catch {
|
|
9933
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
|
|
9934
|
+
}
|
|
9935
|
+
}
|
|
9936
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
9937
|
+
function decodeEarBase64Url(value, correlationId = "") {
|
|
9938
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
9939
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
9940
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9941
|
+
}
|
|
9942
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
9943
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
9944
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9945
|
+
}
|
|
9946
|
+
return bytes;
|
|
9947
|
+
}
|
|
9948
|
+
function earUint32(value) {
|
|
9949
|
+
const bytes = new Uint8Array(4);
|
|
9950
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
9951
|
+
return bytes;
|
|
9952
|
+
}
|
|
9953
|
+
function concatEarBytes(...parts) {
|
|
9954
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
9955
|
+
let offset = 0;
|
|
9956
|
+
for (const part of parts) {
|
|
9957
|
+
bytes.set(part, offset);
|
|
9958
|
+
offset += part.length;
|
|
9959
|
+
}
|
|
9960
|
+
return bytes.buffer;
|
|
9961
|
+
}
|
|
9962
|
+
function lengthPrefixEarBytes(bytes) {
|
|
9963
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
9964
|
+
}
|
|
9722
9965
|
/**
|
|
9723
9966
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
9724
9967
|
* @param earJwk
|
|
@@ -11658,7 +11901,7 @@ const EventType = {
|
|
|
11658
11901
|
|
|
11659
11902
|
/* eslint-disable header/header */
|
|
11660
11903
|
const name = "@azure/msal-browser";
|
|
11661
|
-
const version = "5.
|
|
11904
|
+
const version = "5.30.0";
|
|
11662
11905
|
|
|
11663
11906
|
/*
|
|
11664
11907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -12965,8 +13208,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
12965
13208
|
}
|
|
12966
13209
|
}
|
|
12967
13210
|
catch (e) {
|
|
12968
|
-
this.logger.
|
|
12969
|
-
this.logger.error(`0tvdic ${e}`, correlationId);
|
|
13211
|
+
this.logger.error("023ixj", correlationId);
|
|
12970
13212
|
throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
|
|
12971
13213
|
}
|
|
12972
13214
|
return [parsedRequest, verifier];
|
|
@@ -13904,6 +14146,10 @@ class StandardInteractionClient extends BaseInteractionClient {
|
|
|
13904
14146
|
clientId: this.config.auth.clientId,
|
|
13905
14147
|
authority: discoveredAuthority,
|
|
13906
14148
|
clientCapabilities: this.config.auth.clientCapabilities,
|
|
14149
|
+
instanceAware: requestExtraQueryParameters?.instance_aware
|
|
14150
|
+
?.length
|
|
14151
|
+
? requestExtraQueryParameters.instance_aware === "true"
|
|
14152
|
+
: this.config.auth.instanceAware,
|
|
13907
14153
|
redirectUri: this.config.auth.redirectUri,
|
|
13908
14154
|
isMcp: this.config.auth.isMcp,
|
|
13909
14155
|
},
|
|
@@ -14036,30 +14282,42 @@ function shouldUseEar(protocolMode, logger, performanceClient, correlationId, us
|
|
|
14036
14282
|
* page (see `runPopupRelay`) back to the embedded frame that opened it. See
|
|
14037
14283
|
* {@link BrowserAuthOptions.popupRelayUri}.
|
|
14038
14284
|
*
|
|
14039
|
-
*
|
|
14040
|
-
*
|
|
14041
|
-
* pulling in the other's dependencies.
|
|
14285
|
+
* Shared by the relay-page entry and client helpers without importing either
|
|
14286
|
+
* implementation into the other bundle.
|
|
14042
14287
|
*
|
|
14043
14288
|
* @internal
|
|
14044
14289
|
*/
|
|
14045
|
-
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
14290
|
+
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
14291
|
+
/** @internal Response bound to an authenticated v2 relay document. */
|
|
14292
|
+
const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
|
|
14293
|
+
/** @internal Ready signal for the authenticated popup-relay request handoff. */
|
|
14294
|
+
const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
|
|
14295
|
+
/** @internal Request delivered only to the same-origin relay window. */
|
|
14296
|
+
const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
|
|
14297
|
+
/** @internal Resolve the compatibility default without downgrading invalid versions. */
|
|
14298
|
+
function getPopupRelayProtocolVersion(version, correlationId = "") {
|
|
14299
|
+
if (version === undefined) {
|
|
14300
|
+
return 1;
|
|
14301
|
+
}
|
|
14302
|
+
if (version !== 1 && version !== 2) {
|
|
14303
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
|
|
14304
|
+
}
|
|
14305
|
+
return version;
|
|
14306
|
+
}
|
|
14046
14307
|
|
|
14047
14308
|
/*
|
|
14048
14309
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14049
14310
|
* Licensed under the MIT License.
|
|
14050
14311
|
*/
|
|
14051
14312
|
/**
|
|
14052
|
-
* Builds the
|
|
14053
|
-
*
|
|
14054
|
-
*
|
|
14055
|
-
* library-state `id` so the relay page can listen on the right BroadcastChannel
|
|
14056
|
-
* and echo the id back. The relay URI is resolved against the app origin, so it
|
|
14057
|
-
* must be same-origin as the embedded frame. See `runPopupRelay`.
|
|
14313
|
+
* Builds the same-origin relay URL. V1 preserves the fragment descriptor;
|
|
14314
|
+
* explicitly selected v2 carries only the id and retains the navigation for
|
|
14315
|
+
* the authenticated handoff.
|
|
14058
14316
|
*
|
|
14059
14317
|
* @internal
|
|
14060
14318
|
*/
|
|
14061
|
-
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
14062
|
-
const
|
|
14319
|
+
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
|
|
14320
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
|
|
14063
14321
|
const target = new URL(popupRelayUri, window.location.origin);
|
|
14064
14322
|
/*
|
|
14065
14323
|
* The relay page must be same-origin as the embedded frame: the response is
|
|
@@ -14072,7 +14330,12 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
|
14072
14330
|
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
|
|
14073
14331
|
}
|
|
14074
14332
|
const hashParams = new URLSearchParams();
|
|
14075
|
-
|
|
14333
|
+
if (version === 1) {
|
|
14334
|
+
hashParams.set("req", JSON.stringify({ id, ...action }));
|
|
14335
|
+
}
|
|
14336
|
+
else {
|
|
14337
|
+
hashParams.set("id", id);
|
|
14338
|
+
}
|
|
14076
14339
|
target.hash = hashParams.toString();
|
|
14077
14340
|
return target.toString();
|
|
14078
14341
|
}
|
|
@@ -14083,21 +14346,30 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
|
14083
14346
|
* partitioning blocks the BroadcastChannel the redirect bridge uses from
|
|
14084
14347
|
* reaching the embedded frame.
|
|
14085
14348
|
*
|
|
14086
|
-
*
|
|
14087
|
-
*
|
|
14088
|
-
*
|
|
14349
|
+
* In v2, the retained navigation is sent once, after a ready signal from the popup
|
|
14350
|
+
* window we opened on our own origin with the matching library-state id.
|
|
14351
|
+
* Successful responses must also carry that handoff's relay-document nonce.
|
|
14352
|
+
* Setup failures can reject the request before the handoff completes.
|
|
14089
14353
|
*
|
|
14090
14354
|
* @internal
|
|
14091
14355
|
*/
|
|
14092
|
-
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
|
|
14356
|
+
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
|
|
14357
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
|
|
14358
|
+
if (version === 2 && !action) {
|
|
14359
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
|
|
14360
|
+
}
|
|
14093
14361
|
return new Promise((resolve, reject) => {
|
|
14094
14362
|
const correlationId = request.correlationId;
|
|
14095
14363
|
logger.verbose("1d05g9", correlationId);
|
|
14096
|
-
performanceClient.addFields({
|
|
14364
|
+
performanceClient.addFields({
|
|
14365
|
+
redirectBridgeTimeoutMs: timeoutMs,
|
|
14366
|
+
popupRelayProtocolVersion: version,
|
|
14367
|
+
}, correlationId);
|
|
14097
14368
|
const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
|
|
14098
14369
|
const expectedId = libraryState.id;
|
|
14099
14370
|
const expectedOrigin = window.location.origin;
|
|
14100
14371
|
let settled = false;
|
|
14372
|
+
let handoffNonce = "";
|
|
14101
14373
|
const cleanup = () => {
|
|
14102
14374
|
window.removeEventListener("message", onMessage);
|
|
14103
14375
|
clearTimeout(timeoutId);
|
|
@@ -14109,20 +14381,52 @@ async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow
|
|
|
14109
14381
|
return;
|
|
14110
14382
|
}
|
|
14111
14383
|
const data = event.data;
|
|
14112
|
-
if (!data ||
|
|
14113
|
-
data.type !== POPUP_RELAY_RESPONSE_TYPE ||
|
|
14114
|
-
data.id !== expectedId) {
|
|
14384
|
+
if (!data || data.id !== expectedId) {
|
|
14115
14385
|
return;
|
|
14116
14386
|
}
|
|
14117
14387
|
if (settled) {
|
|
14118
14388
|
return;
|
|
14119
14389
|
}
|
|
14390
|
+
if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
|
|
14391
|
+
if (handoffNonce ||
|
|
14392
|
+
typeof data.nonce !== "string" ||
|
|
14393
|
+
!data.nonce) {
|
|
14394
|
+
return;
|
|
14395
|
+
}
|
|
14396
|
+
handoffNonce = data.nonce;
|
|
14397
|
+
try {
|
|
14398
|
+
popupWindow.postMessage({
|
|
14399
|
+
type: POPUP_RELAY_REQUEST_TYPE,
|
|
14400
|
+
id: expectedId,
|
|
14401
|
+
nonce: handoffNonce,
|
|
14402
|
+
request: { id: expectedId, ...action },
|
|
14403
|
+
}, expectedOrigin);
|
|
14404
|
+
performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
|
|
14405
|
+
}
|
|
14406
|
+
catch {
|
|
14407
|
+
settled = true;
|
|
14408
|
+
cleanup();
|
|
14409
|
+
logger.error("0sx3jz", correlationId);
|
|
14410
|
+
reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
|
|
14411
|
+
}
|
|
14412
|
+
return;
|
|
14413
|
+
}
|
|
14414
|
+
const hasError = typeof data.error === "string" && data.error.length > 0;
|
|
14415
|
+
const responseType = version === 1
|
|
14416
|
+
? POPUP_RELAY_RESPONSE_TYPE
|
|
14417
|
+
: POPUP_RELAY_V2_RESPONSE_TYPE;
|
|
14418
|
+
if (data.type !== responseType ||
|
|
14419
|
+
(version === 2 &&
|
|
14420
|
+
((!handoffNonce && !hasError) ||
|
|
14421
|
+
(handoffNonce && data.nonce !== handoffNonce)))) {
|
|
14422
|
+
return;
|
|
14423
|
+
}
|
|
14120
14424
|
settled = true;
|
|
14121
14425
|
cleanup();
|
|
14122
|
-
if (
|
|
14123
|
-
reject(createBrowserAuthError(data.error, correlationId));
|
|
14426
|
+
if (hasError) {
|
|
14427
|
+
reject(createBrowserAuthError(data.error, correlationId, data.subError));
|
|
14124
14428
|
}
|
|
14125
|
-
else if (data.payload) {
|
|
14429
|
+
else if (typeof data.payload === "string" && data.payload) {
|
|
14126
14430
|
resolve(data.payload);
|
|
14127
14431
|
}
|
|
14128
14432
|
else {
|
|
@@ -15791,6 +16095,36 @@ function getAuthorizeFormAction(authority, request, parameters) {
|
|
|
15791
16095
|
addCorrelationId(queryParams, request.correlationId);
|
|
15792
16096
|
return getAuthorizeUrl(authority, queryParams);
|
|
15793
16097
|
}
|
|
16098
|
+
/**
|
|
16099
|
+
* Prepares the selected EAR construction.
|
|
16100
|
+
* @internal
|
|
16101
|
+
*/
|
|
16102
|
+
async function initializeEarRequest(config, request, logger, performanceClient) {
|
|
16103
|
+
if (!config.experimental.enableAsymmetricEar) {
|
|
16104
|
+
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
|
|
16105
|
+
return {
|
|
16106
|
+
...request,
|
|
16107
|
+
earJwk,
|
|
16108
|
+
asymmetricEar: undefined,
|
|
16109
|
+
};
|
|
16110
|
+
}
|
|
16111
|
+
try {
|
|
16112
|
+
const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
|
|
16113
|
+
const apv = generateAsymmetricEarApv(publicJwk);
|
|
16114
|
+
const earJwk = base64Encode(JSON.stringify(publicJwk));
|
|
16115
|
+
return {
|
|
16116
|
+
...request,
|
|
16117
|
+
earJwk,
|
|
16118
|
+
asymmetricEar: { privateJwk, apv },
|
|
16119
|
+
};
|
|
16120
|
+
}
|
|
16121
|
+
catch (error) {
|
|
16122
|
+
if (error instanceof AuthError) {
|
|
16123
|
+
throw error;
|
|
16124
|
+
}
|
|
16125
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
|
|
16126
|
+
}
|
|
16127
|
+
}
|
|
15794
16128
|
/**
|
|
15795
16129
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
15796
16130
|
*/
|
|
@@ -15800,7 +16134,18 @@ async function getEARFormData(config, authority, request, logger, performanceCli
|
|
|
15800
16134
|
}
|
|
15801
16135
|
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
15802
16136
|
addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
15803
|
-
|
|
16137
|
+
try {
|
|
16138
|
+
addEARParameters(parameters, request.earJwk, request.asymmetricEar
|
|
16139
|
+
? base64Encode(JSON.stringify({
|
|
16140
|
+
alg: "ECDH-ES",
|
|
16141
|
+
enc: "A256GCM",
|
|
16142
|
+
apv: request.asymmetricEar.apv,
|
|
16143
|
+
}))
|
|
16144
|
+
: undefined);
|
|
16145
|
+
}
|
|
16146
|
+
catch {
|
|
16147
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
|
|
16148
|
+
}
|
|
15804
16149
|
// Also add codeChallenge as backup in case EAR is not supported
|
|
15805
16150
|
addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
|
|
15806
16151
|
addExtraParameters(parameters, {
|
|
@@ -15884,12 +16229,14 @@ async function handleResponsePlatformBroker(request, accountId, apiId, config, b
|
|
|
15884
16229
|
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
15885
16230
|
const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
|
|
15886
16231
|
const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
|
|
16232
|
+
const brokerRequest = {
|
|
16233
|
+
...request,
|
|
16234
|
+
state: userRequestState,
|
|
16235
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
16236
|
+
};
|
|
16237
|
+
delete brokerRequest.asymmetricEar;
|
|
15887
16238
|
try {
|
|
15888
|
-
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(
|
|
15889
|
-
...request,
|
|
15890
|
-
state: userRequestState,
|
|
15891
|
-
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
15892
|
-
});
|
|
16239
|
+
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
|
|
15893
16240
|
}
|
|
15894
16241
|
catch (e) {
|
|
15895
16242
|
await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
|
|
@@ -15954,7 +16301,20 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
|
|
|
15954
16301
|
if (!request.earJwk) {
|
|
15955
16302
|
throw createBrowserAuthError(earJwkEmpty, request.correlationId);
|
|
15956
16303
|
}
|
|
15957
|
-
|
|
16304
|
+
let plaintext;
|
|
16305
|
+
if (request.asymmetricEar) {
|
|
16306
|
+
plaintext = await invokeAsync(decryptAsymmetricEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.asymmetricEar.privateJwk, request.asymmetricEar.apv, response.ear_jwe, request.asymmetricEar.apv, { logger, performanceClient, correlationId: request.correlationId });
|
|
16307
|
+
}
|
|
16308
|
+
else {
|
|
16309
|
+
plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
|
|
16310
|
+
}
|
|
16311
|
+
let decryptedData;
|
|
16312
|
+
try {
|
|
16313
|
+
decryptedData = JSON.parse(plaintext);
|
|
16314
|
+
}
|
|
16315
|
+
catch {
|
|
16316
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
|
|
16317
|
+
}
|
|
15958
16318
|
if (decryptedData.accountId) {
|
|
15959
16319
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
15960
16320
|
}
|
|
@@ -16245,6 +16605,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
16245
16605
|
: "",
|
|
16246
16606
|
postLogoutRedirectUri: "",
|
|
16247
16607
|
popupRelayUri: "",
|
|
16608
|
+
popupRelayProtocolVersion: 1,
|
|
16248
16609
|
clientCapabilities: [],
|
|
16249
16610
|
OIDCOptions: {
|
|
16250
16611
|
responseMode: ResponseMode$1.FRAGMENT,
|
|
@@ -16311,6 +16672,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
16311
16672
|
client: new StubPerformanceClient(),
|
|
16312
16673
|
};
|
|
16313
16674
|
const DEFAULT_EXPERIMENTAL_OPTIONS = {
|
|
16675
|
+
enableAsymmetricEar: false,
|
|
16314
16676
|
iframeTimeoutTelemetry: false,
|
|
16315
16677
|
allowPlatformBrokerWithDOM: false,
|
|
16316
16678
|
};
|
|
@@ -16364,9 +16726,16 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
16364
16726
|
experimental: {
|
|
16365
16727
|
...DEFAULT_EXPERIMENTAL_OPTIONS,
|
|
16366
16728
|
...userInputExperimental,
|
|
16729
|
+
enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
|
|
16367
16730
|
},
|
|
16368
16731
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
|
|
16369
16732
|
};
|
|
16733
|
+
if (overlayedConfig.experimental.enableAsymmetricEar &&
|
|
16734
|
+
overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
|
|
16735
|
+
const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
16736
|
+
logger.warning("07xxx7", "");
|
|
16737
|
+
overlayedConfig.experimental.enableAsymmetricEar = false;
|
|
16738
|
+
}
|
|
16370
16739
|
return overlayedConfig;
|
|
16371
16740
|
}
|
|
16372
16741
|
|
|
@@ -17271,19 +17640,21 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17271
17640
|
/*
|
|
17272
17641
|
* When a popup-relay page is configured, open it top-level
|
|
17273
17642
|
* (same first-party origin) instead of navigating the popup
|
|
17274
|
-
* straight to the IdP
|
|
17643
|
+
* straight to the IdP. V1 carries the action in the hash; v2
|
|
17644
|
+
* retains it for the authenticated handoff.
|
|
17275
17645
|
* The relay page opens the IdP child popup and relays the
|
|
17276
17646
|
* response back via postMessage (see waitForPopupResponse).
|
|
17277
17647
|
*/
|
|
17278
17648
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
17649
|
+
popupParams.relayAction = { method: "GET", url: navigateUrl };
|
|
17279
17650
|
const popupNavigateUrl = popupRelayUri
|
|
17280
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId),
|
|
17651
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
17281
17652
|
: navigateUrl;
|
|
17282
17653
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
17283
17654
|
const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
|
|
17284
17655
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
17285
17656
|
// Wait for the redirect bridge response
|
|
17286
|
-
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
|
|
17657
|
+
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17287
17658
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17288
17659
|
return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
17289
17660
|
}
|
|
@@ -17307,21 +17678,20 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17307
17678
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
17308
17679
|
// Get the frame handle for the silent request
|
|
17309
17680
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
17310
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
17311
17681
|
const pkce = pkceCodes ||
|
|
17312
17682
|
(await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
|
|
17313
17683
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17314
|
-
|
|
17684
|
+
let popupRequest = {
|
|
17315
17685
|
...request,
|
|
17316
|
-
earJwk: earJwk,
|
|
17317
17686
|
codeChallenge: pkce.challenge,
|
|
17318
17687
|
...tokenBindingParams,
|
|
17319
17688
|
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
17320
17689
|
};
|
|
17321
17690
|
try {
|
|
17691
|
+
popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
|
|
17322
17692
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
17323
17693
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
17324
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
17694
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17325
17695
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17326
17696
|
if (!serverParams.ear_jwe && serverParams.code) {
|
|
17327
17697
|
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
|
|
@@ -17349,7 +17719,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17349
17719
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
|
|
17350
17720
|
const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
|
|
17351
17721
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
17352
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
|
|
17722
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17353
17723
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17354
17724
|
return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
17355
17725
|
}
|
|
@@ -17405,21 +17775,22 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17405
17775
|
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, exports.InteractionType.Popup, validRequest);
|
|
17406
17776
|
/*
|
|
17407
17777
|
* When a popup-relay page is configured, open it top-level (same
|
|
17408
|
-
* first-party origin)
|
|
17409
|
-
*
|
|
17778
|
+
* first-party origin), using the configured wire protocol for the
|
|
17779
|
+
* end-session URL. The relay page opens the IdP child
|
|
17410
17780
|
* popup and the post-logout redirect page (running the redirect
|
|
17411
17781
|
* bridge) relays completion back via postMessage — so logout works
|
|
17412
17782
|
* from an embedded, cross-origin iframe where a direct popup to the
|
|
17413
17783
|
* IdP cannot. See runPopupRelay / waitForPopupResponse.
|
|
17414
17784
|
*/
|
|
17415
17785
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
17786
|
+
popupParams.relayAction = { method: "GET", url: logoutUri };
|
|
17416
17787
|
const popupNavigateUrl = popupRelayUri
|
|
17417
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId),
|
|
17788
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
17418
17789
|
: logoutUri;
|
|
17419
17790
|
// Open the popup window to requestUrl.
|
|
17420
17791
|
const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
|
|
17421
17792
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
17422
|
-
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
|
|
17793
|
+
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
|
|
17423
17794
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
17424
17795
|
});
|
|
17425
17796
|
if (mainWindowRedirectUri) {
|
|
@@ -17631,11 +18002,12 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17631
18002
|
? getEARFormData
|
|
17632
18003
|
: getCodeFormData;
|
|
17633
18004
|
const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
|
|
17634
|
-
|
|
18005
|
+
popupParams.relayAction = {
|
|
17635
18006
|
method: "POST",
|
|
17636
18007
|
action: formData.action,
|
|
17637
18008
|
fields: formData.fields,
|
|
17638
|
-
}
|
|
18009
|
+
};
|
|
18010
|
+
const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
|
|
17639
18011
|
return this.initiateAuthRequest(relayUrl, popupParams);
|
|
17640
18012
|
}
|
|
17641
18013
|
const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
@@ -17644,7 +18016,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17644
18016
|
form.submit();
|
|
17645
18017
|
return popupWindow;
|
|
17646
18018
|
}
|
|
17647
|
-
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
18019
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
|
|
17648
18020
|
/*
|
|
17649
18021
|
* When a popup-relay page is configured the response is relayed back to
|
|
17650
18022
|
* this frame by the relay page via postMessage, and the relay popup's
|
|
@@ -17654,7 +18026,11 @@ class PopupClient extends StandardInteractionClient {
|
|
|
17654
18026
|
* frame and which does not track the relay popup.
|
|
17655
18027
|
*/
|
|
17656
18028
|
if (this.config.auth.popupRelayUri) {
|
|
17657
|
-
|
|
18029
|
+
if (this.config.auth.popupRelayProtocolVersion === 2 &&
|
|
18030
|
+
!relayAction) {
|
|
18031
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
|
|
18032
|
+
}
|
|
18033
|
+
return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
|
|
17658
18034
|
}
|
|
17659
18035
|
if (this.waitForPopupResponseHook) {
|
|
17660
18036
|
return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
|
|
@@ -17779,16 +18155,15 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
17779
18155
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
17780
18156
|
// Get the frame handle for the silent request
|
|
17781
18157
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
17782
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
17783
18158
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
17784
18159
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17785
|
-
|
|
18160
|
+
let redirectRequest = {
|
|
17786
18161
|
...request,
|
|
17787
|
-
earJwk: earJwk,
|
|
17788
18162
|
codeChallenge: pkceCodes.challenge,
|
|
17789
18163
|
...tokenBindingParams,
|
|
17790
18164
|
};
|
|
17791
18165
|
try {
|
|
18166
|
+
redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
|
|
17792
18167
|
if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
|
|
17793
18168
|
throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
|
|
17794
18169
|
}
|
|
@@ -17801,9 +18176,10 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
17801
18176
|
}, this.config.system.redirectNavigationTimeout);
|
|
17802
18177
|
});
|
|
17803
18178
|
}
|
|
17804
|
-
catch (
|
|
18179
|
+
catch (error) {
|
|
18180
|
+
this.browserStorage.resetRequestCache(correlationId);
|
|
17805
18181
|
await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17806
|
-
throw
|
|
18182
|
+
throw error;
|
|
17807
18183
|
}
|
|
17808
18184
|
}
|
|
17809
18185
|
/**
|
|
@@ -17982,13 +18358,16 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
17982
18358
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, request.correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
17983
18359
|
return invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, request.correlationId)(request, serverParams, ApiId.acquireTokenRedirect, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
17984
18360
|
}
|
|
17985
|
-
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
|
|
18361
|
+
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
|
|
18362
|
+
serverTelemetryManager,
|
|
18363
|
+
requestAuthority: request.authority,
|
|
18364
|
+
requestExtraQueryParameters: request.extraQueryParameters,
|
|
18365
|
+
});
|
|
17986
18366
|
return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(request, serverParams, codeVerifier, ApiId.acquireTokenRedirect, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
17987
18367
|
}
|
|
17988
18368
|
/**
|
|
17989
18369
|
* Redirects window to given URL.
|
|
17990
18370
|
* @param urlNavigate
|
|
17991
|
-
* @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
|
|
17992
18371
|
*/
|
|
17993
18372
|
async initiateAuthRequest(requestUrl) {
|
|
17994
18373
|
this.logger.verbose("0yaw2e", this.correlationId);
|
|
@@ -18276,13 +18655,11 @@ class SilentIframeClient extends StandardInteractionClient {
|
|
|
18276
18655
|
async executeEarFlow(request) {
|
|
18277
18656
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
18278
18657
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
18279
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
18280
18658
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
18281
|
-
const silentRequest = {
|
|
18659
|
+
const silentRequest = await initializeEarRequest(this.config, {
|
|
18282
18660
|
...request,
|
|
18283
|
-
earJwk: earJwk,
|
|
18284
18661
|
codeChallenge: pkceCodes.challenge,
|
|
18285
|
-
};
|
|
18662
|
+
}, this.logger, this.performanceClient);
|
|
18286
18663
|
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
18287
18664
|
const iframe = createHiddenIframe();
|
|
18288
18665
|
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
@@ -18644,6 +19021,7 @@ function prepareWebSilentRequest({ request, account, correlationId, config, }) {
|
|
|
18644
19021
|
return {
|
|
18645
19022
|
key: JSON.stringify({
|
|
18646
19023
|
...thumbprint,
|
|
19024
|
+
accountTenantId: account.tenantId,
|
|
18647
19025
|
forceRefresh: !!request.forceRefresh,
|
|
18648
19026
|
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
18649
19027
|
extraParameters: canonicalizeStringDict(request.extraParameters),
|