@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
|
@@ -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.
|
|
@@ -296,7 +296,7 @@ const JsonWebTokenTypes = {
|
|
|
296
296
|
// Token renewal offset default in seconds
|
|
297
297
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
298
298
|
|
|
299
|
-
/*! @azure/msal-common v16.
|
|
299
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
300
300
|
/*
|
|
301
301
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
302
302
|
* Licensed under the MIT License.
|
|
@@ -325,7 +325,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
325
325
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
/*! @azure/msal-common v16.
|
|
328
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
329
329
|
|
|
330
330
|
/*
|
|
331
331
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -348,7 +348,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
348
348
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
/*! @azure/msal-common v16.
|
|
351
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
352
352
|
/*
|
|
353
353
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
354
354
|
* Licensed under the MIT License.
|
|
@@ -386,7 +386,7 @@ const methodNotImplemented = "method_not_implemented";
|
|
|
386
386
|
const resourceParameterRequired = "resource_parameter_required";
|
|
387
387
|
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
388
388
|
|
|
389
|
-
/*! @azure/msal-common v16.
|
|
389
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
390
390
|
|
|
391
391
|
/*
|
|
392
392
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -424,7 +424,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
/*! @azure/msal-common v16.
|
|
427
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
428
428
|
|
|
429
429
|
/*
|
|
430
430
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -490,7 +490,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
490
490
|
return matches[2];
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
-
/*! @azure/msal-common v16.
|
|
493
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
494
494
|
|
|
495
495
|
/*
|
|
496
496
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -578,7 +578,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
578
578
|
return updatedAccountInfo;
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
/*! @azure/msal-common v16.
|
|
581
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
582
582
|
/*
|
|
583
583
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
584
584
|
* Licensed under the MIT License.
|
|
@@ -592,7 +592,7 @@ const AuthorityType = {
|
|
|
592
592
|
Ciam: 3,
|
|
593
593
|
};
|
|
594
594
|
|
|
595
|
-
/*! @azure/msal-common v16.
|
|
595
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
596
596
|
/*
|
|
597
597
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
598
598
|
* Licensed under the MIT License.
|
|
@@ -614,7 +614,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
614
614
|
return null;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
/*! @azure/msal-common v16.
|
|
617
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
618
618
|
/*
|
|
619
619
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
620
620
|
* Licensed under the MIT License.
|
|
@@ -638,7 +638,7 @@ const ProtocolMode = {
|
|
|
638
638
|
EAR: "EAR",
|
|
639
639
|
};
|
|
640
640
|
|
|
641
|
-
/*! @azure/msal-common v16.
|
|
641
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
642
642
|
/**
|
|
643
643
|
* Returns the AccountInfo interface for this account.
|
|
644
644
|
* @internal
|
|
@@ -827,7 +827,7 @@ function isAccountEntity(entity) {
|
|
|
827
827
|
entity.hasOwnProperty("authorityType"));
|
|
828
828
|
}
|
|
829
829
|
|
|
830
|
-
/*! @azure/msal-common v16.
|
|
830
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
831
831
|
/*
|
|
832
832
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
833
833
|
* Licensed under the MIT License.
|
|
@@ -837,7 +837,7 @@ function isAccountEntity(entity) {
|
|
|
837
837
|
*/
|
|
838
838
|
const unexpectedError = "unexpected_error";
|
|
839
839
|
|
|
840
|
-
/*! @azure/msal-common v16.
|
|
840
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
841
841
|
|
|
842
842
|
/*
|
|
843
843
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -857,7 +857,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
857
857
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
858
858
|
}
|
|
859
859
|
|
|
860
|
-
/*! @azure/msal-common v16.
|
|
860
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
861
861
|
/*
|
|
862
862
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
863
863
|
* Licensed under the MIT License.
|
|
@@ -897,7 +897,7 @@ function getResponseHeader(headers, name) {
|
|
|
897
897
|
return headerName === undefined ? undefined : headers[headerName];
|
|
898
898
|
}
|
|
899
899
|
|
|
900
|
-
/*! @azure/msal-common v16.
|
|
900
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
901
901
|
/*
|
|
902
902
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
903
903
|
* Licensed under the MIT License.
|
|
@@ -928,7 +928,7 @@ const invalidDpopHtu = "invalid_dpop_htu";
|
|
|
928
928
|
const invalidDpopNonce = "invalid_dpop_nonce";
|
|
929
929
|
const dpopMissingResourceContext = "dpop_missing_resource_context";
|
|
930
930
|
|
|
931
|
-
/*! @azure/msal-common v16.
|
|
931
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
932
932
|
/*
|
|
933
933
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
934
934
|
* Licensed under the MIT License.
|
|
@@ -940,7 +940,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
940
940
|
response.hasOwnProperty("jwks_uri"));
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
-
/*! @azure/msal-common v16.
|
|
943
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
944
944
|
/*
|
|
945
945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
946
946
|
* Licensed under the MIT License.
|
|
@@ -1020,12 +1020,18 @@ class StringUtils {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
|
-
/*! @azure/msal-common v16.
|
|
1023
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1024
1024
|
|
|
1025
1025
|
/*
|
|
1026
1026
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1027
1027
|
* Licensed under the MIT License.
|
|
1028
1028
|
*/
|
|
1029
|
+
// Matches ASCII controls, space, DEL, backslash, or the userinfo separator (@).
|
|
1030
|
+
const UNSAFE_AUTHORITY = /[\x00-\x20\x7f\\@]/;
|
|
1031
|
+
const DEFAULT_PORTS = {
|
|
1032
|
+
"https:": ":443",
|
|
1033
|
+
"http:": ":80",
|
|
1034
|
+
};
|
|
1029
1035
|
/**
|
|
1030
1036
|
* Url object class which can perform various transformations on url strings.
|
|
1031
1037
|
*/
|
|
@@ -1141,6 +1147,29 @@ class UrlString {
|
|
|
1141
1147
|
AbsolutePath: match[5],
|
|
1142
1148
|
QueryString: match[7],
|
|
1143
1149
|
};
|
|
1150
|
+
let parsedUrl;
|
|
1151
|
+
try {
|
|
1152
|
+
parsedUrl = new URL(this.urlString);
|
|
1153
|
+
}
|
|
1154
|
+
catch {
|
|
1155
|
+
throw createClientConfigurationError(urlParseError, this.correlationId);
|
|
1156
|
+
}
|
|
1157
|
+
const host = urlComponents.HostNameAndPort?.toLowerCase();
|
|
1158
|
+
const schemeAndAuthority = `${urlComponents.Protocol}//${host}`;
|
|
1159
|
+
const defaultPort = DEFAULT_PORTS[parsedUrl.protocol] ?? "";
|
|
1160
|
+
/*
|
|
1161
|
+
* Cross-check the original host; reparsing parsedUrl would hide parser differences.
|
|
1162
|
+
* URL has validated IPv6 syntax, so only bracketed hosts need a normalization comparison.
|
|
1163
|
+
*/
|
|
1164
|
+
const hostMatches = host === parsedUrl.host ||
|
|
1165
|
+
host === `${parsedUrl.host}${defaultPort}` ||
|
|
1166
|
+
(host?.startsWith("[") &&
|
|
1167
|
+
new URL(`${urlComponents.Protocol}//${host}`).host ===
|
|
1168
|
+
parsedUrl.host);
|
|
1169
|
+
// Check authority ambiguity without restricting resource paths, queries, or fragments.
|
|
1170
|
+
if (UNSAFE_AUTHORITY.test(schemeAndAuthority) || !hostMatches) {
|
|
1171
|
+
throw createClientConfigurationError(urlParseError, this.correlationId);
|
|
1172
|
+
}
|
|
1144
1173
|
let pathSegments = urlComponents.AbsolutePath.split("/");
|
|
1145
1174
|
pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements
|
|
1146
1175
|
urlComponents.PathSegments = pathSegments;
|
|
@@ -1178,7 +1207,7 @@ class UrlString {
|
|
|
1178
1207
|
}
|
|
1179
1208
|
}
|
|
1180
1209
|
|
|
1181
|
-
/*! @azure/msal-common v16.
|
|
1210
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1182
1211
|
|
|
1183
1212
|
/*
|
|
1184
1213
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1332,7 +1361,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1332
1361
|
return null;
|
|
1333
1362
|
}
|
|
1334
1363
|
|
|
1335
|
-
/*! @azure/msal-common v16.
|
|
1364
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1336
1365
|
/*
|
|
1337
1366
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1338
1367
|
* Licensed under the MIT License.
|
|
@@ -1341,7 +1370,7 @@ const AzureCloudInstance = {
|
|
|
1341
1370
|
// AzureCloudInstance is not specified.
|
|
1342
1371
|
None: "none"};
|
|
1343
1372
|
|
|
1344
|
-
/*! @azure/msal-common v16.
|
|
1373
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1345
1374
|
/*
|
|
1346
1375
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1347
1376
|
* Licensed under the MIT License.
|
|
@@ -1351,7 +1380,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1351
1380
|
response.hasOwnProperty("metadata"));
|
|
1352
1381
|
}
|
|
1353
1382
|
|
|
1354
|
-
/*! @azure/msal-common v16.
|
|
1383
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1355
1384
|
/*
|
|
1356
1385
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1357
1386
|
* Licensed under the MIT License.
|
|
@@ -1361,7 +1390,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1361
1390
|
response.hasOwnProperty("error_description"));
|
|
1362
1391
|
}
|
|
1363
1392
|
|
|
1364
|
-
/*! @azure/msal-common v16.
|
|
1393
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1365
1394
|
/*
|
|
1366
1395
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1367
1396
|
* Licensed under the MIT License.
|
|
@@ -1432,7 +1461,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1432
1461
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1433
1462
|
const SetUserData = "setUserData";
|
|
1434
1463
|
|
|
1435
|
-
/*! @azure/msal-common v16.
|
|
1464
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1436
1465
|
/*
|
|
1437
1466
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1438
1467
|
* Licensed under the MIT License.
|
|
@@ -1468,7 +1497,8 @@ const invoke = (callback, eventName, logger, telemetryClient, correlationId) =>
|
|
|
1468
1497
|
catch (e) {
|
|
1469
1498
|
logger.trace(`0cfd8i ${eventName}`, correlationId);
|
|
1470
1499
|
try {
|
|
1471
|
-
|
|
1500
|
+
// Prevent numeric error details from being treated as minified log hashes.
|
|
1501
|
+
logger.tracePii(`028ef8 ${JSON.stringify(e)}`, correlationId);
|
|
1472
1502
|
}
|
|
1473
1503
|
catch (e) {
|
|
1474
1504
|
logger.trace("00dty7", correlationId);
|
|
@@ -1512,7 +1542,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1512
1542
|
.catch((e) => {
|
|
1513
1543
|
logger.trace(`0cfd8i ${eventName}`, correlationId);
|
|
1514
1544
|
try {
|
|
1515
|
-
logger.
|
|
1545
|
+
logger.tracePii(`028ef8 ${JSON.stringify(e)}`, correlationId);
|
|
1516
1546
|
}
|
|
1517
1547
|
catch (e) {
|
|
1518
1548
|
logger.trace("00dty7", correlationId);
|
|
@@ -1525,12 +1555,26 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1525
1555
|
};
|
|
1526
1556
|
};
|
|
1527
1557
|
|
|
1528
|
-
/*! @azure/msal-common v16.
|
|
1558
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1529
1559
|
|
|
1530
1560
|
/*
|
|
1531
1561
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1532
1562
|
* Licensed under the MIT License.
|
|
1533
1563
|
*/
|
|
1564
|
+
// Starts with an ASCII letter; remaining characters are ASCII letters, digits, or hyphens.
|
|
1565
|
+
const REGION_NAME_PATTERN = /^[a-z][a-z0-9-]*$/i;
|
|
1566
|
+
// A region becomes a DNS label, limited to 63 octets by RFC 1035 section 2.3.4.
|
|
1567
|
+
const MAX_REGION_NAME_LENGTH = 63;
|
|
1568
|
+
/**
|
|
1569
|
+
* Whether a region can safely be used as a single DNS label.
|
|
1570
|
+
*/
|
|
1571
|
+
function isValidRegion(region) {
|
|
1572
|
+
return (typeof region === "string" &&
|
|
1573
|
+
region.length <= MAX_REGION_NAME_LENGTH &&
|
|
1574
|
+
REGION_NAME_PATTERN.test(region) &&
|
|
1575
|
+
// Keep the trailing-hyphen rule explicit rather than complicating the pattern.
|
|
1576
|
+
!region.endsWith("-"));
|
|
1577
|
+
}
|
|
1534
1578
|
class RegionDiscovery {
|
|
1535
1579
|
constructor(networkInterface, logger, performanceClient, correlationId) {
|
|
1536
1580
|
this.networkInterface = networkInterface;
|
|
@@ -1590,12 +1634,16 @@ class RegionDiscovery {
|
|
|
1590
1634
|
regionDiscoveryMetadata.region_source =
|
|
1591
1635
|
RegionDiscoverySources.ENVIRONMENT_VARIABLE;
|
|
1592
1636
|
}
|
|
1593
|
-
//
|
|
1594
|
-
if (!autodetectedRegionName) {
|
|
1637
|
+
// Untrusted discovery values must be a single DNS label before becoming a host prefix.
|
|
1638
|
+
if (!autodetectedRegionName || !isValidRegion(autodetectedRegionName)) {
|
|
1639
|
+
if (autodetectedRegionName) {
|
|
1640
|
+
this.logger.warning("0n83q0", this.correlationId);
|
|
1641
|
+
}
|
|
1595
1642
|
regionDiscoveryMetadata.region_source =
|
|
1596
1643
|
RegionDiscoverySources.FAILED_AUTO_DETECTION;
|
|
1644
|
+
return null;
|
|
1597
1645
|
}
|
|
1598
|
-
return autodetectedRegionName
|
|
1646
|
+
return autodetectedRegionName;
|
|
1599
1647
|
}
|
|
1600
1648
|
/**
|
|
1601
1649
|
* Make the call to the IMDS endpoint
|
|
@@ -1636,7 +1684,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1636
1684
|
},
|
|
1637
1685
|
};
|
|
1638
1686
|
|
|
1639
|
-
/*! @azure/msal-common v16.
|
|
1687
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1640
1688
|
/*
|
|
1641
1689
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1642
1690
|
* Licensed under the MIT License.
|
|
@@ -1701,7 +1749,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1701
1749
|
return cachedAtSec > nowSeconds();
|
|
1702
1750
|
}
|
|
1703
1751
|
|
|
1704
|
-
/*! @azure/msal-common v16.
|
|
1752
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1705
1753
|
|
|
1706
1754
|
/*
|
|
1707
1755
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1988,7 +2036,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
1988
2036
|
return [...attributeTokens].sort().join(" ");
|
|
1989
2037
|
}
|
|
1990
2038
|
|
|
1991
|
-
/*! @azure/msal-common v16.
|
|
2039
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1992
2040
|
|
|
1993
2041
|
/*
|
|
1994
2042
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2841,6 +2889,9 @@ class Authority {
|
|
|
2841
2889
|
* @param region string
|
|
2842
2890
|
*/
|
|
2843
2891
|
static buildRegionalAuthorityString(host, region, correlationId, queryString) {
|
|
2892
|
+
if (!isValidRegion(region)) {
|
|
2893
|
+
throw createClientConfigurationError(urlParseError, correlationId);
|
|
2894
|
+
}
|
|
2844
2895
|
// Create and validate a Url string object with the initial authority string
|
|
2845
2896
|
const authorityUrlInstance = new UrlString(host, correlationId);
|
|
2846
2897
|
authorityUrlInstance.validateAsUri();
|
|
@@ -2851,7 +2902,7 @@ class Authority {
|
|
|
2851
2902
|
}
|
|
2852
2903
|
// Include the query string portion of the url
|
|
2853
2904
|
const url = UrlString.constructAuthorityUriFromObject({
|
|
2854
|
-
...
|
|
2905
|
+
...authorityUrlParts,
|
|
2855
2906
|
HostNameAndPort: hostNameAndPort,
|
|
2856
2907
|
}, correlationId).urlString;
|
|
2857
2908
|
// Add the query string if a query string was provided
|
|
@@ -2956,7 +3007,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
2956
3007
|
};
|
|
2957
3008
|
}
|
|
2958
3009
|
|
|
2959
|
-
/*! @azure/msal-common v16.
|
|
3010
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
2960
3011
|
|
|
2961
3012
|
/*
|
|
2962
3013
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2990,7 +3041,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
2990
3041
|
}
|
|
2991
3042
|
}
|
|
2992
3043
|
|
|
2993
|
-
/*! @azure/msal-common v16.
|
|
3044
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
2994
3045
|
|
|
2995
3046
|
/*
|
|
2996
3047
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3186,7 +3237,7 @@ class ScopeSet {
|
|
|
3186
3237
|
}
|
|
3187
3238
|
}
|
|
3188
3239
|
|
|
3189
|
-
/*! @azure/msal-common v16.
|
|
3240
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3190
3241
|
|
|
3191
3242
|
/*
|
|
3192
3243
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3654,12 +3705,13 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
|
|
|
3654
3705
|
* Add EAR (Encrypted Authorize Response) request parameters
|
|
3655
3706
|
* @param parameters
|
|
3656
3707
|
* @param jwk
|
|
3708
|
+
* @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
|
|
3657
3709
|
*/
|
|
3658
|
-
function addEARParameters(parameters, jwk) {
|
|
3710
|
+
function addEARParameters(parameters, jwk, jweCrypto) {
|
|
3659
3711
|
parameters.set(EAR_JWK, encodeURIComponent(jwk));
|
|
3660
|
-
//
|
|
3712
|
+
// Default symmetric EAR metadata; asymmetric requests supply their APV.
|
|
3661
3713
|
const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
|
|
3662
|
-
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
3714
|
+
parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
|
|
3663
3715
|
}
|
|
3664
3716
|
function addResource(parameters, resource) {
|
|
3665
3717
|
if (resource) {
|
|
@@ -3686,7 +3738,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3686
3738
|
}
|
|
3687
3739
|
}
|
|
3688
3740
|
|
|
3689
|
-
/*! @azure/msal-common v16.
|
|
3741
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3690
3742
|
|
|
3691
3743
|
/*
|
|
3692
3744
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3817,7 +3869,7 @@ function validateUrl(url, logger, correlationId) {
|
|
|
3817
3869
|
}
|
|
3818
3870
|
}
|
|
3819
3871
|
|
|
3820
|
-
/*! @azure/msal-common v16.
|
|
3872
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3821
3873
|
|
|
3822
3874
|
/*
|
|
3823
3875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3865,7 +3917,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3865
3917
|
},
|
|
3866
3918
|
};
|
|
3867
3919
|
|
|
3868
|
-
/*! @azure/msal-common v16.
|
|
3920
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3869
3921
|
|
|
3870
3922
|
/*
|
|
3871
3923
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3888,7 +3940,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
3888
3940
|
},
|
|
3889
3941
|
};
|
|
3890
3942
|
|
|
3891
|
-
/*! @azure/msal-common v16.
|
|
3943
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3892
3944
|
/*
|
|
3893
3945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3894
3946
|
* Licensed under the MIT License.
|
|
@@ -4163,12 +4215,12 @@ class Logger {
|
|
|
4163
4215
|
}
|
|
4164
4216
|
}
|
|
4165
4217
|
|
|
4166
|
-
/*! @azure/msal-common v16.
|
|
4218
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4167
4219
|
/* eslint-disable header/header */
|
|
4168
4220
|
const name$1 = "@azure/msal-common";
|
|
4169
|
-
const version$1 = "16.
|
|
4221
|
+
const version$1 = "16.17.0";
|
|
4170
4222
|
|
|
4171
|
-
/*! @azure/msal-common v16.
|
|
4223
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4172
4224
|
/*
|
|
4173
4225
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4174
4226
|
* Licensed under the MIT License.
|
|
@@ -4176,7 +4228,7 @@ const version$1 = "16.16.1";
|
|
|
4176
4228
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4177
4229
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4178
4230
|
|
|
4179
|
-
/*! @azure/msal-common v16.
|
|
4231
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4180
4232
|
|
|
4181
4233
|
/*
|
|
4182
4234
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4214,7 +4266,7 @@ function createCacheError(e) {
|
|
|
4214
4266
|
}
|
|
4215
4267
|
}
|
|
4216
4268
|
|
|
4217
|
-
/*! @azure/msal-common v16.
|
|
4269
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4218
4270
|
|
|
4219
4271
|
/*
|
|
4220
4272
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5441,7 +5493,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5441
5493
|
}
|
|
5442
5494
|
}
|
|
5443
5495
|
|
|
5444
|
-
/*! @azure/msal-common v16.
|
|
5496
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5445
5497
|
/*
|
|
5446
5498
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5447
5499
|
* Licensed under the MIT License.
|
|
@@ -5455,7 +5507,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5455
5507
|
const PerformanceEventStatus = {
|
|
5456
5508
|
InProgress: 1};
|
|
5457
5509
|
|
|
5458
|
-
/*! @azure/msal-common v16.
|
|
5510
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5459
5511
|
|
|
5460
5512
|
/*
|
|
5461
5513
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5513,7 +5565,7 @@ class StubPerformanceClient {
|
|
|
5513
5565
|
}
|
|
5514
5566
|
}
|
|
5515
5567
|
|
|
5516
|
-
/*! @azure/msal-common v16.
|
|
5568
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5517
5569
|
|
|
5518
5570
|
/*
|
|
5519
5571
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5611,7 +5663,7 @@ function isOidcProtocolMode(config) {
|
|
|
5611
5663
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5612
5664
|
}
|
|
5613
5665
|
|
|
5614
|
-
/*! @azure/msal-common v16.
|
|
5666
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5615
5667
|
/*
|
|
5616
5668
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5617
5669
|
* Licensed under the MIT License.
|
|
@@ -5638,7 +5690,7 @@ function isOidcProtocolMode(config) {
|
|
|
5638
5690
|
}
|
|
5639
5691
|
}
|
|
5640
5692
|
|
|
5641
|
-
/*! @azure/msal-common v16.
|
|
5693
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5642
5694
|
|
|
5643
5695
|
/*
|
|
5644
5696
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5659,7 +5711,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5659
5711
|
return new JoseHeaderError(code, correlationId);
|
|
5660
5712
|
}
|
|
5661
5713
|
|
|
5662
|
-
/*! @azure/msal-common v16.
|
|
5714
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5663
5715
|
/*
|
|
5664
5716
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5665
5717
|
* Licensed under the MIT License.
|
|
@@ -5684,7 +5736,7 @@ function isPlainObject(value) {
|
|
|
5684
5736
|
return Object.getPrototypeOf(value) === proto;
|
|
5685
5737
|
}
|
|
5686
5738
|
|
|
5687
|
-
/*! @azure/msal-common v16.
|
|
5739
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5688
5740
|
/*
|
|
5689
5741
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5690
5742
|
* Licensed under the MIT License.
|
|
@@ -5694,7 +5746,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5694
5746
|
const missingJwkError = "missing_jwk_error";
|
|
5695
5747
|
const invalidJwkError = "invalid_jwk_error";
|
|
5696
5748
|
|
|
5697
|
-
/*! @azure/msal-common v16.
|
|
5749
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5698
5750
|
|
|
5699
5751
|
/*
|
|
5700
5752
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5760,7 +5812,7 @@ class JoseHeader {
|
|
|
5760
5812
|
}
|
|
5761
5813
|
}
|
|
5762
5814
|
|
|
5763
|
-
/*! @azure/msal-common v16.
|
|
5815
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5764
5816
|
|
|
5765
5817
|
/*
|
|
5766
5818
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5861,7 +5913,7 @@ class PopTokenGenerator {
|
|
|
5861
5913
|
}
|
|
5862
5914
|
}
|
|
5863
5915
|
|
|
5864
|
-
/*! @azure/msal-common v16.
|
|
5916
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5865
5917
|
|
|
5866
5918
|
/*
|
|
5867
5919
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6016,7 +6068,7 @@ class DpopProofGenerator {
|
|
|
6016
6068
|
}
|
|
6017
6069
|
}
|
|
6018
6070
|
|
|
6019
|
-
/*! @azure/msal-common v16.
|
|
6071
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6020
6072
|
/*
|
|
6021
6073
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6022
6074
|
* Licensed under the MIT License.
|
|
@@ -6067,7 +6119,7 @@ const badToken = "bad_token";
|
|
|
6067
6119
|
*/
|
|
6068
6120
|
const interruptedUser = "interrupted_user";
|
|
6069
6121
|
|
|
6070
|
-
/*! @azure/msal-common v16.
|
|
6122
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6071
6123
|
|
|
6072
6124
|
/*
|
|
6073
6125
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6134,7 +6186,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6134
6186
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6135
6187
|
}
|
|
6136
6188
|
|
|
6137
|
-
/*! @azure/msal-common v16.
|
|
6189
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6138
6190
|
|
|
6139
6191
|
/*
|
|
6140
6192
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6153,7 +6205,7 @@ class ServerError extends AuthError {
|
|
|
6153
6205
|
}
|
|
6154
6206
|
}
|
|
6155
6207
|
|
|
6156
|
-
/*! @azure/msal-common v16.
|
|
6208
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6157
6209
|
|
|
6158
6210
|
/*
|
|
6159
6211
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6224,7 +6276,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6224
6276
|
}
|
|
6225
6277
|
}
|
|
6226
6278
|
|
|
6227
|
-
/*! @azure/msal-common v16.
|
|
6279
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6228
6280
|
|
|
6229
6281
|
/*
|
|
6230
6282
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6652,7 +6704,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6652
6704
|
return baseAccount;
|
|
6653
6705
|
}
|
|
6654
6706
|
|
|
6655
|
-
/*! @azure/msal-common v16.
|
|
6707
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6656
6708
|
/*
|
|
6657
6709
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6658
6710
|
* Licensed under the MIT License.
|
|
@@ -6662,7 +6714,7 @@ const CcsCredentialType = {
|
|
|
6662
6714
|
UPN: "UPN",
|
|
6663
6715
|
};
|
|
6664
6716
|
|
|
6665
|
-
/*! @azure/msal-common v16.
|
|
6717
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6666
6718
|
/*
|
|
6667
6719
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6668
6720
|
* Licensed under the MIT License.
|
|
@@ -6681,7 +6733,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6681
6733
|
}
|
|
6682
6734
|
}
|
|
6683
6735
|
|
|
6684
|
-
/*! @azure/msal-common v16.
|
|
6736
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6685
6737
|
|
|
6686
6738
|
/*
|
|
6687
6739
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6705,7 +6757,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6705
6757
|
};
|
|
6706
6758
|
}
|
|
6707
6759
|
|
|
6708
|
-
/*! @azure/msal-common v16.
|
|
6760
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6709
6761
|
|
|
6710
6762
|
/*
|
|
6711
6763
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6795,7 +6847,7 @@ function getRetryAfterHeader(response) {
|
|
|
6795
6847
|
return undefined;
|
|
6796
6848
|
}
|
|
6797
6849
|
|
|
6798
|
-
/*! @azure/msal-common v16.
|
|
6850
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6799
6851
|
|
|
6800
6852
|
/*
|
|
6801
6853
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6826,7 +6878,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6826
6878
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6827
6879
|
}
|
|
6828
6880
|
|
|
6829
|
-
/*! @azure/msal-common v16.
|
|
6881
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6830
6882
|
|
|
6831
6883
|
/*
|
|
6832
6884
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6960,7 +7012,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
6960
7012
|
return response;
|
|
6961
7013
|
}
|
|
6962
7014
|
|
|
6963
|
-
/*! @azure/msal-common v16.
|
|
7015
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6964
7016
|
|
|
6965
7017
|
/*
|
|
6966
7018
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7003,7 +7055,8 @@ class AuthorizationCodeClient {
|
|
|
7003
7055
|
throw createClientAuthError(requestCannotBeMade, request.correlationId);
|
|
7004
7056
|
}
|
|
7005
7057
|
// Check for new cloud instance
|
|
7006
|
-
if (
|
|
7058
|
+
if (this.config.authOptions.instanceAware === true &&
|
|
7059
|
+
authCodePayload?.cloud_instance_host_name) {
|
|
7007
7060
|
await invokeAsync(this.updateTokenEndpointAuthority.bind(this), UpdateTokenEndpointAuthority, this.logger, this.performanceClient, request.correlationId)(authCodePayload.cloud_instance_host_name, request.correlationId);
|
|
7008
7061
|
}
|
|
7009
7062
|
const reqTimestamp = nowSeconds();
|
|
@@ -7227,7 +7280,7 @@ class AuthorizationCodeClient {
|
|
|
7227
7280
|
}
|
|
7228
7281
|
}
|
|
7229
7282
|
|
|
7230
|
-
/*! @azure/msal-common v16.
|
|
7283
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7231
7284
|
|
|
7232
7285
|
/*
|
|
7233
7286
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7412,13 +7465,13 @@ function validateAuthorizationResponse(serverResponse, requestState, correlation
|
|
|
7412
7465
|
decodedServerResponseState = decodeURIComponent(serverResponse.state);
|
|
7413
7466
|
}
|
|
7414
7467
|
catch (e) {
|
|
7415
|
-
throw createClientAuthError(invalidState, correlationId
|
|
7468
|
+
throw createClientAuthError(invalidState, correlationId);
|
|
7416
7469
|
}
|
|
7417
7470
|
try {
|
|
7418
7471
|
decodedRequestState = decodeURIComponent(requestState);
|
|
7419
7472
|
}
|
|
7420
7473
|
catch (e) {
|
|
7421
|
-
throw createClientAuthError(invalidState, correlationId
|
|
7474
|
+
throw createClientAuthError(invalidState, correlationId);
|
|
7422
7475
|
}
|
|
7423
7476
|
if (decodedServerResponseState !== decodedRequestState) {
|
|
7424
7477
|
throw createClientAuthError(stateMismatch, correlationId);
|
|
@@ -7457,7 +7510,7 @@ function extractLoginHint(account) {
|
|
|
7457
7510
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7458
7511
|
}
|
|
7459
7512
|
|
|
7460
|
-
/*! @azure/msal-common v16.
|
|
7513
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7461
7514
|
|
|
7462
7515
|
/*
|
|
7463
7516
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7692,7 +7745,7 @@ class RefreshTokenClient {
|
|
|
7692
7745
|
}
|
|
7693
7746
|
}
|
|
7694
7747
|
|
|
7695
|
-
/*! @azure/msal-common v16.
|
|
7748
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7696
7749
|
|
|
7697
7750
|
/*
|
|
7698
7751
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7985,7 +8038,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
|
|
|
7985
8038
|
clearNativeBrokerErrorCode() { }
|
|
7986
8039
|
}
|
|
7987
8040
|
|
|
7988
|
-
/*! @azure/msal-common v16.
|
|
8041
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7989
8042
|
|
|
7990
8043
|
/*
|
|
7991
8044
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8112,7 +8165,7 @@ class SilentFlowClient {
|
|
|
8112
8165
|
}
|
|
8113
8166
|
}
|
|
8114
8167
|
|
|
8115
|
-
/*! @azure/msal-common v16.
|
|
8168
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8116
8169
|
|
|
8117
8170
|
/*
|
|
8118
8171
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8128,7 +8181,7 @@ const StubbedNetworkModule = {
|
|
|
8128
8181
|
},
|
|
8129
8182
|
};
|
|
8130
8183
|
|
|
8131
|
-
/*! @azure/msal-common v16.
|
|
8184
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8132
8185
|
|
|
8133
8186
|
/*
|
|
8134
8187
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8580,7 +8633,7 @@ function filterReservedSignUpAttributesV2(attributes, logger, correlationId) {
|
|
|
8580
8633
|
|
|
8581
8634
|
/* eslint-disable header/header */
|
|
8582
8635
|
const name = "@azure/msal-browser";
|
|
8583
|
-
const version = "5.
|
|
8636
|
+
const version = "5.30.0";
|
|
8584
8637
|
|
|
8585
8638
|
/*
|
|
8586
8639
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9224,6 +9277,13 @@ const UrlEncodeArr = "urlEncodeArr";
|
|
|
9224
9277
|
const Encrypt = "encrypt";
|
|
9225
9278
|
const Decrypt = "decrypt";
|
|
9226
9279
|
const GenerateEarKey = "generateEarKey";
|
|
9280
|
+
const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
|
|
9281
|
+
const ImportAsymmetricEarKey = "importAsymmetricEarKey";
|
|
9282
|
+
const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
|
|
9283
|
+
const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
|
|
9284
|
+
const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
|
|
9285
|
+
const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
|
|
9286
|
+
const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
|
|
9227
9287
|
const DecryptEarResponse = "decryptEarResponse";
|
|
9228
9288
|
/**
|
|
9229
9289
|
* Background telemetry measurement that tracks whether a late bridge response
|
|
@@ -9284,6 +9344,7 @@ const tokenBindingKeyJwkThumbprintMismatch = "token_binding_key_jwk_thumbprint_m
|
|
|
9284
9344
|
const failedToBuildHeaders = "failed_to_build_headers";
|
|
9285
9345
|
const failedToParseHeaders = "failed_to_parse_headers";
|
|
9286
9346
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
9347
|
+
const asymmetricEarKeyError = "asymmetric_ear_key_error";
|
|
9287
9348
|
const timedOut = "timed_out";
|
|
9288
9349
|
const emptyResponse = "empty_response";
|
|
9289
9350
|
|
|
@@ -9592,6 +9653,10 @@ const HKDF = "HKDF";
|
|
|
9592
9653
|
const S256_HASH_ALG = "SHA-256";
|
|
9593
9654
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
9594
9655
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
9656
|
+
const ECDH_P384_ALGORITHM = {
|
|
9657
|
+
name: "ECDH",
|
|
9658
|
+
namedCurve: "P-384",
|
|
9659
|
+
};
|
|
9595
9660
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
9596
9661
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
9597
9662
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -9729,6 +9794,16 @@ async function generateKeyPair(extractable, usages, algorithm) {
|
|
|
9729
9794
|
async function exportJwk(key) {
|
|
9730
9795
|
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
9731
9796
|
}
|
|
9797
|
+
/**
|
|
9798
|
+
* Imports key as Json Web Key (JWK), can set extractable and usages.
|
|
9799
|
+
* @param key
|
|
9800
|
+
* @param extractable
|
|
9801
|
+
* @param usages
|
|
9802
|
+
* @param algorithm
|
|
9803
|
+
*/
|
|
9804
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9805
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9806
|
+
}
|
|
9732
9807
|
/**
|
|
9733
9808
|
* Signs given data with given key.
|
|
9734
9809
|
* @param key
|
|
@@ -9751,6 +9826,172 @@ async function generateEarKey() {
|
|
|
9751
9826
|
};
|
|
9752
9827
|
return base64Encode(JSON.stringify(jwk));
|
|
9753
9828
|
}
|
|
9829
|
+
/**
|
|
9830
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
9831
|
+
* @internal
|
|
9832
|
+
*/
|
|
9833
|
+
async function generateAsymmetricEarKey() {
|
|
9834
|
+
const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9835
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
9836
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
9837
|
+
return {
|
|
9838
|
+
privateJwk,
|
|
9839
|
+
publicJwk,
|
|
9840
|
+
};
|
|
9841
|
+
}
|
|
9842
|
+
/**
|
|
9843
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
9844
|
+
* @internal
|
|
9845
|
+
*/
|
|
9846
|
+
async function importAsymmetricEarKey(privateJwk, correlationId = "") {
|
|
9847
|
+
if (privateJwk?.kty !== "EC" ||
|
|
9848
|
+
privateJwk.crv !== "P-384" ||
|
|
9849
|
+
!privateJwk.d) {
|
|
9850
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
|
|
9851
|
+
}
|
|
9852
|
+
try {
|
|
9853
|
+
return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9854
|
+
}
|
|
9855
|
+
catch {
|
|
9856
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9859
|
+
/**
|
|
9860
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
9861
|
+
* @internal
|
|
9862
|
+
*/
|
|
9863
|
+
function generateAsymmetricEarApv(publicJwk) {
|
|
9864
|
+
const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
|
|
9865
|
+
if (point.length !== 97) {
|
|
9866
|
+
throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
|
|
9867
|
+
}
|
|
9868
|
+
const nonce = new Uint8Array(24);
|
|
9869
|
+
window.crypto.getRandomValues(nonce);
|
|
9870
|
+
return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
|
|
9871
|
+
}
|
|
9872
|
+
/**
|
|
9873
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
9874
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
9875
|
+
* @internal
|
|
9876
|
+
*/
|
|
9877
|
+
async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
|
|
9878
|
+
const correlationId = telemetry?.correlationId || "";
|
|
9879
|
+
const measure = (eventName, operation) => telemetry
|
|
9880
|
+
? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
|
|
9881
|
+
: operation();
|
|
9882
|
+
if (apv !== requestApv) {
|
|
9883
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
|
|
9884
|
+
}
|
|
9885
|
+
const parts = earJwe.split(".");
|
|
9886
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
9887
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9888
|
+
}
|
|
9889
|
+
let header;
|
|
9890
|
+
try {
|
|
9891
|
+
header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
|
|
9892
|
+
}
|
|
9893
|
+
catch {
|
|
9894
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9895
|
+
}
|
|
9896
|
+
if (!header ||
|
|
9897
|
+
header.alg !== "ECDH-ES" ||
|
|
9898
|
+
header.enc !== "A256GCM" ||
|
|
9899
|
+
header.crit !== undefined ||
|
|
9900
|
+
header.zip !== undefined ||
|
|
9901
|
+
header.epk?.kty !== "EC" ||
|
|
9902
|
+
header.epk.crv !== "P-384" ||
|
|
9903
|
+
header.epk.d !== undefined ||
|
|
9904
|
+
(header.apv !== undefined && header.apv !== apv)) {
|
|
9905
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9906
|
+
}
|
|
9907
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
9908
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
9909
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
9910
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
9911
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
9912
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
9913
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
9914
|
+
if (x.length !== 48 ||
|
|
9915
|
+
y.length !== 48 ||
|
|
9916
|
+
iv.length !== 12 ||
|
|
9917
|
+
tag.length !== 16) {
|
|
9918
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9919
|
+
}
|
|
9920
|
+
let key;
|
|
9921
|
+
try {
|
|
9922
|
+
const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
|
|
9923
|
+
const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
|
|
9924
|
+
kty: "EC",
|
|
9925
|
+
crv: "P-384",
|
|
9926
|
+
x: header.epk.x,
|
|
9927
|
+
y: header.epk.y,
|
|
9928
|
+
}, false, [], ECDH_P384_ALGORITHM));
|
|
9929
|
+
const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
|
|
9930
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
9931
|
+
const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
|
|
9932
|
+
let derivedKey;
|
|
9933
|
+
try {
|
|
9934
|
+
derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
|
|
9935
|
+
}
|
|
9936
|
+
finally {
|
|
9937
|
+
secret.fill(0);
|
|
9938
|
+
input.fill(0);
|
|
9939
|
+
}
|
|
9940
|
+
try {
|
|
9941
|
+
key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
|
|
9942
|
+
}
|
|
9943
|
+
finally {
|
|
9944
|
+
new Uint8Array(derivedKey).fill(0);
|
|
9945
|
+
}
|
|
9946
|
+
}
|
|
9947
|
+
catch (error) {
|
|
9948
|
+
if (error instanceof AuthError) {
|
|
9949
|
+
throw error;
|
|
9950
|
+
}
|
|
9951
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
|
|
9952
|
+
}
|
|
9953
|
+
try {
|
|
9954
|
+
const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
|
|
9955
|
+
name: AES_GCM,
|
|
9956
|
+
iv,
|
|
9957
|
+
tagLength: 128,
|
|
9958
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
9959
|
+
}, key, concatEarBytes(ciphertext, tag)));
|
|
9960
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
9961
|
+
}
|
|
9962
|
+
catch {
|
|
9963
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
|
|
9964
|
+
}
|
|
9965
|
+
}
|
|
9966
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
9967
|
+
function decodeEarBase64Url(value, correlationId = "") {
|
|
9968
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
9969
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
9970
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9971
|
+
}
|
|
9972
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
9973
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
9974
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9975
|
+
}
|
|
9976
|
+
return bytes;
|
|
9977
|
+
}
|
|
9978
|
+
function earUint32(value) {
|
|
9979
|
+
const bytes = new Uint8Array(4);
|
|
9980
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
9981
|
+
return bytes;
|
|
9982
|
+
}
|
|
9983
|
+
function concatEarBytes(...parts) {
|
|
9984
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
9985
|
+
let offset = 0;
|
|
9986
|
+
for (const part of parts) {
|
|
9987
|
+
bytes.set(part, offset);
|
|
9988
|
+
offset += part.length;
|
|
9989
|
+
}
|
|
9990
|
+
return bytes.buffer;
|
|
9991
|
+
}
|
|
9992
|
+
function lengthPrefixEarBytes(bytes) {
|
|
9993
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
9994
|
+
}
|
|
9754
9995
|
/**
|
|
9755
9996
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
9756
9997
|
* @param earJwk
|
|
@@ -11504,6 +11745,10 @@ class StandardInteractionClient extends BaseInteractionClient {
|
|
|
11504
11745
|
clientId: this.config.auth.clientId,
|
|
11505
11746
|
authority: discoveredAuthority,
|
|
11506
11747
|
clientCapabilities: this.config.auth.clientCapabilities,
|
|
11748
|
+
instanceAware: requestExtraQueryParameters?.instance_aware
|
|
11749
|
+
?.length
|
|
11750
|
+
? requestExtraQueryParameters.instance_aware === "true"
|
|
11751
|
+
: this.config.auth.instanceAware,
|
|
11507
11752
|
redirectUri: this.config.auth.redirectUri,
|
|
11508
11753
|
isMcp: this.config.auth.isMcp,
|
|
11509
11754
|
},
|
|
@@ -20691,8 +20936,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
20691
20936
|
}
|
|
20692
20937
|
}
|
|
20693
20938
|
catch (e) {
|
|
20694
|
-
this.logger.
|
|
20695
|
-
this.logger.error(`0tvdic ${e}`, correlationId);
|
|
20939
|
+
this.logger.error("023ixj", correlationId);
|
|
20696
20940
|
throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
|
|
20697
20941
|
}
|
|
20698
20942
|
return [parsedRequest, verifier];
|
|
@@ -21167,30 +21411,42 @@ function shouldUseEar(protocolMode, logger, performanceClient, correlationId, us
|
|
|
21167
21411
|
* page (see `runPopupRelay`) back to the embedded frame that opened it. See
|
|
21168
21412
|
* {@link BrowserAuthOptions.popupRelayUri}.
|
|
21169
21413
|
*
|
|
21170
|
-
*
|
|
21171
|
-
*
|
|
21172
|
-
* pulling in the other's dependencies.
|
|
21414
|
+
* Shared by the relay-page entry and client helpers without importing either
|
|
21415
|
+
* implementation into the other bundle.
|
|
21173
21416
|
*
|
|
21174
21417
|
* @internal
|
|
21175
21418
|
*/
|
|
21176
|
-
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
21419
|
+
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
21420
|
+
/** @internal Response bound to an authenticated v2 relay document. */
|
|
21421
|
+
const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
|
|
21422
|
+
/** @internal Ready signal for the authenticated popup-relay request handoff. */
|
|
21423
|
+
const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
|
|
21424
|
+
/** @internal Request delivered only to the same-origin relay window. */
|
|
21425
|
+
const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
|
|
21426
|
+
/** @internal Resolve the compatibility default without downgrading invalid versions. */
|
|
21427
|
+
function getPopupRelayProtocolVersion(version, correlationId = "") {
|
|
21428
|
+
if (version === undefined) {
|
|
21429
|
+
return 1;
|
|
21430
|
+
}
|
|
21431
|
+
if (version !== 1 && version !== 2) {
|
|
21432
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
|
|
21433
|
+
}
|
|
21434
|
+
return version;
|
|
21435
|
+
}
|
|
21177
21436
|
|
|
21178
21437
|
/*
|
|
21179
21438
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
21180
21439
|
* Licensed under the MIT License.
|
|
21181
21440
|
*/
|
|
21182
21441
|
/**
|
|
21183
|
-
* Builds the
|
|
21184
|
-
*
|
|
21185
|
-
*
|
|
21186
|
-
* library-state `id` so the relay page can listen on the right BroadcastChannel
|
|
21187
|
-
* and echo the id back. The relay URI is resolved against the app origin, so it
|
|
21188
|
-
* must be same-origin as the embedded frame. See `runPopupRelay`.
|
|
21442
|
+
* Builds the same-origin relay URL. V1 preserves the fragment descriptor;
|
|
21443
|
+
* explicitly selected v2 carries only the id and retains the navigation for
|
|
21444
|
+
* the authenticated handoff.
|
|
21189
21445
|
*
|
|
21190
21446
|
* @internal
|
|
21191
21447
|
*/
|
|
21192
|
-
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
21193
|
-
const
|
|
21448
|
+
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
|
|
21449
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
|
|
21194
21450
|
const target = new URL(popupRelayUri, window.location.origin);
|
|
21195
21451
|
/*
|
|
21196
21452
|
* The relay page must be same-origin as the embedded frame: the response is
|
|
@@ -21203,7 +21459,12 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
|
21203
21459
|
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
|
|
21204
21460
|
}
|
|
21205
21461
|
const hashParams = new URLSearchParams();
|
|
21206
|
-
|
|
21462
|
+
if (version === 1) {
|
|
21463
|
+
hashParams.set("req", JSON.stringify({ id, ...action }));
|
|
21464
|
+
}
|
|
21465
|
+
else {
|
|
21466
|
+
hashParams.set("id", id);
|
|
21467
|
+
}
|
|
21207
21468
|
target.hash = hashParams.toString();
|
|
21208
21469
|
return target.toString();
|
|
21209
21470
|
}
|
|
@@ -21214,21 +21475,30 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
|
21214
21475
|
* partitioning blocks the BroadcastChannel the redirect bridge uses from
|
|
21215
21476
|
* reaching the embedded frame.
|
|
21216
21477
|
*
|
|
21217
|
-
*
|
|
21218
|
-
*
|
|
21219
|
-
*
|
|
21478
|
+
* In v2, the retained navigation is sent once, after a ready signal from the popup
|
|
21479
|
+
* window we opened on our own origin with the matching library-state id.
|
|
21480
|
+
* Successful responses must also carry that handoff's relay-document nonce.
|
|
21481
|
+
* Setup failures can reject the request before the handoff completes.
|
|
21220
21482
|
*
|
|
21221
21483
|
* @internal
|
|
21222
21484
|
*/
|
|
21223
|
-
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
|
|
21485
|
+
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
|
|
21486
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
|
|
21487
|
+
if (version === 2 && !action) {
|
|
21488
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
|
|
21489
|
+
}
|
|
21224
21490
|
return new Promise((resolve, reject) => {
|
|
21225
21491
|
const correlationId = request.correlationId;
|
|
21226
21492
|
logger.verbose("1d05g9", correlationId);
|
|
21227
|
-
performanceClient.addFields({
|
|
21493
|
+
performanceClient.addFields({
|
|
21494
|
+
redirectBridgeTimeoutMs: timeoutMs,
|
|
21495
|
+
popupRelayProtocolVersion: version,
|
|
21496
|
+
}, correlationId);
|
|
21228
21497
|
const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
|
|
21229
21498
|
const expectedId = libraryState.id;
|
|
21230
21499
|
const expectedOrigin = window.location.origin;
|
|
21231
21500
|
let settled = false;
|
|
21501
|
+
let handoffNonce = "";
|
|
21232
21502
|
const cleanup = () => {
|
|
21233
21503
|
window.removeEventListener("message", onMessage);
|
|
21234
21504
|
clearTimeout(timeoutId);
|
|
@@ -21240,20 +21510,52 @@ async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow
|
|
|
21240
21510
|
return;
|
|
21241
21511
|
}
|
|
21242
21512
|
const data = event.data;
|
|
21243
|
-
if (!data ||
|
|
21244
|
-
data.type !== POPUP_RELAY_RESPONSE_TYPE ||
|
|
21245
|
-
data.id !== expectedId) {
|
|
21513
|
+
if (!data || data.id !== expectedId) {
|
|
21246
21514
|
return;
|
|
21247
21515
|
}
|
|
21248
21516
|
if (settled) {
|
|
21249
21517
|
return;
|
|
21250
21518
|
}
|
|
21519
|
+
if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
|
|
21520
|
+
if (handoffNonce ||
|
|
21521
|
+
typeof data.nonce !== "string" ||
|
|
21522
|
+
!data.nonce) {
|
|
21523
|
+
return;
|
|
21524
|
+
}
|
|
21525
|
+
handoffNonce = data.nonce;
|
|
21526
|
+
try {
|
|
21527
|
+
popupWindow.postMessage({
|
|
21528
|
+
type: POPUP_RELAY_REQUEST_TYPE,
|
|
21529
|
+
id: expectedId,
|
|
21530
|
+
nonce: handoffNonce,
|
|
21531
|
+
request: { id: expectedId, ...action },
|
|
21532
|
+
}, expectedOrigin);
|
|
21533
|
+
performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
|
|
21534
|
+
}
|
|
21535
|
+
catch {
|
|
21536
|
+
settled = true;
|
|
21537
|
+
cleanup();
|
|
21538
|
+
logger.error("0sx3jz", correlationId);
|
|
21539
|
+
reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
|
|
21540
|
+
}
|
|
21541
|
+
return;
|
|
21542
|
+
}
|
|
21543
|
+
const hasError = typeof data.error === "string" && data.error.length > 0;
|
|
21544
|
+
const responseType = version === 1
|
|
21545
|
+
? POPUP_RELAY_RESPONSE_TYPE
|
|
21546
|
+
: POPUP_RELAY_V2_RESPONSE_TYPE;
|
|
21547
|
+
if (data.type !== responseType ||
|
|
21548
|
+
(version === 2 &&
|
|
21549
|
+
((!handoffNonce && !hasError) ||
|
|
21550
|
+
(handoffNonce && data.nonce !== handoffNonce)))) {
|
|
21551
|
+
return;
|
|
21552
|
+
}
|
|
21251
21553
|
settled = true;
|
|
21252
21554
|
cleanup();
|
|
21253
|
-
if (
|
|
21254
|
-
reject(createBrowserAuthError(data.error, correlationId));
|
|
21555
|
+
if (hasError) {
|
|
21556
|
+
reject(createBrowserAuthError(data.error, correlationId, data.subError));
|
|
21255
21557
|
}
|
|
21256
|
-
else if (data.payload) {
|
|
21558
|
+
else if (typeof data.payload === "string" && data.payload) {
|
|
21257
21559
|
resolve(data.payload);
|
|
21258
21560
|
}
|
|
21259
21561
|
else {
|
|
@@ -22921,6 +23223,36 @@ function getAuthorizeFormAction(authority, request, parameters) {
|
|
|
22921
23223
|
addCorrelationId(queryParams, request.correlationId);
|
|
22922
23224
|
return getAuthorizeUrl(authority, queryParams);
|
|
22923
23225
|
}
|
|
23226
|
+
/**
|
|
23227
|
+
* Prepares the selected EAR construction.
|
|
23228
|
+
* @internal
|
|
23229
|
+
*/
|
|
23230
|
+
async function initializeEarRequest(config, request, logger, performanceClient) {
|
|
23231
|
+
if (!config.experimental.enableAsymmetricEar) {
|
|
23232
|
+
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
|
|
23233
|
+
return {
|
|
23234
|
+
...request,
|
|
23235
|
+
earJwk,
|
|
23236
|
+
asymmetricEar: undefined,
|
|
23237
|
+
};
|
|
23238
|
+
}
|
|
23239
|
+
try {
|
|
23240
|
+
const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
|
|
23241
|
+
const apv = generateAsymmetricEarApv(publicJwk);
|
|
23242
|
+
const earJwk = base64Encode(JSON.stringify(publicJwk));
|
|
23243
|
+
return {
|
|
23244
|
+
...request,
|
|
23245
|
+
earJwk,
|
|
23246
|
+
asymmetricEar: { privateJwk, apv },
|
|
23247
|
+
};
|
|
23248
|
+
}
|
|
23249
|
+
catch (error) {
|
|
23250
|
+
if (error instanceof AuthError) {
|
|
23251
|
+
throw error;
|
|
23252
|
+
}
|
|
23253
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
|
|
23254
|
+
}
|
|
23255
|
+
}
|
|
22924
23256
|
/**
|
|
22925
23257
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
22926
23258
|
*/
|
|
@@ -22930,7 +23262,18 @@ async function getEARFormData(config, authority, request, logger, performanceCli
|
|
|
22930
23262
|
}
|
|
22931
23263
|
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
22932
23264
|
addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
22933
|
-
|
|
23265
|
+
try {
|
|
23266
|
+
addEARParameters(parameters, request.earJwk, request.asymmetricEar
|
|
23267
|
+
? base64Encode(JSON.stringify({
|
|
23268
|
+
alg: "ECDH-ES",
|
|
23269
|
+
enc: "A256GCM",
|
|
23270
|
+
apv: request.asymmetricEar.apv,
|
|
23271
|
+
}))
|
|
23272
|
+
: undefined);
|
|
23273
|
+
}
|
|
23274
|
+
catch {
|
|
23275
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
|
|
23276
|
+
}
|
|
22934
23277
|
// Also add codeChallenge as backup in case EAR is not supported
|
|
22935
23278
|
addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
|
|
22936
23279
|
addExtraParameters(parameters, {
|
|
@@ -23014,12 +23357,14 @@ async function handleResponsePlatformBroker(request, accountId, apiId, config, b
|
|
|
23014
23357
|
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
23015
23358
|
const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
|
|
23016
23359
|
const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
|
|
23360
|
+
const brokerRequest = {
|
|
23361
|
+
...request,
|
|
23362
|
+
state: userRequestState,
|
|
23363
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
23364
|
+
};
|
|
23365
|
+
delete brokerRequest.asymmetricEar;
|
|
23017
23366
|
try {
|
|
23018
|
-
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(
|
|
23019
|
-
...request,
|
|
23020
|
-
state: userRequestState,
|
|
23021
|
-
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
23022
|
-
});
|
|
23367
|
+
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
|
|
23023
23368
|
}
|
|
23024
23369
|
catch (e) {
|
|
23025
23370
|
await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
|
|
@@ -23084,7 +23429,20 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
|
|
|
23084
23429
|
if (!request.earJwk) {
|
|
23085
23430
|
throw createBrowserAuthError(earJwkEmpty, request.correlationId);
|
|
23086
23431
|
}
|
|
23087
|
-
|
|
23432
|
+
let plaintext;
|
|
23433
|
+
if (request.asymmetricEar) {
|
|
23434
|
+
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 });
|
|
23435
|
+
}
|
|
23436
|
+
else {
|
|
23437
|
+
plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
|
|
23438
|
+
}
|
|
23439
|
+
let decryptedData;
|
|
23440
|
+
try {
|
|
23441
|
+
decryptedData = JSON.parse(plaintext);
|
|
23442
|
+
}
|
|
23443
|
+
catch {
|
|
23444
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
|
|
23445
|
+
}
|
|
23088
23446
|
if (decryptedData.accountId) {
|
|
23089
23447
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
23090
23448
|
}
|
|
@@ -23375,6 +23733,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
23375
23733
|
: "",
|
|
23376
23734
|
postLogoutRedirectUri: "",
|
|
23377
23735
|
popupRelayUri: "",
|
|
23736
|
+
popupRelayProtocolVersion: 1,
|
|
23378
23737
|
clientCapabilities: [],
|
|
23379
23738
|
OIDCOptions: {
|
|
23380
23739
|
responseMode: ResponseMode.FRAGMENT,
|
|
@@ -23441,6 +23800,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
23441
23800
|
client: new StubPerformanceClient(),
|
|
23442
23801
|
};
|
|
23443
23802
|
const DEFAULT_EXPERIMENTAL_OPTIONS = {
|
|
23803
|
+
enableAsymmetricEar: false,
|
|
23444
23804
|
iframeTimeoutTelemetry: false,
|
|
23445
23805
|
allowPlatformBrokerWithDOM: false,
|
|
23446
23806
|
};
|
|
@@ -23494,9 +23854,16 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
23494
23854
|
experimental: {
|
|
23495
23855
|
...DEFAULT_EXPERIMENTAL_OPTIONS,
|
|
23496
23856
|
...userInputExperimental,
|
|
23857
|
+
enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
|
|
23497
23858
|
},
|
|
23498
23859
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
|
|
23499
23860
|
};
|
|
23861
|
+
if (overlayedConfig.experimental.enableAsymmetricEar &&
|
|
23862
|
+
overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
|
|
23863
|
+
const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
23864
|
+
logger.warning("07xxx7", "");
|
|
23865
|
+
overlayedConfig.experimental.enableAsymmetricEar = false;
|
|
23866
|
+
}
|
|
23500
23867
|
return overlayedConfig;
|
|
23501
23868
|
}
|
|
23502
23869
|
|
|
@@ -24384,19 +24751,21 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24384
24751
|
/*
|
|
24385
24752
|
* When a popup-relay page is configured, open it top-level
|
|
24386
24753
|
* (same first-party origin) instead of navigating the popup
|
|
24387
|
-
* straight to the IdP
|
|
24754
|
+
* straight to the IdP. V1 carries the action in the hash; v2
|
|
24755
|
+
* retains it for the authenticated handoff.
|
|
24388
24756
|
* The relay page opens the IdP child popup and relays the
|
|
24389
24757
|
* response back via postMessage (see waitForPopupResponse).
|
|
24390
24758
|
*/
|
|
24391
24759
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
24760
|
+
popupParams.relayAction = { method: "GET", url: navigateUrl };
|
|
24392
24761
|
const popupNavigateUrl = popupRelayUri
|
|
24393
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId),
|
|
24762
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
24394
24763
|
: navigateUrl;
|
|
24395
24764
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
24396
24765
|
const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
|
|
24397
24766
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, InteractionType.Popup, { popupWindow }, null);
|
|
24398
24767
|
// Wait for the redirect bridge response
|
|
24399
|
-
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
|
|
24768
|
+
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24400
24769
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24401
24770
|
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);
|
|
24402
24771
|
}
|
|
@@ -24420,21 +24789,20 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24420
24789
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
24421
24790
|
// Get the frame handle for the silent request
|
|
24422
24791
|
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);
|
|
24423
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
24424
24792
|
const pkce = pkceCodes ||
|
|
24425
24793
|
(await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
|
|
24426
24794
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24427
|
-
|
|
24795
|
+
let popupRequest = {
|
|
24428
24796
|
...request,
|
|
24429
|
-
earJwk: earJwk,
|
|
24430
24797
|
codeChallenge: pkce.challenge,
|
|
24431
24798
|
...tokenBindingParams,
|
|
24432
24799
|
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
24433
24800
|
};
|
|
24434
24801
|
try {
|
|
24802
|
+
popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
|
|
24435
24803
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
24436
24804
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
24437
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
24805
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24438
24806
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24439
24807
|
if (!serverParams.ear_jwe && serverParams.code) {
|
|
24440
24808
|
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
|
|
@@ -24462,7 +24830,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24462
24830
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
|
|
24463
24831
|
const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
|
|
24464
24832
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
24465
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
|
|
24833
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24466
24834
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24467
24835
|
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);
|
|
24468
24836
|
}
|
|
@@ -24518,21 +24886,22 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24518
24886
|
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, InteractionType.Popup, validRequest);
|
|
24519
24887
|
/*
|
|
24520
24888
|
* When a popup-relay page is configured, open it top-level (same
|
|
24521
|
-
* first-party origin)
|
|
24522
|
-
*
|
|
24889
|
+
* first-party origin), using the configured wire protocol for the
|
|
24890
|
+
* end-session URL. The relay page opens the IdP child
|
|
24523
24891
|
* popup and the post-logout redirect page (running the redirect
|
|
24524
24892
|
* bridge) relays completion back via postMessage — so logout works
|
|
24525
24893
|
* from an embedded, cross-origin iframe where a direct popup to the
|
|
24526
24894
|
* IdP cannot. See runPopupRelay / waitForPopupResponse.
|
|
24527
24895
|
*/
|
|
24528
24896
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
24897
|
+
popupParams.relayAction = { method: "GET", url: logoutUri };
|
|
24529
24898
|
const popupNavigateUrl = popupRelayUri
|
|
24530
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId),
|
|
24899
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
24531
24900
|
: logoutUri;
|
|
24532
24901
|
// Open the popup window to requestUrl.
|
|
24533
24902
|
const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
|
|
24534
24903
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, InteractionType.Popup, { popupWindow }, null);
|
|
24535
|
-
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
|
|
24904
|
+
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
|
|
24536
24905
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
24537
24906
|
});
|
|
24538
24907
|
if (mainWindowRedirectUri) {
|
|
@@ -24744,11 +25113,12 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24744
25113
|
? getEARFormData
|
|
24745
25114
|
: getCodeFormData;
|
|
24746
25115
|
const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
|
|
24747
|
-
|
|
25116
|
+
popupParams.relayAction = {
|
|
24748
25117
|
method: "POST",
|
|
24749
25118
|
action: formData.action,
|
|
24750
25119
|
fields: formData.fields,
|
|
24751
|
-
}
|
|
25120
|
+
};
|
|
25121
|
+
const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
|
|
24752
25122
|
return this.initiateAuthRequest(relayUrl, popupParams);
|
|
24753
25123
|
}
|
|
24754
25124
|
const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
@@ -24757,7 +25127,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24757
25127
|
form.submit();
|
|
24758
25128
|
return popupWindow;
|
|
24759
25129
|
}
|
|
24760
|
-
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
25130
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
|
|
24761
25131
|
/*
|
|
24762
25132
|
* When a popup-relay page is configured the response is relayed back to
|
|
24763
25133
|
* this frame by the relay page via postMessage, and the relay popup's
|
|
@@ -24767,7 +25137,11 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24767
25137
|
* frame and which does not track the relay popup.
|
|
24768
25138
|
*/
|
|
24769
25139
|
if (this.config.auth.popupRelayUri) {
|
|
24770
|
-
|
|
25140
|
+
if (this.config.auth.popupRelayProtocolVersion === 2 &&
|
|
25141
|
+
!relayAction) {
|
|
25142
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
|
|
25143
|
+
}
|
|
25144
|
+
return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
|
|
24771
25145
|
}
|
|
24772
25146
|
if (this.waitForPopupResponseHook) {
|
|
24773
25147
|
return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
|
|
@@ -24892,16 +25266,15 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
24892
25266
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
24893
25267
|
// Get the frame handle for the silent request
|
|
24894
25268
|
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);
|
|
24895
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
24896
25269
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
24897
25270
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24898
|
-
|
|
25271
|
+
let redirectRequest = {
|
|
24899
25272
|
...request,
|
|
24900
|
-
earJwk: earJwk,
|
|
24901
25273
|
codeChallenge: pkceCodes.challenge,
|
|
24902
25274
|
...tokenBindingParams,
|
|
24903
25275
|
};
|
|
24904
25276
|
try {
|
|
25277
|
+
redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
|
|
24905
25278
|
if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
|
|
24906
25279
|
throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
|
|
24907
25280
|
}
|
|
@@ -24914,9 +25287,10 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
24914
25287
|
}, this.config.system.redirectNavigationTimeout);
|
|
24915
25288
|
});
|
|
24916
25289
|
}
|
|
24917
|
-
catch (
|
|
25290
|
+
catch (error) {
|
|
25291
|
+
this.browserStorage.resetRequestCache(correlationId);
|
|
24918
25292
|
await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24919
|
-
throw
|
|
25293
|
+
throw error;
|
|
24920
25294
|
}
|
|
24921
25295
|
}
|
|
24922
25296
|
/**
|
|
@@ -25095,13 +25469,16 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
25095
25469
|
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);
|
|
25096
25470
|
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);
|
|
25097
25471
|
}
|
|
25098
|
-
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
|
|
25472
|
+
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
|
|
25473
|
+
serverTelemetryManager,
|
|
25474
|
+
requestAuthority: request.authority,
|
|
25475
|
+
requestExtraQueryParameters: request.extraQueryParameters,
|
|
25476
|
+
});
|
|
25099
25477
|
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);
|
|
25100
25478
|
}
|
|
25101
25479
|
/**
|
|
25102
25480
|
* Redirects window to given URL.
|
|
25103
25481
|
* @param urlNavigate
|
|
25104
|
-
* @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
|
|
25105
25482
|
*/
|
|
25106
25483
|
async initiateAuthRequest(requestUrl) {
|
|
25107
25484
|
this.logger.verbose("0yaw2e", this.correlationId);
|
|
@@ -25389,13 +25766,11 @@ class SilentIframeClient extends StandardInteractionClient {
|
|
|
25389
25766
|
async executeEarFlow(request) {
|
|
25390
25767
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
25391
25768
|
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);
|
|
25392
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
25393
25769
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
25394
|
-
const silentRequest = {
|
|
25770
|
+
const silentRequest = await initializeEarRequest(this.config, {
|
|
25395
25771
|
...request,
|
|
25396
|
-
earJwk: earJwk,
|
|
25397
25772
|
codeChallenge: pkceCodes.challenge,
|
|
25398
|
-
};
|
|
25773
|
+
}, this.logger, this.performanceClient);
|
|
25399
25774
|
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
25400
25775
|
const iframe = createHiddenIframe();
|
|
25401
25776
|
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
@@ -25745,6 +26120,7 @@ function prepareWebSilentRequest({ request, account, correlationId, config, }) {
|
|
|
25745
26120
|
return {
|
|
25746
26121
|
key: JSON.stringify({
|
|
25747
26122
|
...thumbprint,
|
|
26123
|
+
accountTenantId: account.tenantId,
|
|
25748
26124
|
forceRefresh: !!request.forceRefresh,
|
|
25749
26125
|
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
25750
26126
|
extraParameters: canonicalizeStringDict(request.extraParameters),
|