@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
|
@@ -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.msalCustomAuth = {}));
|
|
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.
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
// Token renewal offset default in seconds
|
|
301
301
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
302
302
|
|
|
303
|
-
/*! @azure/msal-common v16.
|
|
303
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
304
304
|
/*
|
|
305
305
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
306
306
|
* Licensed under the MIT License.
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
/*! @azure/msal-common v16.
|
|
332
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
333
333
|
|
|
334
334
|
/*
|
|
335
335
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
/*! @azure/msal-common v16.
|
|
355
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
356
356
|
/*
|
|
357
357
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
358
358
|
* Licensed under the MIT License.
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
const resourceParameterRequired = "resource_parameter_required";
|
|
391
391
|
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
392
392
|
|
|
393
|
-
/*! @azure/msal-common v16.
|
|
393
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
394
394
|
|
|
395
395
|
/*
|
|
396
396
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
-
/*! @azure/msal-common v16.
|
|
431
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
432
432
|
|
|
433
433
|
/*
|
|
434
434
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
return matches[2];
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
-
/*! @azure/msal-common v16.
|
|
497
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
498
498
|
|
|
499
499
|
/*
|
|
500
500
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
return updatedAccountInfo;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
/*! @azure/msal-common v16.
|
|
585
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
586
586
|
/*
|
|
587
587
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
588
588
|
* Licensed under the MIT License.
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
Ciam: 3,
|
|
597
597
|
};
|
|
598
598
|
|
|
599
|
-
/*! @azure/msal-common v16.
|
|
599
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
600
600
|
/*
|
|
601
601
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
602
602
|
* Licensed under the MIT License.
|
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
return null;
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
-
/*! @azure/msal-common v16.
|
|
621
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
622
622
|
/*
|
|
623
623
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
624
624
|
* Licensed under the MIT License.
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
EAR: "EAR",
|
|
643
643
|
};
|
|
644
644
|
|
|
645
|
-
/*! @azure/msal-common v16.
|
|
645
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
646
646
|
/**
|
|
647
647
|
* Returns the AccountInfo interface for this account.
|
|
648
648
|
* @internal
|
|
@@ -831,7 +831,7 @@
|
|
|
831
831
|
entity.hasOwnProperty("authorityType"));
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
/*! @azure/msal-common v16.
|
|
834
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
835
835
|
/*
|
|
836
836
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
837
837
|
* Licensed under the MIT License.
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
*/
|
|
842
842
|
const unexpectedError = "unexpected_error";
|
|
843
843
|
|
|
844
|
-
/*! @azure/msal-common v16.
|
|
844
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
845
845
|
|
|
846
846
|
/*
|
|
847
847
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -861,7 +861,7 @@
|
|
|
861
861
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
862
862
|
}
|
|
863
863
|
|
|
864
|
-
/*! @azure/msal-common v16.
|
|
864
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
865
865
|
/*
|
|
866
866
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
867
867
|
* Licensed under the MIT License.
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
return headerName === undefined ? undefined : headers[headerName];
|
|
902
902
|
}
|
|
903
903
|
|
|
904
|
-
/*! @azure/msal-common v16.
|
|
904
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
905
905
|
/*
|
|
906
906
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
907
907
|
* Licensed under the MIT License.
|
|
@@ -932,7 +932,7 @@
|
|
|
932
932
|
const invalidDpopNonce = "invalid_dpop_nonce";
|
|
933
933
|
const dpopMissingResourceContext = "dpop_missing_resource_context";
|
|
934
934
|
|
|
935
|
-
/*! @azure/msal-common v16.
|
|
935
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
936
936
|
/*
|
|
937
937
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
938
938
|
* Licensed under the MIT License.
|
|
@@ -944,7 +944,7 @@
|
|
|
944
944
|
response.hasOwnProperty("jwks_uri"));
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
-
/*! @azure/msal-common v16.
|
|
947
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
948
948
|
/*
|
|
949
949
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
950
950
|
* Licensed under the MIT License.
|
|
@@ -1024,7 +1024,7 @@
|
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
|
-
/*! @azure/msal-common v16.
|
|
1027
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1028
1028
|
|
|
1029
1029
|
/*
|
|
1030
1030
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1211,7 +1211,7 @@
|
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
1213
|
|
|
1214
|
-
/*! @azure/msal-common v16.
|
|
1214
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1215
1215
|
|
|
1216
1216
|
/*
|
|
1217
1217
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1365,7 +1365,7 @@
|
|
|
1365
1365
|
return null;
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
|
-
/*! @azure/msal-common v16.
|
|
1368
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1369
1369
|
/*
|
|
1370
1370
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1371
1371
|
* Licensed under the MIT License.
|
|
@@ -1374,7 +1374,7 @@
|
|
|
1374
1374
|
// AzureCloudInstance is not specified.
|
|
1375
1375
|
None: "none"};
|
|
1376
1376
|
|
|
1377
|
-
/*! @azure/msal-common v16.
|
|
1377
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1378
1378
|
/*
|
|
1379
1379
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1380
1380
|
* Licensed under the MIT License.
|
|
@@ -1384,7 +1384,7 @@
|
|
|
1384
1384
|
response.hasOwnProperty("metadata"));
|
|
1385
1385
|
}
|
|
1386
1386
|
|
|
1387
|
-
/*! @azure/msal-common v16.
|
|
1387
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1388
1388
|
/*
|
|
1389
1389
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1390
1390
|
* Licensed under the MIT License.
|
|
@@ -1394,7 +1394,7 @@
|
|
|
1394
1394
|
response.hasOwnProperty("error_description"));
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
|
-
/*! @azure/msal-common v16.
|
|
1397
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1398
1398
|
/*
|
|
1399
1399
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1400
1400
|
* Licensed under the MIT License.
|
|
@@ -1465,7 +1465,7 @@
|
|
|
1465
1465
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1466
1466
|
const SetUserData = "setUserData";
|
|
1467
1467
|
|
|
1468
|
-
/*! @azure/msal-common v16.
|
|
1468
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1469
1469
|
/*
|
|
1470
1470
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1471
1471
|
* Licensed under the MIT License.
|
|
@@ -1559,7 +1559,7 @@
|
|
|
1559
1559
|
};
|
|
1560
1560
|
};
|
|
1561
1561
|
|
|
1562
|
-
/*! @azure/msal-common v16.
|
|
1562
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1563
1563
|
|
|
1564
1564
|
/*
|
|
1565
1565
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1688,7 +1688,7 @@
|
|
|
1688
1688
|
},
|
|
1689
1689
|
};
|
|
1690
1690
|
|
|
1691
|
-
/*! @azure/msal-common v16.
|
|
1691
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1692
1692
|
/*
|
|
1693
1693
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1694
1694
|
* Licensed under the MIT License.
|
|
@@ -1753,7 +1753,7 @@
|
|
|
1753
1753
|
return cachedAtSec > nowSeconds();
|
|
1754
1754
|
}
|
|
1755
1755
|
|
|
1756
|
-
/*! @azure/msal-common v16.
|
|
1756
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
1757
1757
|
|
|
1758
1758
|
/*
|
|
1759
1759
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2040,7 +2040,7 @@
|
|
|
2040
2040
|
return [...attributeTokens].sort().join(" ");
|
|
2041
2041
|
}
|
|
2042
2042
|
|
|
2043
|
-
/*! @azure/msal-common v16.
|
|
2043
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
2044
2044
|
|
|
2045
2045
|
/*
|
|
2046
2046
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3011,7 +3011,7 @@
|
|
|
3011
3011
|
};
|
|
3012
3012
|
}
|
|
3013
3013
|
|
|
3014
|
-
/*! @azure/msal-common v16.
|
|
3014
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3015
3015
|
|
|
3016
3016
|
/*
|
|
3017
3017
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
}
|
|
3046
3046
|
}
|
|
3047
3047
|
|
|
3048
|
-
/*! @azure/msal-common v16.
|
|
3048
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3049
3049
|
|
|
3050
3050
|
/*
|
|
3051
3051
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3241,7 +3241,7 @@
|
|
|
3241
3241
|
}
|
|
3242
3242
|
}
|
|
3243
3243
|
|
|
3244
|
-
/*! @azure/msal-common v16.
|
|
3244
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3245
3245
|
|
|
3246
3246
|
/*
|
|
3247
3247
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3709,12 +3709,13 @@
|
|
|
3709
3709
|
* Add EAR (Encrypted Authorize Response) request parameters
|
|
3710
3710
|
* @param parameters
|
|
3711
3711
|
* @param jwk
|
|
3712
|
+
* @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
|
|
3712
3713
|
*/
|
|
3713
|
-
function addEARParameters(parameters, jwk) {
|
|
3714
|
+
function addEARParameters(parameters, jwk, jweCrypto) {
|
|
3714
3715
|
parameters.set(EAR_JWK, encodeURIComponent(jwk));
|
|
3715
|
-
//
|
|
3716
|
+
// Default symmetric EAR metadata; asymmetric requests supply their APV.
|
|
3716
3717
|
const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
|
|
3717
|
-
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
3718
|
+
parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
|
|
3718
3719
|
}
|
|
3719
3720
|
function addResource(parameters, resource) {
|
|
3720
3721
|
if (resource) {
|
|
@@ -3741,7 +3742,7 @@
|
|
|
3741
3742
|
}
|
|
3742
3743
|
}
|
|
3743
3744
|
|
|
3744
|
-
/*! @azure/msal-common v16.
|
|
3745
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3745
3746
|
|
|
3746
3747
|
/*
|
|
3747
3748
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3872,7 +3873,7 @@
|
|
|
3872
3873
|
}
|
|
3873
3874
|
}
|
|
3874
3875
|
|
|
3875
|
-
/*! @azure/msal-common v16.
|
|
3876
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3876
3877
|
|
|
3877
3878
|
/*
|
|
3878
3879
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3920,7 +3921,7 @@
|
|
|
3920
3921
|
},
|
|
3921
3922
|
};
|
|
3922
3923
|
|
|
3923
|
-
/*! @azure/msal-common v16.
|
|
3924
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3924
3925
|
|
|
3925
3926
|
/*
|
|
3926
3927
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3943,7 +3944,7 @@
|
|
|
3943
3944
|
},
|
|
3944
3945
|
};
|
|
3945
3946
|
|
|
3946
|
-
/*! @azure/msal-common v16.
|
|
3947
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
3947
3948
|
/*
|
|
3948
3949
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3949
3950
|
* Licensed under the MIT License.
|
|
@@ -4218,12 +4219,12 @@
|
|
|
4218
4219
|
}
|
|
4219
4220
|
}
|
|
4220
4221
|
|
|
4221
|
-
/*! @azure/msal-common v16.
|
|
4222
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4222
4223
|
/* eslint-disable header/header */
|
|
4223
4224
|
const name$1 = "@azure/msal-common";
|
|
4224
|
-
const version$1 = "16.
|
|
4225
|
+
const version$1 = "16.17.0";
|
|
4225
4226
|
|
|
4226
|
-
/*! @azure/msal-common v16.
|
|
4227
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4227
4228
|
/*
|
|
4228
4229
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4229
4230
|
* Licensed under the MIT License.
|
|
@@ -4231,7 +4232,7 @@
|
|
|
4231
4232
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4232
4233
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4233
4234
|
|
|
4234
|
-
/*! @azure/msal-common v16.
|
|
4235
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4235
4236
|
|
|
4236
4237
|
/*
|
|
4237
4238
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4269,7 +4270,7 @@
|
|
|
4269
4270
|
}
|
|
4270
4271
|
}
|
|
4271
4272
|
|
|
4272
|
-
/*! @azure/msal-common v16.
|
|
4273
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
4273
4274
|
|
|
4274
4275
|
/*
|
|
4275
4276
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5496,7 +5497,7 @@
|
|
|
5496
5497
|
}
|
|
5497
5498
|
}
|
|
5498
5499
|
|
|
5499
|
-
/*! @azure/msal-common v16.
|
|
5500
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5500
5501
|
/*
|
|
5501
5502
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5502
5503
|
* Licensed under the MIT License.
|
|
@@ -5510,7 +5511,7 @@
|
|
|
5510
5511
|
const PerformanceEventStatus = {
|
|
5511
5512
|
InProgress: 1};
|
|
5512
5513
|
|
|
5513
|
-
/*! @azure/msal-common v16.
|
|
5514
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5514
5515
|
|
|
5515
5516
|
/*
|
|
5516
5517
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5568,7 +5569,7 @@
|
|
|
5568
5569
|
}
|
|
5569
5570
|
}
|
|
5570
5571
|
|
|
5571
|
-
/*! @azure/msal-common v16.
|
|
5572
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5572
5573
|
|
|
5573
5574
|
/*
|
|
5574
5575
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5666,7 +5667,7 @@
|
|
|
5666
5667
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5667
5668
|
}
|
|
5668
5669
|
|
|
5669
|
-
/*! @azure/msal-common v16.
|
|
5670
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5670
5671
|
/*
|
|
5671
5672
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5672
5673
|
* Licensed under the MIT License.
|
|
@@ -5693,7 +5694,7 @@
|
|
|
5693
5694
|
}
|
|
5694
5695
|
}
|
|
5695
5696
|
|
|
5696
|
-
/*! @azure/msal-common v16.
|
|
5697
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5697
5698
|
|
|
5698
5699
|
/*
|
|
5699
5700
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5714,7 +5715,7 @@
|
|
|
5714
5715
|
return new JoseHeaderError(code, correlationId);
|
|
5715
5716
|
}
|
|
5716
5717
|
|
|
5717
|
-
/*! @azure/msal-common v16.
|
|
5718
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5718
5719
|
/*
|
|
5719
5720
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5720
5721
|
* Licensed under the MIT License.
|
|
@@ -5739,7 +5740,7 @@
|
|
|
5739
5740
|
return Object.getPrototypeOf(value) === proto;
|
|
5740
5741
|
}
|
|
5741
5742
|
|
|
5742
|
-
/*! @azure/msal-common v16.
|
|
5743
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5743
5744
|
/*
|
|
5744
5745
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5745
5746
|
* Licensed under the MIT License.
|
|
@@ -5749,7 +5750,7 @@
|
|
|
5749
5750
|
const missingJwkError = "missing_jwk_error";
|
|
5750
5751
|
const invalidJwkError = "invalid_jwk_error";
|
|
5751
5752
|
|
|
5752
|
-
/*! @azure/msal-common v16.
|
|
5753
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5753
5754
|
|
|
5754
5755
|
/*
|
|
5755
5756
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5815,7 +5816,7 @@
|
|
|
5815
5816
|
}
|
|
5816
5817
|
}
|
|
5817
5818
|
|
|
5818
|
-
/*! @azure/msal-common v16.
|
|
5819
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5819
5820
|
|
|
5820
5821
|
/*
|
|
5821
5822
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5916,7 +5917,7 @@
|
|
|
5916
5917
|
}
|
|
5917
5918
|
}
|
|
5918
5919
|
|
|
5919
|
-
/*! @azure/msal-common v16.
|
|
5920
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
5920
5921
|
|
|
5921
5922
|
/*
|
|
5922
5923
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6071,7 +6072,7 @@
|
|
|
6071
6072
|
}
|
|
6072
6073
|
}
|
|
6073
6074
|
|
|
6074
|
-
/*! @azure/msal-common v16.
|
|
6075
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6075
6076
|
/*
|
|
6076
6077
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6077
6078
|
* Licensed under the MIT License.
|
|
@@ -6122,7 +6123,7 @@
|
|
|
6122
6123
|
*/
|
|
6123
6124
|
const interruptedUser = "interrupted_user";
|
|
6124
6125
|
|
|
6125
|
-
/*! @azure/msal-common v16.
|
|
6126
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6126
6127
|
|
|
6127
6128
|
/*
|
|
6128
6129
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6189,7 +6190,7 @@
|
|
|
6189
6190
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6190
6191
|
}
|
|
6191
6192
|
|
|
6192
|
-
/*! @azure/msal-common v16.
|
|
6193
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6193
6194
|
|
|
6194
6195
|
/*
|
|
6195
6196
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6208,7 +6209,7 @@
|
|
|
6208
6209
|
}
|
|
6209
6210
|
}
|
|
6210
6211
|
|
|
6211
|
-
/*! @azure/msal-common v16.
|
|
6212
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6212
6213
|
|
|
6213
6214
|
/*
|
|
6214
6215
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6279,7 +6280,7 @@
|
|
|
6279
6280
|
}
|
|
6280
6281
|
}
|
|
6281
6282
|
|
|
6282
|
-
/*! @azure/msal-common v16.
|
|
6283
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6283
6284
|
|
|
6284
6285
|
/*
|
|
6285
6286
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6707,7 +6708,7 @@
|
|
|
6707
6708
|
return baseAccount;
|
|
6708
6709
|
}
|
|
6709
6710
|
|
|
6710
|
-
/*! @azure/msal-common v16.
|
|
6711
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6711
6712
|
/*
|
|
6712
6713
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6713
6714
|
* Licensed under the MIT License.
|
|
@@ -6717,7 +6718,7 @@
|
|
|
6717
6718
|
UPN: "UPN",
|
|
6718
6719
|
};
|
|
6719
6720
|
|
|
6720
|
-
/*! @azure/msal-common v16.
|
|
6721
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6721
6722
|
/*
|
|
6722
6723
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6723
6724
|
* Licensed under the MIT License.
|
|
@@ -6736,7 +6737,7 @@
|
|
|
6736
6737
|
}
|
|
6737
6738
|
}
|
|
6738
6739
|
|
|
6739
|
-
/*! @azure/msal-common v16.
|
|
6740
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6740
6741
|
|
|
6741
6742
|
/*
|
|
6742
6743
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6760,7 +6761,7 @@
|
|
|
6760
6761
|
};
|
|
6761
6762
|
}
|
|
6762
6763
|
|
|
6763
|
-
/*! @azure/msal-common v16.
|
|
6764
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6764
6765
|
|
|
6765
6766
|
/*
|
|
6766
6767
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6850,7 +6851,7 @@
|
|
|
6850
6851
|
return undefined;
|
|
6851
6852
|
}
|
|
6852
6853
|
|
|
6853
|
-
/*! @azure/msal-common v16.
|
|
6854
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6854
6855
|
|
|
6855
6856
|
/*
|
|
6856
6857
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6881,7 +6882,7 @@
|
|
|
6881
6882
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6882
6883
|
}
|
|
6883
6884
|
|
|
6884
|
-
/*! @azure/msal-common v16.
|
|
6885
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
6885
6886
|
|
|
6886
6887
|
/*
|
|
6887
6888
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7015,7 +7016,7 @@
|
|
|
7015
7016
|
return response;
|
|
7016
7017
|
}
|
|
7017
7018
|
|
|
7018
|
-
/*! @azure/msal-common v16.
|
|
7019
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7019
7020
|
|
|
7020
7021
|
/*
|
|
7021
7022
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7283,7 +7284,7 @@
|
|
|
7283
7284
|
}
|
|
7284
7285
|
}
|
|
7285
7286
|
|
|
7286
|
-
/*! @azure/msal-common v16.
|
|
7287
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7287
7288
|
|
|
7288
7289
|
/*
|
|
7289
7290
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7513,7 +7514,7 @@
|
|
|
7513
7514
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7514
7515
|
}
|
|
7515
7516
|
|
|
7516
|
-
/*! @azure/msal-common v16.
|
|
7517
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7517
7518
|
|
|
7518
7519
|
/*
|
|
7519
7520
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7748,7 +7749,7 @@
|
|
|
7748
7749
|
}
|
|
7749
7750
|
}
|
|
7750
7751
|
|
|
7751
|
-
/*! @azure/msal-common v16.
|
|
7752
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
7752
7753
|
|
|
7753
7754
|
/*
|
|
7754
7755
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8041,7 +8042,7 @@
|
|
|
8041
8042
|
clearNativeBrokerErrorCode() { }
|
|
8042
8043
|
}
|
|
8043
8044
|
|
|
8044
|
-
/*! @azure/msal-common v16.
|
|
8045
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8045
8046
|
|
|
8046
8047
|
/*
|
|
8047
8048
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8168,7 +8169,7 @@
|
|
|
8168
8169
|
}
|
|
8169
8170
|
}
|
|
8170
8171
|
|
|
8171
|
-
/*! @azure/msal-common v16.
|
|
8172
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8172
8173
|
|
|
8173
8174
|
/*
|
|
8174
8175
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8184,7 +8185,7 @@
|
|
|
8184
8185
|
},
|
|
8185
8186
|
};
|
|
8186
8187
|
|
|
8187
|
-
/*! @azure/msal-common v16.
|
|
8188
|
+
/*! @azure/msal-common v16.17.0 2026-11-18 */
|
|
8188
8189
|
|
|
8189
8190
|
/*
|
|
8190
8191
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8636,7 +8637,7 @@
|
|
|
8636
8637
|
|
|
8637
8638
|
/* eslint-disable header/header */
|
|
8638
8639
|
const name = "@azure/msal-browser";
|
|
8639
|
-
const version = "5.
|
|
8640
|
+
const version = "5.30.0";
|
|
8640
8641
|
|
|
8641
8642
|
/*
|
|
8642
8643
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9280,6 +9281,13 @@
|
|
|
9280
9281
|
const Encrypt = "encrypt";
|
|
9281
9282
|
const Decrypt = "decrypt";
|
|
9282
9283
|
const GenerateEarKey = "generateEarKey";
|
|
9284
|
+
const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
|
|
9285
|
+
const ImportAsymmetricEarKey = "importAsymmetricEarKey";
|
|
9286
|
+
const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
|
|
9287
|
+
const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
|
|
9288
|
+
const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
|
|
9289
|
+
const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
|
|
9290
|
+
const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
|
|
9283
9291
|
const DecryptEarResponse = "decryptEarResponse";
|
|
9284
9292
|
/**
|
|
9285
9293
|
* Background telemetry measurement that tracks whether a late bridge response
|
|
@@ -9340,6 +9348,7 @@
|
|
|
9340
9348
|
const failedToBuildHeaders = "failed_to_build_headers";
|
|
9341
9349
|
const failedToParseHeaders = "failed_to_parse_headers";
|
|
9342
9350
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
9351
|
+
const asymmetricEarKeyError = "asymmetric_ear_key_error";
|
|
9343
9352
|
const timedOut = "timed_out";
|
|
9344
9353
|
const emptyResponse = "empty_response";
|
|
9345
9354
|
|
|
@@ -9648,6 +9657,10 @@
|
|
|
9648
9657
|
const S256_HASH_ALG = "SHA-256";
|
|
9649
9658
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
9650
9659
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
9660
|
+
const ECDH_P384_ALGORITHM = {
|
|
9661
|
+
name: "ECDH",
|
|
9662
|
+
namedCurve: "P-384",
|
|
9663
|
+
};
|
|
9651
9664
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
9652
9665
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
9653
9666
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -9785,6 +9798,16 @@
|
|
|
9785
9798
|
async function exportJwk(key) {
|
|
9786
9799
|
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
9787
9800
|
}
|
|
9801
|
+
/**
|
|
9802
|
+
* Imports key as Json Web Key (JWK), can set extractable and usages.
|
|
9803
|
+
* @param key
|
|
9804
|
+
* @param extractable
|
|
9805
|
+
* @param usages
|
|
9806
|
+
* @param algorithm
|
|
9807
|
+
*/
|
|
9808
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9809
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9810
|
+
}
|
|
9788
9811
|
/**
|
|
9789
9812
|
* Signs given data with given key.
|
|
9790
9813
|
* @param key
|
|
@@ -9807,6 +9830,172 @@
|
|
|
9807
9830
|
};
|
|
9808
9831
|
return base64Encode(JSON.stringify(jwk));
|
|
9809
9832
|
}
|
|
9833
|
+
/**
|
|
9834
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
9835
|
+
* @internal
|
|
9836
|
+
*/
|
|
9837
|
+
async function generateAsymmetricEarKey() {
|
|
9838
|
+
const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9839
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
9840
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
9841
|
+
return {
|
|
9842
|
+
privateJwk,
|
|
9843
|
+
publicJwk,
|
|
9844
|
+
};
|
|
9845
|
+
}
|
|
9846
|
+
/**
|
|
9847
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
9848
|
+
* @internal
|
|
9849
|
+
*/
|
|
9850
|
+
async function importAsymmetricEarKey(privateJwk, correlationId = "") {
|
|
9851
|
+
if (privateJwk?.kty !== "EC" ||
|
|
9852
|
+
privateJwk.crv !== "P-384" ||
|
|
9853
|
+
!privateJwk.d) {
|
|
9854
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
|
|
9855
|
+
}
|
|
9856
|
+
try {
|
|
9857
|
+
return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9858
|
+
}
|
|
9859
|
+
catch {
|
|
9860
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
|
|
9861
|
+
}
|
|
9862
|
+
}
|
|
9863
|
+
/**
|
|
9864
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
9865
|
+
* @internal
|
|
9866
|
+
*/
|
|
9867
|
+
function generateAsymmetricEarApv(publicJwk) {
|
|
9868
|
+
const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
|
|
9869
|
+
if (point.length !== 97) {
|
|
9870
|
+
throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
|
|
9871
|
+
}
|
|
9872
|
+
const nonce = new Uint8Array(24);
|
|
9873
|
+
window.crypto.getRandomValues(nonce);
|
|
9874
|
+
return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
|
|
9875
|
+
}
|
|
9876
|
+
/**
|
|
9877
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
9878
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
9879
|
+
* @internal
|
|
9880
|
+
*/
|
|
9881
|
+
async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
|
|
9882
|
+
const correlationId = telemetry?.correlationId || "";
|
|
9883
|
+
const measure = (eventName, operation) => telemetry
|
|
9884
|
+
? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
|
|
9885
|
+
: operation();
|
|
9886
|
+
if (apv !== requestApv) {
|
|
9887
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
|
|
9888
|
+
}
|
|
9889
|
+
const parts = earJwe.split(".");
|
|
9890
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
9891
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9892
|
+
}
|
|
9893
|
+
let header;
|
|
9894
|
+
try {
|
|
9895
|
+
header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
|
|
9896
|
+
}
|
|
9897
|
+
catch {
|
|
9898
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9899
|
+
}
|
|
9900
|
+
if (!header ||
|
|
9901
|
+
header.alg !== "ECDH-ES" ||
|
|
9902
|
+
header.enc !== "A256GCM" ||
|
|
9903
|
+
header.crit !== undefined ||
|
|
9904
|
+
header.zip !== undefined ||
|
|
9905
|
+
header.epk?.kty !== "EC" ||
|
|
9906
|
+
header.epk.crv !== "P-384" ||
|
|
9907
|
+
header.epk.d !== undefined ||
|
|
9908
|
+
(header.apv !== undefined && header.apv !== apv)) {
|
|
9909
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9910
|
+
}
|
|
9911
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
9912
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
9913
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
9914
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
9915
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
9916
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
9917
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
9918
|
+
if (x.length !== 48 ||
|
|
9919
|
+
y.length !== 48 ||
|
|
9920
|
+
iv.length !== 12 ||
|
|
9921
|
+
tag.length !== 16) {
|
|
9922
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9923
|
+
}
|
|
9924
|
+
let key;
|
|
9925
|
+
try {
|
|
9926
|
+
const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
|
|
9927
|
+
const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
|
|
9928
|
+
kty: "EC",
|
|
9929
|
+
crv: "P-384",
|
|
9930
|
+
x: header.epk.x,
|
|
9931
|
+
y: header.epk.y,
|
|
9932
|
+
}, false, [], ECDH_P384_ALGORITHM));
|
|
9933
|
+
const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
|
|
9934
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
9935
|
+
const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
|
|
9936
|
+
let derivedKey;
|
|
9937
|
+
try {
|
|
9938
|
+
derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
|
|
9939
|
+
}
|
|
9940
|
+
finally {
|
|
9941
|
+
secret.fill(0);
|
|
9942
|
+
input.fill(0);
|
|
9943
|
+
}
|
|
9944
|
+
try {
|
|
9945
|
+
key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
|
|
9946
|
+
}
|
|
9947
|
+
finally {
|
|
9948
|
+
new Uint8Array(derivedKey).fill(0);
|
|
9949
|
+
}
|
|
9950
|
+
}
|
|
9951
|
+
catch (error) {
|
|
9952
|
+
if (error instanceof AuthError) {
|
|
9953
|
+
throw error;
|
|
9954
|
+
}
|
|
9955
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
|
|
9956
|
+
}
|
|
9957
|
+
try {
|
|
9958
|
+
const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
|
|
9959
|
+
name: AES_GCM,
|
|
9960
|
+
iv,
|
|
9961
|
+
tagLength: 128,
|
|
9962
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
9963
|
+
}, key, concatEarBytes(ciphertext, tag)));
|
|
9964
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
9965
|
+
}
|
|
9966
|
+
catch {
|
|
9967
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
|
|
9968
|
+
}
|
|
9969
|
+
}
|
|
9970
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
9971
|
+
function decodeEarBase64Url(value, correlationId = "") {
|
|
9972
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
9973
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
9974
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9975
|
+
}
|
|
9976
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
9977
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
9978
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9979
|
+
}
|
|
9980
|
+
return bytes;
|
|
9981
|
+
}
|
|
9982
|
+
function earUint32(value) {
|
|
9983
|
+
const bytes = new Uint8Array(4);
|
|
9984
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
9985
|
+
return bytes;
|
|
9986
|
+
}
|
|
9987
|
+
function concatEarBytes(...parts) {
|
|
9988
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
9989
|
+
let offset = 0;
|
|
9990
|
+
for (const part of parts) {
|
|
9991
|
+
bytes.set(part, offset);
|
|
9992
|
+
offset += part.length;
|
|
9993
|
+
}
|
|
9994
|
+
return bytes.buffer;
|
|
9995
|
+
}
|
|
9996
|
+
function lengthPrefixEarBytes(bytes) {
|
|
9997
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
9998
|
+
}
|
|
9810
9999
|
/**
|
|
9811
10000
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
9812
10001
|
* @param earJwk
|
|
@@ -20751,8 +20940,7 @@
|
|
|
20751
20940
|
}
|
|
20752
20941
|
}
|
|
20753
20942
|
catch (e) {
|
|
20754
|
-
this.logger.
|
|
20755
|
-
this.logger.error(`Parsing cached token request threw with error: '${e}'`, correlationId);
|
|
20943
|
+
this.logger.error("Unable to parse cached token request", correlationId);
|
|
20756
20944
|
throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
|
|
20757
20945
|
}
|
|
20758
20946
|
return [parsedRequest, verifier];
|
|
@@ -21227,30 +21415,42 @@
|
|
|
21227
21415
|
* page (see `runPopupRelay`) back to the embedded frame that opened it. See
|
|
21228
21416
|
* {@link BrowserAuthOptions.popupRelayUri}.
|
|
21229
21417
|
*
|
|
21230
|
-
*
|
|
21231
|
-
*
|
|
21232
|
-
* pulling in the other's dependencies.
|
|
21418
|
+
* Shared by the relay-page entry and client helpers without importing either
|
|
21419
|
+
* implementation into the other bundle.
|
|
21233
21420
|
*
|
|
21234
21421
|
* @internal
|
|
21235
21422
|
*/
|
|
21236
|
-
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
21423
|
+
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
21424
|
+
/** @internal Response bound to an authenticated v2 relay document. */
|
|
21425
|
+
const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
|
|
21426
|
+
/** @internal Ready signal for the authenticated popup-relay request handoff. */
|
|
21427
|
+
const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
|
|
21428
|
+
/** @internal Request delivered only to the same-origin relay window. */
|
|
21429
|
+
const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
|
|
21430
|
+
/** @internal Resolve the compatibility default without downgrading invalid versions. */
|
|
21431
|
+
function getPopupRelayProtocolVersion(version, correlationId = "") {
|
|
21432
|
+
if (version === undefined) {
|
|
21433
|
+
return 1;
|
|
21434
|
+
}
|
|
21435
|
+
if (version !== 1 && version !== 2) {
|
|
21436
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
|
|
21437
|
+
}
|
|
21438
|
+
return version;
|
|
21439
|
+
}
|
|
21237
21440
|
|
|
21238
21441
|
/*
|
|
21239
21442
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
21240
21443
|
* Licensed under the MIT License.
|
|
21241
21444
|
*/
|
|
21242
21445
|
/**
|
|
21243
|
-
* Builds the
|
|
21244
|
-
*
|
|
21245
|
-
*
|
|
21246
|
-
* library-state `id` so the relay page can listen on the right BroadcastChannel
|
|
21247
|
-
* and echo the id back. The relay URI is resolved against the app origin, so it
|
|
21248
|
-
* must be same-origin as the embedded frame. See `runPopupRelay`.
|
|
21446
|
+
* Builds the same-origin relay URL. V1 preserves the fragment descriptor;
|
|
21447
|
+
* explicitly selected v2 carries only the id and retains the navigation for
|
|
21448
|
+
* the authenticated handoff.
|
|
21249
21449
|
*
|
|
21250
21450
|
* @internal
|
|
21251
21451
|
*/
|
|
21252
|
-
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
21253
|
-
const
|
|
21452
|
+
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
|
|
21453
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
|
|
21254
21454
|
const target = new URL(popupRelayUri, window.location.origin);
|
|
21255
21455
|
/*
|
|
21256
21456
|
* The relay page must be same-origin as the embedded frame: the response is
|
|
@@ -21263,7 +21463,12 @@
|
|
|
21263
21463
|
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
|
|
21264
21464
|
}
|
|
21265
21465
|
const hashParams = new URLSearchParams();
|
|
21266
|
-
|
|
21466
|
+
if (version === 1) {
|
|
21467
|
+
hashParams.set("req", JSON.stringify({ id, ...action }));
|
|
21468
|
+
}
|
|
21469
|
+
else {
|
|
21470
|
+
hashParams.set("id", id);
|
|
21471
|
+
}
|
|
21267
21472
|
target.hash = hashParams.toString();
|
|
21268
21473
|
return target.toString();
|
|
21269
21474
|
}
|
|
@@ -21274,21 +21479,30 @@
|
|
|
21274
21479
|
* partitioning blocks the BroadcastChannel the redirect bridge uses from
|
|
21275
21480
|
* reaching the embedded frame.
|
|
21276
21481
|
*
|
|
21277
|
-
*
|
|
21278
|
-
*
|
|
21279
|
-
*
|
|
21482
|
+
* In v2, the retained navigation is sent once, after a ready signal from the popup
|
|
21483
|
+
* window we opened on our own origin with the matching library-state id.
|
|
21484
|
+
* Successful responses must also carry that handoff's relay-document nonce.
|
|
21485
|
+
* Setup failures can reject the request before the handoff completes.
|
|
21280
21486
|
*
|
|
21281
21487
|
* @internal
|
|
21282
21488
|
*/
|
|
21283
|
-
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
|
|
21489
|
+
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
|
|
21490
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
|
|
21491
|
+
if (version === 2 && !action) {
|
|
21492
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
|
|
21493
|
+
}
|
|
21284
21494
|
return new Promise((resolve, reject) => {
|
|
21285
21495
|
const correlationId = request.correlationId;
|
|
21286
21496
|
logger.verbose("PopupRelay.waitForPopupRelayResponse - started", correlationId);
|
|
21287
|
-
performanceClient.addFields({
|
|
21497
|
+
performanceClient.addFields({
|
|
21498
|
+
redirectBridgeTimeoutMs: timeoutMs,
|
|
21499
|
+
popupRelayProtocolVersion: version,
|
|
21500
|
+
}, correlationId);
|
|
21288
21501
|
const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
|
|
21289
21502
|
const expectedId = libraryState.id;
|
|
21290
21503
|
const expectedOrigin = window.location.origin;
|
|
21291
21504
|
let settled = false;
|
|
21505
|
+
let handoffNonce = "";
|
|
21292
21506
|
const cleanup = () => {
|
|
21293
21507
|
window.removeEventListener("message", onMessage);
|
|
21294
21508
|
clearTimeout(timeoutId);
|
|
@@ -21300,20 +21514,52 @@
|
|
|
21300
21514
|
return;
|
|
21301
21515
|
}
|
|
21302
21516
|
const data = event.data;
|
|
21303
|
-
if (!data ||
|
|
21304
|
-
data.type !== POPUP_RELAY_RESPONSE_TYPE ||
|
|
21305
|
-
data.id !== expectedId) {
|
|
21517
|
+
if (!data || data.id !== expectedId) {
|
|
21306
21518
|
return;
|
|
21307
21519
|
}
|
|
21308
21520
|
if (settled) {
|
|
21309
21521
|
return;
|
|
21310
21522
|
}
|
|
21523
|
+
if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
|
|
21524
|
+
if (handoffNonce ||
|
|
21525
|
+
typeof data.nonce !== "string" ||
|
|
21526
|
+
!data.nonce) {
|
|
21527
|
+
return;
|
|
21528
|
+
}
|
|
21529
|
+
handoffNonce = data.nonce;
|
|
21530
|
+
try {
|
|
21531
|
+
popupWindow.postMessage({
|
|
21532
|
+
type: POPUP_RELAY_REQUEST_TYPE,
|
|
21533
|
+
id: expectedId,
|
|
21534
|
+
nonce: handoffNonce,
|
|
21535
|
+
request: { id: expectedId, ...action },
|
|
21536
|
+
}, expectedOrigin);
|
|
21537
|
+
performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
|
|
21538
|
+
}
|
|
21539
|
+
catch {
|
|
21540
|
+
settled = true;
|
|
21541
|
+
cleanup();
|
|
21542
|
+
logger.error("PopupRelay.waitForPopupRelayResponse - request handoff failed", correlationId);
|
|
21543
|
+
reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
|
|
21544
|
+
}
|
|
21545
|
+
return;
|
|
21546
|
+
}
|
|
21547
|
+
const hasError = typeof data.error === "string" && data.error.length > 0;
|
|
21548
|
+
const responseType = version === 1
|
|
21549
|
+
? POPUP_RELAY_RESPONSE_TYPE
|
|
21550
|
+
: POPUP_RELAY_V2_RESPONSE_TYPE;
|
|
21551
|
+
if (data.type !== responseType ||
|
|
21552
|
+
(version === 2 &&
|
|
21553
|
+
((!handoffNonce && !hasError) ||
|
|
21554
|
+
(handoffNonce && data.nonce !== handoffNonce)))) {
|
|
21555
|
+
return;
|
|
21556
|
+
}
|
|
21311
21557
|
settled = true;
|
|
21312
21558
|
cleanup();
|
|
21313
|
-
if (
|
|
21314
|
-
reject(createBrowserAuthError(data.error, correlationId));
|
|
21559
|
+
if (hasError) {
|
|
21560
|
+
reject(createBrowserAuthError(data.error, correlationId, data.subError));
|
|
21315
21561
|
}
|
|
21316
|
-
else if (data.payload) {
|
|
21562
|
+
else if (typeof data.payload === "string" && data.payload) {
|
|
21317
21563
|
resolve(data.payload);
|
|
21318
21564
|
}
|
|
21319
21565
|
else {
|
|
@@ -22981,6 +23227,36 @@
|
|
|
22981
23227
|
addCorrelationId(queryParams, request.correlationId);
|
|
22982
23228
|
return getAuthorizeUrl(authority, queryParams);
|
|
22983
23229
|
}
|
|
23230
|
+
/**
|
|
23231
|
+
* Prepares the selected EAR construction.
|
|
23232
|
+
* @internal
|
|
23233
|
+
*/
|
|
23234
|
+
async function initializeEarRequest(config, request, logger, performanceClient) {
|
|
23235
|
+
if (!config.experimental.enableAsymmetricEar) {
|
|
23236
|
+
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
|
|
23237
|
+
return {
|
|
23238
|
+
...request,
|
|
23239
|
+
earJwk,
|
|
23240
|
+
asymmetricEar: undefined,
|
|
23241
|
+
};
|
|
23242
|
+
}
|
|
23243
|
+
try {
|
|
23244
|
+
const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
|
|
23245
|
+
const apv = generateAsymmetricEarApv(publicJwk);
|
|
23246
|
+
const earJwk = base64Encode(JSON.stringify(publicJwk));
|
|
23247
|
+
return {
|
|
23248
|
+
...request,
|
|
23249
|
+
earJwk,
|
|
23250
|
+
asymmetricEar: { privateJwk, apv },
|
|
23251
|
+
};
|
|
23252
|
+
}
|
|
23253
|
+
catch (error) {
|
|
23254
|
+
if (error instanceof AuthError) {
|
|
23255
|
+
throw error;
|
|
23256
|
+
}
|
|
23257
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
|
|
23258
|
+
}
|
|
23259
|
+
}
|
|
22984
23260
|
/**
|
|
22985
23261
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
22986
23262
|
*/
|
|
@@ -22990,7 +23266,18 @@
|
|
|
22990
23266
|
}
|
|
22991
23267
|
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
22992
23268
|
addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
22993
|
-
|
|
23269
|
+
try {
|
|
23270
|
+
addEARParameters(parameters, request.earJwk, request.asymmetricEar
|
|
23271
|
+
? base64Encode(JSON.stringify({
|
|
23272
|
+
alg: "ECDH-ES",
|
|
23273
|
+
enc: "A256GCM",
|
|
23274
|
+
apv: request.asymmetricEar.apv,
|
|
23275
|
+
}))
|
|
23276
|
+
: undefined);
|
|
23277
|
+
}
|
|
23278
|
+
catch {
|
|
23279
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
|
|
23280
|
+
}
|
|
22994
23281
|
// Also add codeChallenge as backup in case EAR is not supported
|
|
22995
23282
|
addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
|
|
22996
23283
|
addExtraParameters(parameters, {
|
|
@@ -23074,12 +23361,14 @@
|
|
|
23074
23361
|
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
23075
23362
|
const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
|
|
23076
23363
|
const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
|
|
23364
|
+
const brokerRequest = {
|
|
23365
|
+
...request,
|
|
23366
|
+
state: userRequestState,
|
|
23367
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
23368
|
+
};
|
|
23369
|
+
delete brokerRequest.asymmetricEar;
|
|
23077
23370
|
try {
|
|
23078
|
-
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(
|
|
23079
|
-
...request,
|
|
23080
|
-
state: userRequestState,
|
|
23081
|
-
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
23082
|
-
});
|
|
23371
|
+
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
|
|
23083
23372
|
}
|
|
23084
23373
|
catch (e) {
|
|
23085
23374
|
await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
|
|
@@ -23144,7 +23433,20 @@
|
|
|
23144
23433
|
if (!request.earJwk) {
|
|
23145
23434
|
throw createBrowserAuthError(earJwkEmpty, request.correlationId);
|
|
23146
23435
|
}
|
|
23147
|
-
|
|
23436
|
+
let plaintext;
|
|
23437
|
+
if (request.asymmetricEar) {
|
|
23438
|
+
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 });
|
|
23439
|
+
}
|
|
23440
|
+
else {
|
|
23441
|
+
plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
|
|
23442
|
+
}
|
|
23443
|
+
let decryptedData;
|
|
23444
|
+
try {
|
|
23445
|
+
decryptedData = JSON.parse(plaintext);
|
|
23446
|
+
}
|
|
23447
|
+
catch {
|
|
23448
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
|
|
23449
|
+
}
|
|
23148
23450
|
if (decryptedData.accountId) {
|
|
23149
23451
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
23150
23452
|
}
|
|
@@ -23435,6 +23737,7 @@
|
|
|
23435
23737
|
: "",
|
|
23436
23738
|
postLogoutRedirectUri: "",
|
|
23437
23739
|
popupRelayUri: "",
|
|
23740
|
+
popupRelayProtocolVersion: 1,
|
|
23438
23741
|
clientCapabilities: [],
|
|
23439
23742
|
OIDCOptions: {
|
|
23440
23743
|
responseMode: ResponseMode.FRAGMENT,
|
|
@@ -23501,6 +23804,7 @@
|
|
|
23501
23804
|
client: new StubPerformanceClient(),
|
|
23502
23805
|
};
|
|
23503
23806
|
const DEFAULT_EXPERIMENTAL_OPTIONS = {
|
|
23807
|
+
enableAsymmetricEar: false,
|
|
23504
23808
|
iframeTimeoutTelemetry: false,
|
|
23505
23809
|
allowPlatformBrokerWithDOM: false,
|
|
23506
23810
|
};
|
|
@@ -23554,9 +23858,16 @@
|
|
|
23554
23858
|
experimental: {
|
|
23555
23859
|
...DEFAULT_EXPERIMENTAL_OPTIONS,
|
|
23556
23860
|
...userInputExperimental,
|
|
23861
|
+
enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
|
|
23557
23862
|
},
|
|
23558
23863
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
|
|
23559
23864
|
};
|
|
23865
|
+
if (overlayedConfig.experimental.enableAsymmetricEar &&
|
|
23866
|
+
overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
|
|
23867
|
+
const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
23868
|
+
logger.warning("experimental.enableAsymmetricEar is ignored because system.protocolMode is not ProtocolMode.EAR.", "");
|
|
23869
|
+
overlayedConfig.experimental.enableAsymmetricEar = false;
|
|
23870
|
+
}
|
|
23560
23871
|
return overlayedConfig;
|
|
23561
23872
|
}
|
|
23562
23873
|
|
|
@@ -24444,19 +24755,21 @@
|
|
|
24444
24755
|
/*
|
|
24445
24756
|
* When a popup-relay page is configured, open it top-level
|
|
24446
24757
|
* (same first-party origin) instead of navigating the popup
|
|
24447
|
-
* straight to the IdP
|
|
24758
|
+
* straight to the IdP. V1 carries the action in the hash; v2
|
|
24759
|
+
* retains it for the authenticated handoff.
|
|
24448
24760
|
* The relay page opens the IdP child popup and relays the
|
|
24449
24761
|
* response back via postMessage (see waitForPopupResponse).
|
|
24450
24762
|
*/
|
|
24451
24763
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
24764
|
+
popupParams.relayAction = { method: "GET", url: navigateUrl };
|
|
24452
24765
|
const popupNavigateUrl = popupRelayUri
|
|
24453
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId),
|
|
24766
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
24454
24767
|
: navigateUrl;
|
|
24455
24768
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
24456
24769
|
const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
|
|
24457
24770
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, InteractionType.Popup, { popupWindow }, null);
|
|
24458
24771
|
// Wait for the redirect bridge response
|
|
24459
|
-
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
|
|
24772
|
+
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24460
24773
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24461
24774
|
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);
|
|
24462
24775
|
}
|
|
@@ -24480,21 +24793,20 @@
|
|
|
24480
24793
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
24481
24794
|
// Get the frame handle for the silent request
|
|
24482
24795
|
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);
|
|
24483
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
24484
24796
|
const pkce = pkceCodes ||
|
|
24485
24797
|
(await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
|
|
24486
24798
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24487
|
-
|
|
24799
|
+
let popupRequest = {
|
|
24488
24800
|
...request,
|
|
24489
|
-
earJwk: earJwk,
|
|
24490
24801
|
codeChallenge: pkce.challenge,
|
|
24491
24802
|
...tokenBindingParams,
|
|
24492
24803
|
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
24493
24804
|
};
|
|
24494
24805
|
try {
|
|
24806
|
+
popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
|
|
24495
24807
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
24496
24808
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
24497
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
24809
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24498
24810
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24499
24811
|
if (!serverParams.ear_jwe && serverParams.code) {
|
|
24500
24812
|
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
|
|
@@ -24522,7 +24834,7 @@
|
|
|
24522
24834
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
|
|
24523
24835
|
const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
|
|
24524
24836
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
24525
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
|
|
24837
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24526
24838
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24527
24839
|
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);
|
|
24528
24840
|
}
|
|
@@ -24578,21 +24890,22 @@
|
|
|
24578
24890
|
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, InteractionType.Popup, validRequest);
|
|
24579
24891
|
/*
|
|
24580
24892
|
* When a popup-relay page is configured, open it top-level (same
|
|
24581
|
-
* first-party origin)
|
|
24582
|
-
*
|
|
24893
|
+
* first-party origin), using the configured wire protocol for the
|
|
24894
|
+
* end-session URL. The relay page opens the IdP child
|
|
24583
24895
|
* popup and the post-logout redirect page (running the redirect
|
|
24584
24896
|
* bridge) relays completion back via postMessage — so logout works
|
|
24585
24897
|
* from an embedded, cross-origin iframe where a direct popup to the
|
|
24586
24898
|
* IdP cannot. See runPopupRelay / waitForPopupResponse.
|
|
24587
24899
|
*/
|
|
24588
24900
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
24901
|
+
popupParams.relayAction = { method: "GET", url: logoutUri };
|
|
24589
24902
|
const popupNavigateUrl = popupRelayUri
|
|
24590
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId),
|
|
24903
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
24591
24904
|
: logoutUri;
|
|
24592
24905
|
// Open the popup window to requestUrl.
|
|
24593
24906
|
const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
|
|
24594
24907
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, InteractionType.Popup, { popupWindow }, null);
|
|
24595
|
-
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
|
|
24908
|
+
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
|
|
24596
24909
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
24597
24910
|
});
|
|
24598
24911
|
if (mainWindowRedirectUri) {
|
|
@@ -24804,11 +25117,12 @@
|
|
|
24804
25117
|
? getEARFormData
|
|
24805
25118
|
: getCodeFormData;
|
|
24806
25119
|
const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
|
|
24807
|
-
|
|
25120
|
+
popupParams.relayAction = {
|
|
24808
25121
|
method: "POST",
|
|
24809
25122
|
action: formData.action,
|
|
24810
25123
|
fields: formData.fields,
|
|
24811
|
-
}
|
|
25124
|
+
};
|
|
25125
|
+
const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
|
|
24812
25126
|
return this.initiateAuthRequest(relayUrl, popupParams);
|
|
24813
25127
|
}
|
|
24814
25128
|
const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
@@ -24817,7 +25131,7 @@
|
|
|
24817
25131
|
form.submit();
|
|
24818
25132
|
return popupWindow;
|
|
24819
25133
|
}
|
|
24820
|
-
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
25134
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
|
|
24821
25135
|
/*
|
|
24822
25136
|
* When a popup-relay page is configured the response is relayed back to
|
|
24823
25137
|
* this frame by the relay page via postMessage, and the relay popup's
|
|
@@ -24827,7 +25141,11 @@
|
|
|
24827
25141
|
* frame and which does not track the relay popup.
|
|
24828
25142
|
*/
|
|
24829
25143
|
if (this.config.auth.popupRelayUri) {
|
|
24830
|
-
|
|
25144
|
+
if (this.config.auth.popupRelayProtocolVersion === 2 &&
|
|
25145
|
+
!relayAction) {
|
|
25146
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
|
|
25147
|
+
}
|
|
25148
|
+
return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
|
|
24831
25149
|
}
|
|
24832
25150
|
if (this.waitForPopupResponseHook) {
|
|
24833
25151
|
return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
|
|
@@ -24952,16 +25270,15 @@
|
|
|
24952
25270
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
24953
25271
|
// Get the frame handle for the silent request
|
|
24954
25272
|
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);
|
|
24955
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
24956
25273
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
24957
25274
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24958
|
-
|
|
25275
|
+
let redirectRequest = {
|
|
24959
25276
|
...request,
|
|
24960
|
-
earJwk: earJwk,
|
|
24961
25277
|
codeChallenge: pkceCodes.challenge,
|
|
24962
25278
|
...tokenBindingParams,
|
|
24963
25279
|
};
|
|
24964
25280
|
try {
|
|
25281
|
+
redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
|
|
24965
25282
|
if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
|
|
24966
25283
|
throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
|
|
24967
25284
|
}
|
|
@@ -24974,9 +25291,10 @@
|
|
|
24974
25291
|
}, this.config.system.redirectNavigationTimeout);
|
|
24975
25292
|
});
|
|
24976
25293
|
}
|
|
24977
|
-
catch (
|
|
25294
|
+
catch (error) {
|
|
25295
|
+
this.browserStorage.resetRequestCache(correlationId);
|
|
24978
25296
|
await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24979
|
-
throw
|
|
25297
|
+
throw error;
|
|
24980
25298
|
}
|
|
24981
25299
|
}
|
|
24982
25300
|
/**
|
|
@@ -25165,7 +25483,6 @@
|
|
|
25165
25483
|
/**
|
|
25166
25484
|
* Redirects window to given URL.
|
|
25167
25485
|
* @param urlNavigate
|
|
25168
|
-
* @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
|
|
25169
25486
|
*/
|
|
25170
25487
|
async initiateAuthRequest(requestUrl) {
|
|
25171
25488
|
this.logger.verbose("RedirectHandler.initiateAuthRequest called", this.correlationId);
|
|
@@ -25453,13 +25770,11 @@
|
|
|
25453
25770
|
async executeEarFlow(request) {
|
|
25454
25771
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
25455
25772
|
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);
|
|
25456
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
25457
25773
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
25458
|
-
const silentRequest = {
|
|
25774
|
+
const silentRequest = await initializeEarRequest(this.config, {
|
|
25459
25775
|
...request,
|
|
25460
|
-
earJwk: earJwk,
|
|
25461
25776
|
codeChallenge: pkceCodes.challenge,
|
|
25462
|
-
};
|
|
25777
|
+
}, this.logger, this.performanceClient);
|
|
25463
25778
|
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
25464
25779
|
const iframe = createHiddenIframe();
|
|
25465
25780
|
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
@@ -25809,6 +26124,7 @@
|
|
|
25809
26124
|
return {
|
|
25810
26125
|
key: JSON.stringify({
|
|
25811
26126
|
...thumbprint,
|
|
26127
|
+
accountTenantId: account.tenantId,
|
|
25812
26128
|
forceRefresh: !!request.forceRefresh,
|
|
25813
26129
|
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
25814
26130
|
extraParameters: canonicalizeStringDict(request.extraParameters),
|