@azure/msal-browser 5.29.1 → 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 +8 -10
- 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 +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 +449 -133
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +449 -133
- 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 +453 -135
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +453 -135
- 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 +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/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 +10 -13
- package/src/interaction_client/SilentIframeClient.ts +9 -13
- 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/packageMetadata.d.ts +1 -1
- package/types/popup_relay/constants.d.ts +10 -3
- package/types/popup_relay/constants.d.ts.map +1 -1
- package/types/popup_relay/index.d.ts +27 -11
- package/types/popup_relay/index.d.ts.map +1 -1
- package/types/popup_relay/relayClient.d.ts +9 -11
- package/types/popup_relay/relayClient.d.ts.map +1 -1
- package/types/protocol/Authorize.d.ts +5 -0
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/PopupRequest.d.ts +1 -1
- package/types/request/PopupRequest.d.ts.map +1 -1
- package/types/request/RedirectRequest.d.ts +1 -1
- package/types/request/RedirectRequest.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/request/SsoSilentRequest.d.ts +1 -1
- package/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +7 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.30.0 2026-11-18 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v16.
|
|
9
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
*/
|
|
67
67
|
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
68
68
|
|
|
69
|
-
/*! @azure/msal-common v16.
|
|
69
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
70
70
|
/*
|
|
71
71
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
72
72
|
* Licensed under the MIT License.
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
// Token renewal offset default in seconds
|
|
306
306
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
307
307
|
|
|
308
|
-
/*! @azure/msal-common v16.
|
|
308
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
309
309
|
/*
|
|
310
310
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
311
311
|
* Licensed under the MIT License.
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
/*! @azure/msal-common v16.
|
|
337
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
338
338
|
|
|
339
339
|
/*
|
|
340
340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
/*! @azure/msal-common v16.
|
|
360
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
361
361
|
/*
|
|
362
362
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
363
363
|
* Licensed under the MIT License.
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
userCanceled: userCanceled
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
/*! @azure/msal-common v16.
|
|
446
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
447
447
|
|
|
448
448
|
/*
|
|
449
449
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
/*! @azure/msal-common v16.
|
|
484
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
485
485
|
|
|
486
486
|
/*
|
|
487
487
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
return matches[2];
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
/*! @azure/msal-common v16.
|
|
550
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
551
551
|
|
|
552
552
|
/*
|
|
553
553
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
return updatedAccountInfo;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
/*! @azure/msal-common v16.
|
|
638
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
639
639
|
/*
|
|
640
640
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
641
641
|
* Licensed under the MIT License.
|
|
@@ -649,7 +649,7 @@
|
|
|
649
649
|
Ciam: 3,
|
|
650
650
|
};
|
|
651
651
|
|
|
652
|
-
/*! @azure/msal-common v16.
|
|
652
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
653
653
|
/*
|
|
654
654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
655
655
|
* Licensed under the MIT License.
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
return null;
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
-
/*! @azure/msal-common v16.
|
|
674
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
675
675
|
/*
|
|
676
676
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
677
677
|
* Licensed under the MIT License.
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
EAR: "EAR",
|
|
696
696
|
};
|
|
697
697
|
|
|
698
|
-
/*! @azure/msal-common v16.
|
|
698
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
699
699
|
/**
|
|
700
700
|
* Returns the AccountInfo interface for this account.
|
|
701
701
|
* @internal
|
|
@@ -884,7 +884,7 @@
|
|
|
884
884
|
entity.hasOwnProperty("authorityType"));
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
-
/*! @azure/msal-common v16.
|
|
887
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
888
888
|
/*
|
|
889
889
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
890
890
|
* Licensed under the MIT License.
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
unexpectedError: unexpectedError
|
|
902
902
|
});
|
|
903
903
|
|
|
904
|
-
/*! @azure/msal-common v16.
|
|
904
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
905
905
|
|
|
906
906
|
/*
|
|
907
907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -921,7 +921,7 @@
|
|
|
921
921
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
-
/*! @azure/msal-common v16.
|
|
924
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
925
925
|
/*
|
|
926
926
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
927
927
|
* Licensed under the MIT License.
|
|
@@ -961,7 +961,7 @@
|
|
|
961
961
|
return headerName === undefined ? undefined : headers[headerName];
|
|
962
962
|
}
|
|
963
963
|
|
|
964
|
-
/*! @azure/msal-common v16.
|
|
964
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
965
965
|
/*
|
|
966
966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
967
967
|
* Licensed under the MIT License.
|
|
@@ -1031,7 +1031,7 @@
|
|
|
1031
1031
|
urlParseError: urlParseError
|
|
1032
1032
|
});
|
|
1033
1033
|
|
|
1034
|
-
/*! @azure/msal-common v16.
|
|
1034
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1035
1035
|
|
|
1036
1036
|
/*
|
|
1037
1037
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1090,7 +1090,7 @@
|
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
|
-
/*! @azure/msal-common v16.
|
|
1093
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1094
1094
|
/*
|
|
1095
1095
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1096
1096
|
* Licensed under the MIT License.
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
response.hasOwnProperty("jwks_uri"));
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
|
-
/*! @azure/msal-common v16.
|
|
1105
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1106
1106
|
/*
|
|
1107
1107
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1108
1108
|
* Licensed under the MIT License.
|
|
@@ -1182,7 +1182,7 @@
|
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
1184
|
|
|
1185
|
-
/*! @azure/msal-common v16.
|
|
1185
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1186
1186
|
|
|
1187
1187
|
/*
|
|
1188
1188
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1369,7 +1369,7 @@
|
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
1371
|
|
|
1372
|
-
/*! @azure/msal-common v16.
|
|
1372
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1373
1373
|
|
|
1374
1374
|
/*
|
|
1375
1375
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1523,7 +1523,7 @@
|
|
|
1523
1523
|
return null;
|
|
1524
1524
|
}
|
|
1525
1525
|
|
|
1526
|
-
/*! @azure/msal-common v16.
|
|
1526
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1527
1527
|
/*
|
|
1528
1528
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1529
1529
|
* Licensed under the MIT License.
|
|
@@ -1541,7 +1541,7 @@
|
|
|
1541
1541
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1542
1542
|
};
|
|
1543
1543
|
|
|
1544
|
-
/*! @azure/msal-common v16.
|
|
1544
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1545
1545
|
/*
|
|
1546
1546
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1547
1547
|
* Licensed under the MIT License.
|
|
@@ -1551,7 +1551,7 @@
|
|
|
1551
1551
|
response.hasOwnProperty("metadata"));
|
|
1552
1552
|
}
|
|
1553
1553
|
|
|
1554
|
-
/*! @azure/msal-common v16.
|
|
1554
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1555
1555
|
/*
|
|
1556
1556
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1557
1557
|
* Licensed under the MIT License.
|
|
@@ -1561,7 +1561,7 @@
|
|
|
1561
1561
|
response.hasOwnProperty("error_description"));
|
|
1562
1562
|
}
|
|
1563
1563
|
|
|
1564
|
-
/*! @azure/msal-common v16.
|
|
1564
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1565
1565
|
/*
|
|
1566
1566
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1567
1567
|
* Licensed under the MIT License.
|
|
@@ -1632,7 +1632,7 @@
|
|
|
1632
1632
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1633
1633
|
const SetUserData = "setUserData";
|
|
1634
1634
|
|
|
1635
|
-
/*! @azure/msal-common v16.
|
|
1635
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1636
1636
|
/*
|
|
1637
1637
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1638
1638
|
* Licensed under the MIT License.
|
|
@@ -1726,7 +1726,7 @@
|
|
|
1726
1726
|
};
|
|
1727
1727
|
};
|
|
1728
1728
|
|
|
1729
|
-
/*! @azure/msal-common v16.
|
|
1729
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1730
1730
|
|
|
1731
1731
|
/*
|
|
1732
1732
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1855,7 +1855,7 @@
|
|
|
1855
1855
|
},
|
|
1856
1856
|
};
|
|
1857
1857
|
|
|
1858
|
-
/*! @azure/msal-common v16.
|
|
1858
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1859
1859
|
/*
|
|
1860
1860
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1861
1861
|
* Licensed under the MIT License.
|
|
@@ -1920,7 +1920,7 @@
|
|
|
1920
1920
|
return cachedAtSec > nowSeconds();
|
|
1921
1921
|
}
|
|
1922
1922
|
|
|
1923
|
-
/*! @azure/msal-common v16.
|
|
1923
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1924
1924
|
|
|
1925
1925
|
/*
|
|
1926
1926
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2207,7 +2207,7 @@
|
|
|
2207
2207
|
return [...attributeTokens].sort().join(" ");
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
|
-
/*! @azure/msal-common v16.
|
|
2210
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
2211
2211
|
|
|
2212
2212
|
/*
|
|
2213
2213
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3178,7 +3178,7 @@
|
|
|
3178
3178
|
};
|
|
3179
3179
|
}
|
|
3180
3180
|
|
|
3181
|
-
/*! @azure/msal-common v16.
|
|
3181
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3182
3182
|
|
|
3183
3183
|
/*
|
|
3184
3184
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3212,7 +3212,7 @@
|
|
|
3212
3212
|
}
|
|
3213
3213
|
}
|
|
3214
3214
|
|
|
3215
|
-
/*! @azure/msal-common v16.
|
|
3215
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3216
3216
|
|
|
3217
3217
|
/*
|
|
3218
3218
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3408,7 +3408,7 @@
|
|
|
3408
3408
|
}
|
|
3409
3409
|
}
|
|
3410
3410
|
|
|
3411
|
-
/*! @azure/msal-common v16.
|
|
3411
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3412
3412
|
|
|
3413
3413
|
/*
|
|
3414
3414
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3876,12 +3876,13 @@
|
|
|
3876
3876
|
* Add EAR (Encrypted Authorize Response) request parameters
|
|
3877
3877
|
* @param parameters
|
|
3878
3878
|
* @param jwk
|
|
3879
|
+
* @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
|
|
3879
3880
|
*/
|
|
3880
|
-
function addEARParameters(parameters, jwk) {
|
|
3881
|
+
function addEARParameters(parameters, jwk, jweCrypto) {
|
|
3881
3882
|
parameters.set(EAR_JWK, encodeURIComponent(jwk));
|
|
3882
|
-
//
|
|
3883
|
+
// Default symmetric EAR metadata; asymmetric requests supply their APV.
|
|
3883
3884
|
const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
|
|
3884
|
-
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
3885
|
+
parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
|
|
3885
3886
|
}
|
|
3886
3887
|
function addResource(parameters, resource) {
|
|
3887
3888
|
if (resource) {
|
|
@@ -3908,7 +3909,7 @@
|
|
|
3908
3909
|
}
|
|
3909
3910
|
}
|
|
3910
3911
|
|
|
3911
|
-
/*! @azure/msal-common v16.
|
|
3912
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3912
3913
|
|
|
3913
3914
|
/*
|
|
3914
3915
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4039,7 +4040,7 @@
|
|
|
4039
4040
|
}
|
|
4040
4041
|
}
|
|
4041
4042
|
|
|
4042
|
-
/*! @azure/msal-common v16.
|
|
4043
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4043
4044
|
|
|
4044
4045
|
/*
|
|
4045
4046
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4087,7 +4088,7 @@
|
|
|
4087
4088
|
},
|
|
4088
4089
|
};
|
|
4089
4090
|
|
|
4090
|
-
/*! @azure/msal-common v16.
|
|
4091
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4091
4092
|
|
|
4092
4093
|
/*
|
|
4093
4094
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4110,7 +4111,7 @@
|
|
|
4110
4111
|
},
|
|
4111
4112
|
};
|
|
4112
4113
|
|
|
4113
|
-
/*! @azure/msal-common v16.
|
|
4114
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4114
4115
|
/*
|
|
4115
4116
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4116
4117
|
* Licensed under the MIT License.
|
|
@@ -4399,12 +4400,12 @@
|
|
|
4399
4400
|
}
|
|
4400
4401
|
}
|
|
4401
4402
|
|
|
4402
|
-
/*! @azure/msal-common v16.
|
|
4403
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4403
4404
|
/* eslint-disable header/header */
|
|
4404
4405
|
const name$1 = "@azure/msal-common";
|
|
4405
|
-
const version$1 = "16.
|
|
4406
|
+
const version$1 = "16.17.0";
|
|
4406
4407
|
|
|
4407
|
-
/*! @azure/msal-common v16.
|
|
4408
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4408
4409
|
/*
|
|
4409
4410
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4410
4411
|
* Licensed under the MIT License.
|
|
@@ -4412,7 +4413,7 @@
|
|
|
4412
4413
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4413
4414
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4414
4415
|
|
|
4415
|
-
/*! @azure/msal-common v16.
|
|
4416
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4416
4417
|
|
|
4417
4418
|
/*
|
|
4418
4419
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4450,7 +4451,7 @@
|
|
|
4450
4451
|
}
|
|
4451
4452
|
}
|
|
4452
4453
|
|
|
4453
|
-
/*! @azure/msal-common v16.
|
|
4454
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4454
4455
|
|
|
4455
4456
|
/*
|
|
4456
4457
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5678,7 +5679,7 @@
|
|
|
5678
5679
|
}
|
|
5679
5680
|
}
|
|
5680
5681
|
|
|
5681
|
-
/*! @azure/msal-common v16.
|
|
5682
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5682
5683
|
/*
|
|
5683
5684
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5684
5685
|
* Licensed under the MIT License.
|
|
@@ -5740,10 +5741,11 @@
|
|
|
5740
5741
|
"networkRtt",
|
|
5741
5742
|
"redirectBridgeTimeoutMs",
|
|
5742
5743
|
"redirectBridgeMessageVersion",
|
|
5744
|
+
"popupRelayProtocolVersion",
|
|
5743
5745
|
"fetchRetryCount",
|
|
5744
5746
|
]);
|
|
5745
5747
|
|
|
5746
|
-
/*! @azure/msal-common v16.
|
|
5748
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5747
5749
|
|
|
5748
5750
|
/*
|
|
5749
5751
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5801,7 +5803,7 @@
|
|
|
5801
5803
|
}
|
|
5802
5804
|
}
|
|
5803
5805
|
|
|
5804
|
-
/*! @azure/msal-common v16.
|
|
5806
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5805
5807
|
|
|
5806
5808
|
/*
|
|
5807
5809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5899,7 +5901,7 @@
|
|
|
5899
5901
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5900
5902
|
}
|
|
5901
5903
|
|
|
5902
|
-
/*! @azure/msal-common v16.
|
|
5904
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5903
5905
|
/*
|
|
5904
5906
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5905
5907
|
* Licensed under the MIT License.
|
|
@@ -5926,7 +5928,7 @@
|
|
|
5926
5928
|
}
|
|
5927
5929
|
}
|
|
5928
5930
|
|
|
5929
|
-
/*! @azure/msal-common v16.
|
|
5931
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5930
5932
|
|
|
5931
5933
|
/*
|
|
5932
5934
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5947,7 +5949,7 @@
|
|
|
5947
5949
|
return new JoseHeaderError(code, correlationId);
|
|
5948
5950
|
}
|
|
5949
5951
|
|
|
5950
|
-
/*! @azure/msal-common v16.
|
|
5952
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5951
5953
|
/*
|
|
5952
5954
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5953
5955
|
* Licensed under the MIT License.
|
|
@@ -5972,7 +5974,7 @@
|
|
|
5972
5974
|
return Object.getPrototypeOf(value) === proto;
|
|
5973
5975
|
}
|
|
5974
5976
|
|
|
5975
|
-
/*! @azure/msal-common v16.
|
|
5977
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5976
5978
|
/*
|
|
5977
5979
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5978
5980
|
* Licensed under the MIT License.
|
|
@@ -5982,7 +5984,7 @@
|
|
|
5982
5984
|
const missingJwkError = "missing_jwk_error";
|
|
5983
5985
|
const invalidJwkError = "invalid_jwk_error";
|
|
5984
5986
|
|
|
5985
|
-
/*! @azure/msal-common v16.
|
|
5987
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5986
5988
|
|
|
5987
5989
|
/*
|
|
5988
5990
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6048,7 +6050,7 @@
|
|
|
6048
6050
|
}
|
|
6049
6051
|
}
|
|
6050
6052
|
|
|
6051
|
-
/*! @azure/msal-common v16.
|
|
6053
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6052
6054
|
|
|
6053
6055
|
/*
|
|
6054
6056
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6149,7 +6151,7 @@
|
|
|
6149
6151
|
}
|
|
6150
6152
|
}
|
|
6151
6153
|
|
|
6152
|
-
/*! @azure/msal-common v16.
|
|
6154
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6153
6155
|
|
|
6154
6156
|
/*
|
|
6155
6157
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6304,7 +6306,7 @@
|
|
|
6304
6306
|
}
|
|
6305
6307
|
}
|
|
6306
6308
|
|
|
6307
|
-
/*! @azure/msal-common v16.
|
|
6309
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6308
6310
|
/*
|
|
6309
6311
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6310
6312
|
* Licensed under the MIT License.
|
|
@@ -6368,7 +6370,7 @@
|
|
|
6368
6370
|
uiNotAllowed: uiNotAllowed
|
|
6369
6371
|
});
|
|
6370
6372
|
|
|
6371
|
-
/*! @azure/msal-common v16.
|
|
6373
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6372
6374
|
|
|
6373
6375
|
/*
|
|
6374
6376
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6435,7 +6437,7 @@
|
|
|
6435
6437
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6436
6438
|
}
|
|
6437
6439
|
|
|
6438
|
-
/*! @azure/msal-common v16.
|
|
6440
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6439
6441
|
|
|
6440
6442
|
/*
|
|
6441
6443
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6454,7 +6456,7 @@
|
|
|
6454
6456
|
}
|
|
6455
6457
|
}
|
|
6456
6458
|
|
|
6457
|
-
/*! @azure/msal-common v16.
|
|
6459
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6458
6460
|
|
|
6459
6461
|
/*
|
|
6460
6462
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6525,7 +6527,7 @@
|
|
|
6525
6527
|
}
|
|
6526
6528
|
}
|
|
6527
6529
|
|
|
6528
|
-
/*! @azure/msal-common v16.
|
|
6530
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6529
6531
|
|
|
6530
6532
|
/*
|
|
6531
6533
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6953,7 +6955,7 @@
|
|
|
6953
6955
|
return baseAccount;
|
|
6954
6956
|
}
|
|
6955
6957
|
|
|
6956
|
-
/*! @azure/msal-common v16.
|
|
6958
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6957
6959
|
/*
|
|
6958
6960
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6959
6961
|
* Licensed under the MIT License.
|
|
@@ -6963,7 +6965,7 @@
|
|
|
6963
6965
|
UPN: "UPN",
|
|
6964
6966
|
};
|
|
6965
6967
|
|
|
6966
|
-
/*! @azure/msal-common v16.
|
|
6968
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6967
6969
|
/*
|
|
6968
6970
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6969
6971
|
* Licensed under the MIT License.
|
|
@@ -6982,7 +6984,7 @@
|
|
|
6982
6984
|
}
|
|
6983
6985
|
}
|
|
6984
6986
|
|
|
6985
|
-
/*! @azure/msal-common v16.
|
|
6987
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6986
6988
|
|
|
6987
6989
|
/*
|
|
6988
6990
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7006,7 +7008,7 @@
|
|
|
7006
7008
|
};
|
|
7007
7009
|
}
|
|
7008
7010
|
|
|
7009
|
-
/*! @azure/msal-common v16.
|
|
7011
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7010
7012
|
|
|
7011
7013
|
/*
|
|
7012
7014
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7096,7 +7098,7 @@
|
|
|
7096
7098
|
return undefined;
|
|
7097
7099
|
}
|
|
7098
7100
|
|
|
7099
|
-
/*! @azure/msal-common v16.
|
|
7101
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7100
7102
|
|
|
7101
7103
|
/*
|
|
7102
7104
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7127,7 +7129,7 @@
|
|
|
7127
7129
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
7128
7130
|
}
|
|
7129
7131
|
|
|
7130
|
-
/*! @azure/msal-common v16.
|
|
7132
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7131
7133
|
|
|
7132
7134
|
/*
|
|
7133
7135
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7261,7 +7263,7 @@
|
|
|
7261
7263
|
return response;
|
|
7262
7264
|
}
|
|
7263
7265
|
|
|
7264
|
-
/*! @azure/msal-common v16.
|
|
7266
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7265
7267
|
|
|
7266
7268
|
/*
|
|
7267
7269
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7529,7 +7531,7 @@
|
|
|
7529
7531
|
}
|
|
7530
7532
|
}
|
|
7531
7533
|
|
|
7532
|
-
/*! @azure/msal-common v16.
|
|
7534
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7533
7535
|
|
|
7534
7536
|
/*
|
|
7535
7537
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7759,7 +7761,7 @@
|
|
|
7759
7761
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7760
7762
|
}
|
|
7761
7763
|
|
|
7762
|
-
/*! @azure/msal-common v16.
|
|
7764
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7763
7765
|
|
|
7764
7766
|
/*
|
|
7765
7767
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8308,7 +8310,7 @@
|
|
|
8308
8310
|
}
|
|
8309
8311
|
}
|
|
8310
8312
|
|
|
8311
|
-
/*! @azure/msal-common v16.
|
|
8313
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8312
8314
|
|
|
8313
8315
|
/*
|
|
8314
8316
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8543,7 +8545,7 @@
|
|
|
8543
8545
|
}
|
|
8544
8546
|
}
|
|
8545
8547
|
|
|
8546
|
-
/*! @azure/msal-common v16.
|
|
8548
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8547
8549
|
|
|
8548
8550
|
/*
|
|
8549
8551
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8836,7 +8838,7 @@
|
|
|
8836
8838
|
clearNativeBrokerErrorCode() { }
|
|
8837
8839
|
}
|
|
8838
8840
|
|
|
8839
|
-
/*! @azure/msal-common v16.
|
|
8841
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8840
8842
|
|
|
8841
8843
|
/*
|
|
8842
8844
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8963,7 +8965,7 @@
|
|
|
8963
8965
|
}
|
|
8964
8966
|
}
|
|
8965
8967
|
|
|
8966
|
-
/*! @azure/msal-common v16.
|
|
8968
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8967
8969
|
|
|
8968
8970
|
/*
|
|
8969
8971
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8979,7 +8981,7 @@
|
|
|
8979
8981
|
},
|
|
8980
8982
|
};
|
|
8981
8983
|
|
|
8982
|
-
/*! @azure/msal-common v16.
|
|
8984
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8983
8985
|
|
|
8984
8986
|
/*
|
|
8985
8987
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9146,6 +9148,13 @@
|
|
|
9146
9148
|
const Encrypt = "encrypt";
|
|
9147
9149
|
const Decrypt = "decrypt";
|
|
9148
9150
|
const GenerateEarKey = "generateEarKey";
|
|
9151
|
+
const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
|
|
9152
|
+
const ImportAsymmetricEarKey = "importAsymmetricEarKey";
|
|
9153
|
+
const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
|
|
9154
|
+
const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
|
|
9155
|
+
const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
|
|
9156
|
+
const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
|
|
9157
|
+
const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
|
|
9149
9158
|
const DecryptEarResponse = "decryptEarResponse";
|
|
9150
9159
|
const LoadAccount = "loadAccount";
|
|
9151
9160
|
const LoadIdToken = "loadIdToken";
|
|
@@ -9216,11 +9225,13 @@
|
|
|
9216
9225
|
const failedToBuildHeaders = "failed_to_build_headers";
|
|
9217
9226
|
const failedToParseHeaders = "failed_to_parse_headers";
|
|
9218
9227
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
9228
|
+
const asymmetricEarKeyError = "asymmetric_ear_key_error";
|
|
9219
9229
|
const timedOut = "timed_out";
|
|
9220
9230
|
const emptyResponse = "empty_response";
|
|
9221
9231
|
|
|
9222
9232
|
var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
9223
9233
|
__proto__: null,
|
|
9234
|
+
asymmetricEarKeyError: asymmetricEarKeyError,
|
|
9224
9235
|
authCodeOrNativeAccountIdRequired: authCodeOrNativeAccountIdRequired,
|
|
9225
9236
|
authCodeRequired: authCodeRequired,
|
|
9226
9237
|
authRequestNotSetError: authRequestNotSetError,
|
|
@@ -9616,6 +9627,10 @@
|
|
|
9616
9627
|
const S256_HASH_ALG = "SHA-256";
|
|
9617
9628
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
9618
9629
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
9630
|
+
const ECDH_P384_ALGORITHM = {
|
|
9631
|
+
name: "ECDH",
|
|
9632
|
+
namedCurve: "P-384",
|
|
9633
|
+
};
|
|
9619
9634
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
9620
9635
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
9621
9636
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -9753,6 +9768,16 @@
|
|
|
9753
9768
|
async function exportJwk(key) {
|
|
9754
9769
|
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
9755
9770
|
}
|
|
9771
|
+
/**
|
|
9772
|
+
* Imports key as Json Web Key (JWK), can set extractable and usages.
|
|
9773
|
+
* @param key
|
|
9774
|
+
* @param extractable
|
|
9775
|
+
* @param usages
|
|
9776
|
+
* @param algorithm
|
|
9777
|
+
*/
|
|
9778
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9779
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9780
|
+
}
|
|
9756
9781
|
/**
|
|
9757
9782
|
* Signs given data with given key.
|
|
9758
9783
|
* @param key
|
|
@@ -9775,6 +9800,172 @@
|
|
|
9775
9800
|
};
|
|
9776
9801
|
return base64Encode(JSON.stringify(jwk));
|
|
9777
9802
|
}
|
|
9803
|
+
/**
|
|
9804
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
9805
|
+
* @internal
|
|
9806
|
+
*/
|
|
9807
|
+
async function generateAsymmetricEarKey() {
|
|
9808
|
+
const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9809
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
9810
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
9811
|
+
return {
|
|
9812
|
+
privateJwk,
|
|
9813
|
+
publicJwk,
|
|
9814
|
+
};
|
|
9815
|
+
}
|
|
9816
|
+
/**
|
|
9817
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
9818
|
+
* @internal
|
|
9819
|
+
*/
|
|
9820
|
+
async function importAsymmetricEarKey(privateJwk, correlationId = "") {
|
|
9821
|
+
if (privateJwk?.kty !== "EC" ||
|
|
9822
|
+
privateJwk.crv !== "P-384" ||
|
|
9823
|
+
!privateJwk.d) {
|
|
9824
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
|
|
9825
|
+
}
|
|
9826
|
+
try {
|
|
9827
|
+
return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9828
|
+
}
|
|
9829
|
+
catch {
|
|
9830
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
|
|
9831
|
+
}
|
|
9832
|
+
}
|
|
9833
|
+
/**
|
|
9834
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
9835
|
+
* @internal
|
|
9836
|
+
*/
|
|
9837
|
+
function generateAsymmetricEarApv(publicJwk) {
|
|
9838
|
+
const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
|
|
9839
|
+
if (point.length !== 97) {
|
|
9840
|
+
throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
|
|
9841
|
+
}
|
|
9842
|
+
const nonce = new Uint8Array(24);
|
|
9843
|
+
window.crypto.getRandomValues(nonce);
|
|
9844
|
+
return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
|
|
9845
|
+
}
|
|
9846
|
+
/**
|
|
9847
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
9848
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
9849
|
+
* @internal
|
|
9850
|
+
*/
|
|
9851
|
+
async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
|
|
9852
|
+
const correlationId = telemetry?.correlationId || "";
|
|
9853
|
+
const measure = (eventName, operation) => telemetry
|
|
9854
|
+
? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
|
|
9855
|
+
: operation();
|
|
9856
|
+
if (apv !== requestApv) {
|
|
9857
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
|
|
9858
|
+
}
|
|
9859
|
+
const parts = earJwe.split(".");
|
|
9860
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
9861
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9862
|
+
}
|
|
9863
|
+
let header;
|
|
9864
|
+
try {
|
|
9865
|
+
header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
|
|
9866
|
+
}
|
|
9867
|
+
catch {
|
|
9868
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9869
|
+
}
|
|
9870
|
+
if (!header ||
|
|
9871
|
+
header.alg !== "ECDH-ES" ||
|
|
9872
|
+
header.enc !== "A256GCM" ||
|
|
9873
|
+
header.crit !== undefined ||
|
|
9874
|
+
header.zip !== undefined ||
|
|
9875
|
+
header.epk?.kty !== "EC" ||
|
|
9876
|
+
header.epk.crv !== "P-384" ||
|
|
9877
|
+
header.epk.d !== undefined ||
|
|
9878
|
+
(header.apv !== undefined && header.apv !== apv)) {
|
|
9879
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9880
|
+
}
|
|
9881
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
9882
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
9883
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
9884
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
9885
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
9886
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
9887
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
9888
|
+
if (x.length !== 48 ||
|
|
9889
|
+
y.length !== 48 ||
|
|
9890
|
+
iv.length !== 12 ||
|
|
9891
|
+
tag.length !== 16) {
|
|
9892
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9893
|
+
}
|
|
9894
|
+
let key;
|
|
9895
|
+
try {
|
|
9896
|
+
const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
|
|
9897
|
+
const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
|
|
9898
|
+
kty: "EC",
|
|
9899
|
+
crv: "P-384",
|
|
9900
|
+
x: header.epk.x,
|
|
9901
|
+
y: header.epk.y,
|
|
9902
|
+
}, false, [], ECDH_P384_ALGORITHM));
|
|
9903
|
+
const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
|
|
9904
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
9905
|
+
const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
|
|
9906
|
+
let derivedKey;
|
|
9907
|
+
try {
|
|
9908
|
+
derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
|
|
9909
|
+
}
|
|
9910
|
+
finally {
|
|
9911
|
+
secret.fill(0);
|
|
9912
|
+
input.fill(0);
|
|
9913
|
+
}
|
|
9914
|
+
try {
|
|
9915
|
+
key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
|
|
9916
|
+
}
|
|
9917
|
+
finally {
|
|
9918
|
+
new Uint8Array(derivedKey).fill(0);
|
|
9919
|
+
}
|
|
9920
|
+
}
|
|
9921
|
+
catch (error) {
|
|
9922
|
+
if (error instanceof AuthError) {
|
|
9923
|
+
throw error;
|
|
9924
|
+
}
|
|
9925
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
|
|
9926
|
+
}
|
|
9927
|
+
try {
|
|
9928
|
+
const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
|
|
9929
|
+
name: AES_GCM,
|
|
9930
|
+
iv,
|
|
9931
|
+
tagLength: 128,
|
|
9932
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
9933
|
+
}, key, concatEarBytes(ciphertext, tag)));
|
|
9934
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
9935
|
+
}
|
|
9936
|
+
catch {
|
|
9937
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
|
|
9938
|
+
}
|
|
9939
|
+
}
|
|
9940
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
9941
|
+
function decodeEarBase64Url(value, correlationId = "") {
|
|
9942
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
9943
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
9944
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9945
|
+
}
|
|
9946
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
9947
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
9948
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9949
|
+
}
|
|
9950
|
+
return bytes;
|
|
9951
|
+
}
|
|
9952
|
+
function earUint32(value) {
|
|
9953
|
+
const bytes = new Uint8Array(4);
|
|
9954
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
9955
|
+
return bytes;
|
|
9956
|
+
}
|
|
9957
|
+
function concatEarBytes(...parts) {
|
|
9958
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
9959
|
+
let offset = 0;
|
|
9960
|
+
for (const part of parts) {
|
|
9961
|
+
bytes.set(part, offset);
|
|
9962
|
+
offset += part.length;
|
|
9963
|
+
}
|
|
9964
|
+
return bytes.buffer;
|
|
9965
|
+
}
|
|
9966
|
+
function lengthPrefixEarBytes(bytes) {
|
|
9967
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
9968
|
+
}
|
|
9778
9969
|
/**
|
|
9779
9970
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
9780
9971
|
* @param earJwk
|
|
@@ -11714,7 +11905,7 @@
|
|
|
11714
11905
|
|
|
11715
11906
|
/* eslint-disable header/header */
|
|
11716
11907
|
const name = "@azure/msal-browser";
|
|
11717
|
-
const version = "5.
|
|
11908
|
+
const version = "5.30.0";
|
|
11718
11909
|
|
|
11719
11910
|
/*
|
|
11720
11911
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -13021,8 +13212,7 @@
|
|
|
13021
13212
|
}
|
|
13022
13213
|
}
|
|
13023
13214
|
catch (e) {
|
|
13024
|
-
this.logger.
|
|
13025
|
-
this.logger.error(`0tvdic ${e}`, correlationId);
|
|
13215
|
+
this.logger.error("023ixj", correlationId);
|
|
13026
13216
|
throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
|
|
13027
13217
|
}
|
|
13028
13218
|
return [parsedRequest, verifier];
|
|
@@ -14096,30 +14286,42 @@
|
|
|
14096
14286
|
* page (see `runPopupRelay`) back to the embedded frame that opened it. See
|
|
14097
14287
|
* {@link BrowserAuthOptions.popupRelayUri}.
|
|
14098
14288
|
*
|
|
14099
|
-
*
|
|
14100
|
-
*
|
|
14101
|
-
* pulling in the other's dependencies.
|
|
14289
|
+
* Shared by the relay-page entry and client helpers without importing either
|
|
14290
|
+
* implementation into the other bundle.
|
|
14102
14291
|
*
|
|
14103
14292
|
* @internal
|
|
14104
14293
|
*/
|
|
14105
|
-
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
14294
|
+
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
14295
|
+
/** @internal Response bound to an authenticated v2 relay document. */
|
|
14296
|
+
const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
|
|
14297
|
+
/** @internal Ready signal for the authenticated popup-relay request handoff. */
|
|
14298
|
+
const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
|
|
14299
|
+
/** @internal Request delivered only to the same-origin relay window. */
|
|
14300
|
+
const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
|
|
14301
|
+
/** @internal Resolve the compatibility default without downgrading invalid versions. */
|
|
14302
|
+
function getPopupRelayProtocolVersion(version, correlationId = "") {
|
|
14303
|
+
if (version === undefined) {
|
|
14304
|
+
return 1;
|
|
14305
|
+
}
|
|
14306
|
+
if (version !== 1 && version !== 2) {
|
|
14307
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
|
|
14308
|
+
}
|
|
14309
|
+
return version;
|
|
14310
|
+
}
|
|
14106
14311
|
|
|
14107
14312
|
/*
|
|
14108
14313
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14109
14314
|
* Licensed under the MIT License.
|
|
14110
14315
|
*/
|
|
14111
14316
|
/**
|
|
14112
|
-
* Builds the
|
|
14113
|
-
*
|
|
14114
|
-
*
|
|
14115
|
-
* library-state `id` so the relay page can listen on the right BroadcastChannel
|
|
14116
|
-
* and echo the id back. The relay URI is resolved against the app origin, so it
|
|
14117
|
-
* must be same-origin as the embedded frame. See `runPopupRelay`.
|
|
14317
|
+
* Builds the same-origin relay URL. V1 preserves the fragment descriptor;
|
|
14318
|
+
* explicitly selected v2 carries only the id and retains the navigation for
|
|
14319
|
+
* the authenticated handoff.
|
|
14118
14320
|
*
|
|
14119
14321
|
* @internal
|
|
14120
14322
|
*/
|
|
14121
|
-
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
14122
|
-
const
|
|
14323
|
+
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
|
|
14324
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
|
|
14123
14325
|
const target = new URL(popupRelayUri, window.location.origin);
|
|
14124
14326
|
/*
|
|
14125
14327
|
* The relay page must be same-origin as the embedded frame: the response is
|
|
@@ -14132,7 +14334,12 @@
|
|
|
14132
14334
|
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
|
|
14133
14335
|
}
|
|
14134
14336
|
const hashParams = new URLSearchParams();
|
|
14135
|
-
|
|
14337
|
+
if (version === 1) {
|
|
14338
|
+
hashParams.set("req", JSON.stringify({ id, ...action }));
|
|
14339
|
+
}
|
|
14340
|
+
else {
|
|
14341
|
+
hashParams.set("id", id);
|
|
14342
|
+
}
|
|
14136
14343
|
target.hash = hashParams.toString();
|
|
14137
14344
|
return target.toString();
|
|
14138
14345
|
}
|
|
@@ -14143,21 +14350,30 @@
|
|
|
14143
14350
|
* partitioning blocks the BroadcastChannel the redirect bridge uses from
|
|
14144
14351
|
* reaching the embedded frame.
|
|
14145
14352
|
*
|
|
14146
|
-
*
|
|
14147
|
-
*
|
|
14148
|
-
*
|
|
14353
|
+
* In v2, the retained navigation is sent once, after a ready signal from the popup
|
|
14354
|
+
* window we opened on our own origin with the matching library-state id.
|
|
14355
|
+
* Successful responses must also carry that handoff's relay-document nonce.
|
|
14356
|
+
* Setup failures can reject the request before the handoff completes.
|
|
14149
14357
|
*
|
|
14150
14358
|
* @internal
|
|
14151
14359
|
*/
|
|
14152
|
-
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
|
|
14360
|
+
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
|
|
14361
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
|
|
14362
|
+
if (version === 2 && !action) {
|
|
14363
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
|
|
14364
|
+
}
|
|
14153
14365
|
return new Promise((resolve, reject) => {
|
|
14154
14366
|
const correlationId = request.correlationId;
|
|
14155
14367
|
logger.verbose("1d05g9", correlationId);
|
|
14156
|
-
performanceClient.addFields({
|
|
14368
|
+
performanceClient.addFields({
|
|
14369
|
+
redirectBridgeTimeoutMs: timeoutMs,
|
|
14370
|
+
popupRelayProtocolVersion: version,
|
|
14371
|
+
}, correlationId);
|
|
14157
14372
|
const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
|
|
14158
14373
|
const expectedId = libraryState.id;
|
|
14159
14374
|
const expectedOrigin = window.location.origin;
|
|
14160
14375
|
let settled = false;
|
|
14376
|
+
let handoffNonce = "";
|
|
14161
14377
|
const cleanup = () => {
|
|
14162
14378
|
window.removeEventListener("message", onMessage);
|
|
14163
14379
|
clearTimeout(timeoutId);
|
|
@@ -14169,20 +14385,52 @@
|
|
|
14169
14385
|
return;
|
|
14170
14386
|
}
|
|
14171
14387
|
const data = event.data;
|
|
14172
|
-
if (!data ||
|
|
14173
|
-
data.type !== POPUP_RELAY_RESPONSE_TYPE ||
|
|
14174
|
-
data.id !== expectedId) {
|
|
14388
|
+
if (!data || data.id !== expectedId) {
|
|
14175
14389
|
return;
|
|
14176
14390
|
}
|
|
14177
14391
|
if (settled) {
|
|
14178
14392
|
return;
|
|
14179
14393
|
}
|
|
14394
|
+
if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
|
|
14395
|
+
if (handoffNonce ||
|
|
14396
|
+
typeof data.nonce !== "string" ||
|
|
14397
|
+
!data.nonce) {
|
|
14398
|
+
return;
|
|
14399
|
+
}
|
|
14400
|
+
handoffNonce = data.nonce;
|
|
14401
|
+
try {
|
|
14402
|
+
popupWindow.postMessage({
|
|
14403
|
+
type: POPUP_RELAY_REQUEST_TYPE,
|
|
14404
|
+
id: expectedId,
|
|
14405
|
+
nonce: handoffNonce,
|
|
14406
|
+
request: { id: expectedId, ...action },
|
|
14407
|
+
}, expectedOrigin);
|
|
14408
|
+
performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
|
|
14409
|
+
}
|
|
14410
|
+
catch {
|
|
14411
|
+
settled = true;
|
|
14412
|
+
cleanup();
|
|
14413
|
+
logger.error("0sx3jz", correlationId);
|
|
14414
|
+
reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
|
|
14415
|
+
}
|
|
14416
|
+
return;
|
|
14417
|
+
}
|
|
14418
|
+
const hasError = typeof data.error === "string" && data.error.length > 0;
|
|
14419
|
+
const responseType = version === 1
|
|
14420
|
+
? POPUP_RELAY_RESPONSE_TYPE
|
|
14421
|
+
: POPUP_RELAY_V2_RESPONSE_TYPE;
|
|
14422
|
+
if (data.type !== responseType ||
|
|
14423
|
+
(version === 2 &&
|
|
14424
|
+
((!handoffNonce && !hasError) ||
|
|
14425
|
+
(handoffNonce && data.nonce !== handoffNonce)))) {
|
|
14426
|
+
return;
|
|
14427
|
+
}
|
|
14180
14428
|
settled = true;
|
|
14181
14429
|
cleanup();
|
|
14182
|
-
if (
|
|
14183
|
-
reject(createBrowserAuthError(data.error, correlationId));
|
|
14430
|
+
if (hasError) {
|
|
14431
|
+
reject(createBrowserAuthError(data.error, correlationId, data.subError));
|
|
14184
14432
|
}
|
|
14185
|
-
else if (data.payload) {
|
|
14433
|
+
else if (typeof data.payload === "string" && data.payload) {
|
|
14186
14434
|
resolve(data.payload);
|
|
14187
14435
|
}
|
|
14188
14436
|
else {
|
|
@@ -15851,6 +16099,36 @@
|
|
|
15851
16099
|
addCorrelationId(queryParams, request.correlationId);
|
|
15852
16100
|
return getAuthorizeUrl(authority, queryParams);
|
|
15853
16101
|
}
|
|
16102
|
+
/**
|
|
16103
|
+
* Prepares the selected EAR construction.
|
|
16104
|
+
* @internal
|
|
16105
|
+
*/
|
|
16106
|
+
async function initializeEarRequest(config, request, logger, performanceClient) {
|
|
16107
|
+
if (!config.experimental.enableAsymmetricEar) {
|
|
16108
|
+
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
|
|
16109
|
+
return {
|
|
16110
|
+
...request,
|
|
16111
|
+
earJwk,
|
|
16112
|
+
asymmetricEar: undefined,
|
|
16113
|
+
};
|
|
16114
|
+
}
|
|
16115
|
+
try {
|
|
16116
|
+
const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
|
|
16117
|
+
const apv = generateAsymmetricEarApv(publicJwk);
|
|
16118
|
+
const earJwk = base64Encode(JSON.stringify(publicJwk));
|
|
16119
|
+
return {
|
|
16120
|
+
...request,
|
|
16121
|
+
earJwk,
|
|
16122
|
+
asymmetricEar: { privateJwk, apv },
|
|
16123
|
+
};
|
|
16124
|
+
}
|
|
16125
|
+
catch (error) {
|
|
16126
|
+
if (error instanceof AuthError) {
|
|
16127
|
+
throw error;
|
|
16128
|
+
}
|
|
16129
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
|
|
16130
|
+
}
|
|
16131
|
+
}
|
|
15854
16132
|
/**
|
|
15855
16133
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
15856
16134
|
*/
|
|
@@ -15860,7 +16138,18 @@
|
|
|
15860
16138
|
}
|
|
15861
16139
|
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
15862
16140
|
addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
15863
|
-
|
|
16141
|
+
try {
|
|
16142
|
+
addEARParameters(parameters, request.earJwk, request.asymmetricEar
|
|
16143
|
+
? base64Encode(JSON.stringify({
|
|
16144
|
+
alg: "ECDH-ES",
|
|
16145
|
+
enc: "A256GCM",
|
|
16146
|
+
apv: request.asymmetricEar.apv,
|
|
16147
|
+
}))
|
|
16148
|
+
: undefined);
|
|
16149
|
+
}
|
|
16150
|
+
catch {
|
|
16151
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
|
|
16152
|
+
}
|
|
15864
16153
|
// Also add codeChallenge as backup in case EAR is not supported
|
|
15865
16154
|
addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
|
|
15866
16155
|
addExtraParameters(parameters, {
|
|
@@ -15944,12 +16233,14 @@
|
|
|
15944
16233
|
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
15945
16234
|
const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
|
|
15946
16235
|
const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
|
|
16236
|
+
const brokerRequest = {
|
|
16237
|
+
...request,
|
|
16238
|
+
state: userRequestState,
|
|
16239
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
16240
|
+
};
|
|
16241
|
+
delete brokerRequest.asymmetricEar;
|
|
15947
16242
|
try {
|
|
15948
|
-
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(
|
|
15949
|
-
...request,
|
|
15950
|
-
state: userRequestState,
|
|
15951
|
-
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
15952
|
-
});
|
|
16243
|
+
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
|
|
15953
16244
|
}
|
|
15954
16245
|
catch (e) {
|
|
15955
16246
|
await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
|
|
@@ -16014,7 +16305,20 @@
|
|
|
16014
16305
|
if (!request.earJwk) {
|
|
16015
16306
|
throw createBrowserAuthError(earJwkEmpty, request.correlationId);
|
|
16016
16307
|
}
|
|
16017
|
-
|
|
16308
|
+
let plaintext;
|
|
16309
|
+
if (request.asymmetricEar) {
|
|
16310
|
+
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 });
|
|
16311
|
+
}
|
|
16312
|
+
else {
|
|
16313
|
+
plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
|
|
16314
|
+
}
|
|
16315
|
+
let decryptedData;
|
|
16316
|
+
try {
|
|
16317
|
+
decryptedData = JSON.parse(plaintext);
|
|
16318
|
+
}
|
|
16319
|
+
catch {
|
|
16320
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
|
|
16321
|
+
}
|
|
16018
16322
|
if (decryptedData.accountId) {
|
|
16019
16323
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
16020
16324
|
}
|
|
@@ -16305,6 +16609,7 @@
|
|
|
16305
16609
|
: "",
|
|
16306
16610
|
postLogoutRedirectUri: "",
|
|
16307
16611
|
popupRelayUri: "",
|
|
16612
|
+
popupRelayProtocolVersion: 1,
|
|
16308
16613
|
clientCapabilities: [],
|
|
16309
16614
|
OIDCOptions: {
|
|
16310
16615
|
responseMode: ResponseMode$1.FRAGMENT,
|
|
@@ -16371,6 +16676,7 @@
|
|
|
16371
16676
|
client: new StubPerformanceClient(),
|
|
16372
16677
|
};
|
|
16373
16678
|
const DEFAULT_EXPERIMENTAL_OPTIONS = {
|
|
16679
|
+
enableAsymmetricEar: false,
|
|
16374
16680
|
iframeTimeoutTelemetry: false,
|
|
16375
16681
|
allowPlatformBrokerWithDOM: false,
|
|
16376
16682
|
};
|
|
@@ -16424,9 +16730,16 @@
|
|
|
16424
16730
|
experimental: {
|
|
16425
16731
|
...DEFAULT_EXPERIMENTAL_OPTIONS,
|
|
16426
16732
|
...userInputExperimental,
|
|
16733
|
+
enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
|
|
16427
16734
|
},
|
|
16428
16735
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
|
|
16429
16736
|
};
|
|
16737
|
+
if (overlayedConfig.experimental.enableAsymmetricEar &&
|
|
16738
|
+
overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
|
|
16739
|
+
const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
16740
|
+
logger.warning("07xxx7", "");
|
|
16741
|
+
overlayedConfig.experimental.enableAsymmetricEar = false;
|
|
16742
|
+
}
|
|
16430
16743
|
return overlayedConfig;
|
|
16431
16744
|
}
|
|
16432
16745
|
|
|
@@ -17331,19 +17644,21 @@
|
|
|
17331
17644
|
/*
|
|
17332
17645
|
* When a popup-relay page is configured, open it top-level
|
|
17333
17646
|
* (same first-party origin) instead of navigating the popup
|
|
17334
|
-
* straight to the IdP
|
|
17647
|
+
* straight to the IdP. V1 carries the action in the hash; v2
|
|
17648
|
+
* retains it for the authenticated handoff.
|
|
17335
17649
|
* The relay page opens the IdP child popup and relays the
|
|
17336
17650
|
* response back via postMessage (see waitForPopupResponse).
|
|
17337
17651
|
*/
|
|
17338
17652
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
17653
|
+
popupParams.relayAction = { method: "GET", url: navigateUrl };
|
|
17339
17654
|
const popupNavigateUrl = popupRelayUri
|
|
17340
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId),
|
|
17655
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
17341
17656
|
: navigateUrl;
|
|
17342
17657
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
17343
17658
|
const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
|
|
17344
17659
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
17345
17660
|
// Wait for the redirect bridge response
|
|
17346
|
-
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
|
|
17661
|
+
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17347
17662
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17348
17663
|
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);
|
|
17349
17664
|
}
|
|
@@ -17367,21 +17682,20 @@
|
|
|
17367
17682
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
17368
17683
|
// Get the frame handle for the silent request
|
|
17369
17684
|
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);
|
|
17370
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
17371
17685
|
const pkce = pkceCodes ||
|
|
17372
17686
|
(await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
|
|
17373
17687
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17374
|
-
|
|
17688
|
+
let popupRequest = {
|
|
17375
17689
|
...request,
|
|
17376
|
-
earJwk: earJwk,
|
|
17377
17690
|
codeChallenge: pkce.challenge,
|
|
17378
17691
|
...tokenBindingParams,
|
|
17379
17692
|
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
17380
17693
|
};
|
|
17381
17694
|
try {
|
|
17695
|
+
popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
|
|
17382
17696
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
17383
17697
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
17384
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
17698
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17385
17699
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17386
17700
|
if (!serverParams.ear_jwe && serverParams.code) {
|
|
17387
17701
|
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
|
|
@@ -17409,7 +17723,7 @@
|
|
|
17409
17723
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
|
|
17410
17724
|
const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
|
|
17411
17725
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
17412
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
|
|
17726
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17413
17727
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17414
17728
|
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);
|
|
17415
17729
|
}
|
|
@@ -17465,21 +17779,22 @@
|
|
|
17465
17779
|
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, exports.InteractionType.Popup, validRequest);
|
|
17466
17780
|
/*
|
|
17467
17781
|
* When a popup-relay page is configured, open it top-level (same
|
|
17468
|
-
* first-party origin)
|
|
17469
|
-
*
|
|
17782
|
+
* first-party origin), using the configured wire protocol for the
|
|
17783
|
+
* end-session URL. The relay page opens the IdP child
|
|
17470
17784
|
* popup and the post-logout redirect page (running the redirect
|
|
17471
17785
|
* bridge) relays completion back via postMessage — so logout works
|
|
17472
17786
|
* from an embedded, cross-origin iframe where a direct popup to the
|
|
17473
17787
|
* IdP cannot. See runPopupRelay / waitForPopupResponse.
|
|
17474
17788
|
*/
|
|
17475
17789
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
17790
|
+
popupParams.relayAction = { method: "GET", url: logoutUri };
|
|
17476
17791
|
const popupNavigateUrl = popupRelayUri
|
|
17477
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId),
|
|
17792
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
17478
17793
|
: logoutUri;
|
|
17479
17794
|
// Open the popup window to requestUrl.
|
|
17480
17795
|
const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
|
|
17481
17796
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
17482
|
-
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
|
|
17797
|
+
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
|
|
17483
17798
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
17484
17799
|
});
|
|
17485
17800
|
if (mainWindowRedirectUri) {
|
|
@@ -17691,11 +18006,12 @@
|
|
|
17691
18006
|
? getEARFormData
|
|
17692
18007
|
: getCodeFormData;
|
|
17693
18008
|
const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
|
|
17694
|
-
|
|
18009
|
+
popupParams.relayAction = {
|
|
17695
18010
|
method: "POST",
|
|
17696
18011
|
action: formData.action,
|
|
17697
18012
|
fields: formData.fields,
|
|
17698
|
-
}
|
|
18013
|
+
};
|
|
18014
|
+
const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
|
|
17699
18015
|
return this.initiateAuthRequest(relayUrl, popupParams);
|
|
17700
18016
|
}
|
|
17701
18017
|
const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
@@ -17704,7 +18020,7 @@
|
|
|
17704
18020
|
form.submit();
|
|
17705
18021
|
return popupWindow;
|
|
17706
18022
|
}
|
|
17707
|
-
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
18023
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
|
|
17708
18024
|
/*
|
|
17709
18025
|
* When a popup-relay page is configured the response is relayed back to
|
|
17710
18026
|
* this frame by the relay page via postMessage, and the relay popup's
|
|
@@ -17714,7 +18030,11 @@
|
|
|
17714
18030
|
* frame and which does not track the relay popup.
|
|
17715
18031
|
*/
|
|
17716
18032
|
if (this.config.auth.popupRelayUri) {
|
|
17717
|
-
|
|
18033
|
+
if (this.config.auth.popupRelayProtocolVersion === 2 &&
|
|
18034
|
+
!relayAction) {
|
|
18035
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
|
|
18036
|
+
}
|
|
18037
|
+
return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
|
|
17718
18038
|
}
|
|
17719
18039
|
if (this.waitForPopupResponseHook) {
|
|
17720
18040
|
return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
|
|
@@ -17839,16 +18159,15 @@
|
|
|
17839
18159
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
17840
18160
|
// Get the frame handle for the silent request
|
|
17841
18161
|
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);
|
|
17842
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
17843
18162
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
17844
18163
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17845
|
-
|
|
18164
|
+
let redirectRequest = {
|
|
17846
18165
|
...request,
|
|
17847
|
-
earJwk: earJwk,
|
|
17848
18166
|
codeChallenge: pkceCodes.challenge,
|
|
17849
18167
|
...tokenBindingParams,
|
|
17850
18168
|
};
|
|
17851
18169
|
try {
|
|
18170
|
+
redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
|
|
17852
18171
|
if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
|
|
17853
18172
|
throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
|
|
17854
18173
|
}
|
|
@@ -17861,9 +18180,10 @@
|
|
|
17861
18180
|
}, this.config.system.redirectNavigationTimeout);
|
|
17862
18181
|
});
|
|
17863
18182
|
}
|
|
17864
|
-
catch (
|
|
18183
|
+
catch (error) {
|
|
18184
|
+
this.browserStorage.resetRequestCache(correlationId);
|
|
17865
18185
|
await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17866
|
-
throw
|
|
18186
|
+
throw error;
|
|
17867
18187
|
}
|
|
17868
18188
|
}
|
|
17869
18189
|
/**
|
|
@@ -18052,7 +18372,6 @@
|
|
|
18052
18372
|
/**
|
|
18053
18373
|
* Redirects window to given URL.
|
|
18054
18374
|
* @param urlNavigate
|
|
18055
|
-
* @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
|
|
18056
18375
|
*/
|
|
18057
18376
|
async initiateAuthRequest(requestUrl) {
|
|
18058
18377
|
this.logger.verbose("0yaw2e", this.correlationId);
|
|
@@ -18340,13 +18659,11 @@
|
|
|
18340
18659
|
async executeEarFlow(request) {
|
|
18341
18660
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
18342
18661
|
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);
|
|
18343
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
18344
18662
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
18345
|
-
const silentRequest = {
|
|
18663
|
+
const silentRequest = await initializeEarRequest(this.config, {
|
|
18346
18664
|
...request,
|
|
18347
|
-
earJwk: earJwk,
|
|
18348
18665
|
codeChallenge: pkceCodes.challenge,
|
|
18349
|
-
};
|
|
18666
|
+
}, this.logger, this.performanceClient);
|
|
18350
18667
|
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
18351
18668
|
const iframe = createHiddenIframe();
|
|
18352
18669
|
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
@@ -18708,6 +19025,7 @@
|
|
|
18708
19025
|
return {
|
|
18709
19026
|
key: JSON.stringify({
|
|
18710
19027
|
...thumbprint,
|
|
19028
|
+
accountTenantId: account.tenantId,
|
|
18711
19029
|
forceRefresh: !!request.forceRefresh,
|
|
18712
19030
|
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
18713
19031
|
extraParameters: canonicalizeStringDict(request.extraParameters),
|