@azure/msal-browser 5.26.0 → 5.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +54 -14
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +9 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +7 -6
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +4 -2
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +21 -7
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +14 -1
- package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +9 -2
- 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 +32 -4
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +100 -11
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +14 -1
- package/dist/crypto/TokenBindingKeyManager.mjs.map +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 +14 -2
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +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 +68 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +3 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +87 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +5 -3
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +14 -2
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +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 +4 -3
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +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 +246 -73
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +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 +10 -2
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +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 +10 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +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 +118 -25
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +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 +2 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +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 +2 -12
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +2 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +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 +17 -3
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +9 -3
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +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 +3 -1
- package/dist/custom_auth/index.mjs.map +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 +32 -13
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +14 -2
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +9 -2
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +504 -75
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +54 -20
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +30 -16
- 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 +44 -32
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +7 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +79 -19
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +43 -25
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +35 -11
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/request/SilentRequestHelpers.mjs +6 -6
- 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 +3 -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 +7 -2
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +81 -0
- package/dist/utils/IframeMonitor.mjs.map +1 -0
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +119 -0
- package/dist/utils/PopupMonitor.mjs.map +1 -0
- package/dist/utils/PopupOriginCheck.mjs +88 -0
- package/dist/utils/PopupOriginCheck.mjs.map +1 -0
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +71 -11
- package/lib/custom-auth-path/msal-custom-auth.cjs +2085 -451
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +2085 -451
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +39 -11
- package/lib/msal-browser.cjs +1461 -320
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1461 -320
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/app/PublicClientApplication.ts +108 -8
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +15 -0
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +6 -21
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +3 -1
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +12 -8
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +31 -0
- package/src/cache/AsyncMemoryStorage.ts +16 -0
- package/src/cache/BrowserCacheManager.ts +19 -1
- package/src/config/Configuration.ts +63 -6
- package/src/controllers/StandardController.ts +153 -14
- package/src/crypto/TokenBindingKeyManager.ts +21 -0
- package/src/custom_auth/controller/CustomAuthStandardController.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +23 -0
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +1 -1
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +2 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +94 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +7 -2
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +132 -0
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +8 -2
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +13 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +8 -2
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +1 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +445 -91
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +25 -0
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +34 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +9 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +262 -43
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +4 -7
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +21 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +41 -2
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +44 -19
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +4 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +6 -1
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +25 -1
- package/src/custom_auth/core/telemetry/PublicApiId.ts +6 -0
- package/src/custom_auth/index.ts +11 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -7
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +47 -15
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +2 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +2 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +18 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +2 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +13 -0
- package/src/interaction_client/PlatformAuthInteractionClient.ts +851 -128
- package/src/interaction_client/PopupClient.ts +140 -83
- package/src/interaction_client/RedirectClient.ts +88 -35
- package/src/interaction_client/SilentIframeClient.ts +121 -95
- package/src/interaction_client/StandardInteractionClient.ts +6 -0
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +80 -46
- package/src/request/RequestHelpers.ts +64 -11
- package/src/request/SilentRequestHelpers.ts +8 -9
- package/src/telemetry/BrowserPerformanceEvents.ts +1 -0
- package/src/utils/BrowserUtils.ts +8 -1
- package/src/utils/IframeMonitor.ts +98 -0
- package/src/utils/PopupMonitor.ts +158 -0
- package/src/utils/PopupOriginCheck.ts +94 -0
- package/types/app/PublicClientApplication.d.ts +6 -4
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +6 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +21 -0
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/AsyncMemoryStorage.d.ts +5 -0
- package/types/cache/AsyncMemoryStorage.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +4 -0
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +16 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +5 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/crypto/TokenBindingKeyManager.d.ts +9 -0
- package/types/crypto/TokenBindingKeyManager.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +15 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +2 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +22 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +28 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +3 -2
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +9 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -0
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +12 -5
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +17 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +18 -2
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +8 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +8 -2
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +3 -3
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +12 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +29 -2
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +30 -17
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +3 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +3 -2
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +6 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +6 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +5 -0
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +6 -8
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +4 -4
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +2 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +2 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +2 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts +106 -5
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts +12 -0
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/protocol/Authorize.d.ts +4 -4
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/RequestHelpers.d.ts +21 -3
- package/types/request/RequestHelpers.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +1 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/types/utils/BrowserUtils.d.ts +2 -1
- package/types/utils/BrowserUtils.d.ts.map +1 -1
- package/types/utils/IframeMonitor.d.ts +17 -0
- package/types/utils/IframeMonitor.d.ts.map +1 -0
- package/types/utils/PopupMonitor.d.ts +37 -0
- package/types/utils/PopupMonitor.d.ts.map +1 -0
- package/types/utils/PopupOriginCheck.d.ts +27 -0
- package/types/utils/PopupOriginCheck.d.ts.map +1 -0
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from "./StandardInteractionClient.js";
|
|
29
29
|
import {
|
|
30
30
|
getTokenBindingRequestParams,
|
|
31
|
+
removeTokenBindingKeyOnFailure,
|
|
31
32
|
validateRequestMethod,
|
|
32
33
|
} from "../request/RequestHelpers.js";
|
|
33
34
|
import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
|
|
41
42
|
import { NavigationOptions } from "../navigation/NavigationOptions.js";
|
|
42
43
|
import * as BrowserUtils from "../utils/BrowserUtils.js";
|
|
44
|
+
import { computePocd } from "../utils/PopupOriginCheck.js";
|
|
43
45
|
import { shouldUseEar } from "../utils/BrowserDetection.js";
|
|
44
46
|
import * as PopupRelay from "../popup_relay/relayClient.js";
|
|
45
47
|
import { base64Decode } from "../encode/Base64Decode.js";
|
|
@@ -209,6 +211,9 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
209
211
|
logoutRequest?.popupWindowAttributes || {},
|
|
210
212
|
popupWindowParent: logoutRequest?.popupWindowParent ?? window,
|
|
211
213
|
};
|
|
214
|
+
validLogoutRequest.popupOriginCheckDone =
|
|
215
|
+
this.getPopupOriginCheckDone(popupParams.popupWindowParent) ??
|
|
216
|
+
validLogoutRequest.popupOriginCheckDone;
|
|
212
217
|
const authority = logoutRequest && logoutRequest.authority;
|
|
213
218
|
const mainWindowRedirectUri =
|
|
214
219
|
logoutRequest && logoutRequest.mainWindowRedirectUri;
|
|
@@ -358,6 +363,9 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
358
363
|
...request,
|
|
359
364
|
codeChallenge: pkce.challenge,
|
|
360
365
|
...tokenBindingParams,
|
|
366
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(
|
|
367
|
+
popupParams.popupWindowParent
|
|
368
|
+
),
|
|
361
369
|
};
|
|
362
370
|
|
|
363
371
|
try {
|
|
@@ -467,13 +475,20 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
467
475
|
this.eventHandler,
|
|
468
476
|
this.logger,
|
|
469
477
|
this.performanceClient,
|
|
470
|
-
this.platformAuthProvider
|
|
478
|
+
this.platformAuthProvider,
|
|
479
|
+
this.tokenBindingKeyManager
|
|
471
480
|
);
|
|
472
481
|
}
|
|
473
482
|
} catch (e) {
|
|
474
483
|
// Close the synchronous popup if an error is thrown before the window unload event is registered
|
|
475
484
|
popupParams.popup?.close();
|
|
476
485
|
|
|
486
|
+
await removeTokenBindingKeyOnFailure(
|
|
487
|
+
popupRequest,
|
|
488
|
+
this.tokenBindingKeyManager,
|
|
489
|
+
this.logger,
|
|
490
|
+
this.performanceClient
|
|
491
|
+
);
|
|
477
492
|
if (e instanceof AuthError) {
|
|
478
493
|
(e as AuthError).correlationId = this.correlationId;
|
|
479
494
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
@@ -544,101 +559,116 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
544
559
|
earJwk: earJwk,
|
|
545
560
|
codeChallenge: pkce.challenge,
|
|
546
561
|
...tokenBindingParams,
|
|
562
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(
|
|
563
|
+
popupParams.popupWindowParent
|
|
564
|
+
),
|
|
547
565
|
};
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
557
|
-
const responseString = await invokeAsync(
|
|
558
|
-
this.waitForPopupResponse.bind(this),
|
|
559
|
-
BrowserPerformanceEvents.SilentHandlerMonitorIframeForHash,
|
|
560
|
-
this.logger,
|
|
561
|
-
this.performanceClient,
|
|
562
|
-
correlationId
|
|
563
|
-
)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
564
|
-
|
|
565
|
-
const serverParams = invoke(
|
|
566
|
-
ResponseHandler.deserializeResponse,
|
|
567
|
-
BrowserPerformanceEvents.DeserializeResponse,
|
|
568
|
-
this.logger,
|
|
569
|
-
this.performanceClient,
|
|
570
|
-
this.correlationId
|
|
571
|
-
)(
|
|
572
|
-
responseString,
|
|
573
|
-
this.config.auth.OIDCOptions.responseMode,
|
|
574
|
-
this.logger,
|
|
575
|
-
this.correlationId
|
|
576
|
-
);
|
|
566
|
+
try {
|
|
567
|
+
const popupWindow = await this.openPostFormPopup(
|
|
568
|
+
popupRequest,
|
|
569
|
+
discoveredAuthority,
|
|
570
|
+
popupParams,
|
|
571
|
+
correlationId,
|
|
572
|
+
true
|
|
573
|
+
);
|
|
577
574
|
|
|
578
|
-
|
|
579
|
-
const
|
|
580
|
-
this.
|
|
581
|
-
BrowserPerformanceEvents.
|
|
575
|
+
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
576
|
+
const responseString = await invokeAsync(
|
|
577
|
+
this.waitForPopupResponse.bind(this),
|
|
578
|
+
BrowserPerformanceEvents.SilentHandlerMonitorIframeForHash,
|
|
582
579
|
this.logger,
|
|
583
580
|
this.performanceClient,
|
|
584
581
|
correlationId
|
|
585
|
-
)(
|
|
586
|
-
serverTelemetryManager: initializeServerTelemetryManager(
|
|
587
|
-
ApiId.acquireTokenPopup,
|
|
588
|
-
this.config.auth.clientId,
|
|
589
|
-
correlationId,
|
|
590
|
-
this.browserStorage,
|
|
591
|
-
this.logger,
|
|
592
|
-
undefined,
|
|
593
|
-
this.config.system.serverTelemetryEnabled
|
|
594
|
-
),
|
|
595
|
-
requestAuthority: request.authority,
|
|
596
|
-
requestAzureCloudOptions: request.azureCloudOptions,
|
|
597
|
-
requestExtraQueryParameters: request.extraQueryParameters,
|
|
598
|
-
account: request.account,
|
|
599
|
-
authority: discoveredAuthority,
|
|
600
|
-
});
|
|
582
|
+
)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
601
583
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
BrowserPerformanceEvents.
|
|
584
|
+
const serverParams = invoke(
|
|
585
|
+
ResponseHandler.deserializeResponse,
|
|
586
|
+
BrowserPerformanceEvents.DeserializeResponse,
|
|
605
587
|
this.logger,
|
|
606
588
|
this.performanceClient,
|
|
607
|
-
correlationId
|
|
589
|
+
this.correlationId
|
|
608
590
|
)(
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
pkce.verifier,
|
|
612
|
-
ApiId.acquireTokenPopup,
|
|
613
|
-
this.config,
|
|
614
|
-
authClient,
|
|
615
|
-
this.browserStorage,
|
|
616
|
-
this.nativeStorage,
|
|
617
|
-
this.eventHandler,
|
|
591
|
+
responseString,
|
|
592
|
+
this.config.auth.OIDCOptions.responseMode,
|
|
618
593
|
this.logger,
|
|
619
|
-
this.
|
|
620
|
-
this.platformAuthProvider
|
|
594
|
+
this.correlationId
|
|
621
595
|
);
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
596
|
+
|
|
597
|
+
if (!serverParams.ear_jwe && serverParams.code) {
|
|
598
|
+
const authClient = await invokeAsync(
|
|
599
|
+
this.createAuthCodeClient.bind(this),
|
|
600
|
+
BrowserPerformanceEvents.StandardInteractionClientCreateAuthCodeClient,
|
|
601
|
+
this.logger,
|
|
602
|
+
this.performanceClient,
|
|
603
|
+
correlationId
|
|
604
|
+
)({
|
|
605
|
+
serverTelemetryManager: initializeServerTelemetryManager(
|
|
606
|
+
ApiId.acquireTokenPopup,
|
|
607
|
+
this.config.auth.clientId,
|
|
608
|
+
correlationId,
|
|
609
|
+
this.browserStorage,
|
|
610
|
+
this.logger,
|
|
611
|
+
undefined,
|
|
612
|
+
this.config.system.serverTelemetryEnabled
|
|
613
|
+
),
|
|
614
|
+
requestAuthority: request.authority,
|
|
615
|
+
requestAzureCloudOptions: request.azureCloudOptions,
|
|
616
|
+
requestExtraQueryParameters: request.extraQueryParameters,
|
|
617
|
+
account: request.account,
|
|
618
|
+
authority: discoveredAuthority,
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
return await invokeAsync(
|
|
622
|
+
Authorize.handleResponseCode,
|
|
623
|
+
BrowserPerformanceEvents.HandleResponseCode,
|
|
624
|
+
this.logger,
|
|
625
|
+
this.performanceClient,
|
|
626
|
+
correlationId
|
|
627
|
+
)(
|
|
628
|
+
popupRequest,
|
|
629
|
+
serverParams,
|
|
630
|
+
pkce.verifier,
|
|
631
|
+
ApiId.acquireTokenPopup,
|
|
632
|
+
this.config,
|
|
633
|
+
authClient,
|
|
634
|
+
this.browserStorage,
|
|
635
|
+
this.nativeStorage,
|
|
636
|
+
this.eventHandler,
|
|
637
|
+
this.logger,
|
|
638
|
+
this.performanceClient,
|
|
639
|
+
this.platformAuthProvider,
|
|
640
|
+
this.tokenBindingKeyManager
|
|
641
|
+
);
|
|
642
|
+
} else {
|
|
643
|
+
return await invokeAsync(
|
|
644
|
+
Authorize.handleResponseEAR,
|
|
645
|
+
BrowserPerformanceEvents.HandleResponseEar,
|
|
646
|
+
this.logger,
|
|
647
|
+
this.performanceClient,
|
|
648
|
+
correlationId
|
|
649
|
+
)(
|
|
650
|
+
popupRequest,
|
|
651
|
+
serverParams,
|
|
652
|
+
ApiId.acquireTokenPopup,
|
|
653
|
+
this.config,
|
|
654
|
+
discoveredAuthority,
|
|
655
|
+
this.browserStorage,
|
|
656
|
+
this.nativeStorage,
|
|
657
|
+
this.eventHandler,
|
|
658
|
+
this.logger,
|
|
659
|
+
this.performanceClient,
|
|
660
|
+
this.platformAuthProvider,
|
|
661
|
+
this.tokenBindingKeyManager
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
} catch (e) {
|
|
665
|
+
await removeTokenBindingKeyOnFailure(
|
|
630
666
|
popupRequest,
|
|
631
|
-
|
|
632
|
-
ApiId.acquireTokenPopup,
|
|
633
|
-
this.config,
|
|
634
|
-
discoveredAuthority,
|
|
635
|
-
this.browserStorage,
|
|
636
|
-
this.nativeStorage,
|
|
637
|
-
this.eventHandler,
|
|
667
|
+
this.tokenBindingKeyManager,
|
|
638
668
|
this.logger,
|
|
639
|
-
this.performanceClient
|
|
640
|
-
this.platformAuthProvider
|
|
669
|
+
this.performanceClient
|
|
641
670
|
);
|
|
671
|
+
throw e;
|
|
642
672
|
}
|
|
643
673
|
}
|
|
644
674
|
|
|
@@ -712,7 +742,8 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
712
742
|
this.eventHandler,
|
|
713
743
|
this.logger,
|
|
714
744
|
this.performanceClient,
|
|
715
|
-
this.platformAuthProvider
|
|
745
|
+
this.platformAuthProvider,
|
|
746
|
+
this.tokenBindingKeyManager
|
|
716
747
|
);
|
|
717
748
|
}
|
|
718
749
|
|
|
@@ -1144,6 +1175,32 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
1144
1175
|
).libraryState.id;
|
|
1145
1176
|
}
|
|
1146
1177
|
|
|
1178
|
+
/**
|
|
1179
|
+
* Asserts `pocd=1` for the relay flow. Direct popups also require the
|
|
1180
|
+
* environment of a delegated opening window to pass the origin check.
|
|
1181
|
+
*
|
|
1182
|
+
* With a relay the IdP window is a grandchild popup, which an untrusted
|
|
1183
|
+
* ancestor cannot reach by name — so the topology satisfies the check by
|
|
1184
|
+
* construction. The current window is framed and would otherwise compute
|
|
1185
|
+
* `0`. Without a delegated parent, the standard app check remains unchanged.
|
|
1186
|
+
*
|
|
1187
|
+
* @param popupWindowParent Window that opens the popup.
|
|
1188
|
+
*/
|
|
1189
|
+
private getPopupOriginCheckDone(
|
|
1190
|
+
popupWindowParent: Window
|
|
1191
|
+
): boolean | undefined {
|
|
1192
|
+
if (this.config.auth.popupRelayUri) {
|
|
1193
|
+
return true;
|
|
1194
|
+
}
|
|
1195
|
+
if (popupWindowParent !== window) {
|
|
1196
|
+
return (
|
|
1197
|
+
computePocd(this.config) === 1 &&
|
|
1198
|
+
computePocd(this.config, popupWindowParent) === 1
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
return undefined;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1147
1204
|
/**
|
|
1148
1205
|
* Opens the interactive popup for a POST-form /authorize request. Shared by
|
|
1149
1206
|
* the auth-code POST and EAR flows, which are identical apart from the form
|
|
@@ -26,7 +26,11 @@ import {
|
|
|
26
26
|
initializeAuthorizationRequest,
|
|
27
27
|
StandardInteractionClient,
|
|
28
28
|
} from "./StandardInteractionClient.js";
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
getTokenBindingRequestParams,
|
|
31
|
+
isTokenBindingKeyPersistedForRedirect,
|
|
32
|
+
removeTokenBindingKeyOnFailure,
|
|
33
|
+
} from "../request/RequestHelpers.js";
|
|
30
34
|
import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
|
|
31
35
|
import {
|
|
32
36
|
ApiId,
|
|
@@ -241,13 +245,23 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
241
245
|
...tokenBindingParams,
|
|
242
246
|
};
|
|
243
247
|
|
|
244
|
-
this.browserStorage.cacheAuthorizeRequest(
|
|
245
|
-
redirectRequest,
|
|
246
|
-
this.correlationId,
|
|
247
|
-
pkceCodes.verifier
|
|
248
|
-
);
|
|
249
|
-
|
|
250
248
|
try {
|
|
249
|
+
if (
|
|
250
|
+
!(await isTokenBindingKeyPersistedForRedirect(
|
|
251
|
+
redirectRequest,
|
|
252
|
+
this.tokenBindingKeyManager
|
|
253
|
+
))
|
|
254
|
+
) {
|
|
255
|
+
throw createBrowserAuthError(
|
|
256
|
+
BrowserAuthErrorCodes.cryptoKeyNotFound,
|
|
257
|
+
this.correlationId
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
this.browserStorage.cacheAuthorizeRequest(
|
|
261
|
+
redirectRequest,
|
|
262
|
+
this.correlationId,
|
|
263
|
+
pkceCodes.verifier
|
|
264
|
+
);
|
|
251
265
|
if (redirectRequest.httpMethod === Constants.HttpMethod.POST) {
|
|
252
266
|
return await this.executeCodeFlowWithPost(redirectRequest);
|
|
253
267
|
} else {
|
|
@@ -285,6 +299,12 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
285
299
|
return await this.initiateAuthRequest(navigateUrl);
|
|
286
300
|
}
|
|
287
301
|
} catch (e) {
|
|
302
|
+
await removeTokenBindingKeyOnFailure(
|
|
303
|
+
redirectRequest,
|
|
304
|
+
this.tokenBindingKeyManager,
|
|
305
|
+
this.logger,
|
|
306
|
+
this.performanceClient
|
|
307
|
+
);
|
|
288
308
|
if (e instanceof AuthError) {
|
|
289
309
|
e.correlationId = this.correlationId;
|
|
290
310
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
@@ -354,32 +374,52 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
354
374
|
...tokenBindingParams,
|
|
355
375
|
};
|
|
356
376
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
redirectRequest,
|
|
368
|
-
this.logger,
|
|
369
|
-
this.performanceClient
|
|
370
|
-
);
|
|
371
|
-
form.submit();
|
|
372
|
-
return new Promise<void>((resolve, reject) => {
|
|
373
|
-
setTimeout(() => {
|
|
374
|
-
reject(
|
|
375
|
-
createBrowserAuthError(
|
|
376
|
-
BrowserAuthErrorCodes.timedOut,
|
|
377
|
-
"",
|
|
378
|
-
"failed_to_redirect"
|
|
379
|
-
)
|
|
377
|
+
try {
|
|
378
|
+
if (
|
|
379
|
+
!(await isTokenBindingKeyPersistedForRedirect(
|
|
380
|
+
redirectRequest,
|
|
381
|
+
this.tokenBindingKeyManager
|
|
382
|
+
))
|
|
383
|
+
) {
|
|
384
|
+
throw createBrowserAuthError(
|
|
385
|
+
BrowserAuthErrorCodes.cryptoKeyNotFound,
|
|
386
|
+
this.correlationId
|
|
380
387
|
);
|
|
381
|
-
}
|
|
382
|
-
|
|
388
|
+
}
|
|
389
|
+
this.browserStorage.cacheAuthorizeRequest(
|
|
390
|
+
redirectRequest,
|
|
391
|
+
this.correlationId,
|
|
392
|
+
pkceCodes.verifier
|
|
393
|
+
);
|
|
394
|
+
const form = await Authorize.getEARForm(
|
|
395
|
+
document,
|
|
396
|
+
this.config,
|
|
397
|
+
discoveredAuthority,
|
|
398
|
+
redirectRequest,
|
|
399
|
+
this.logger,
|
|
400
|
+
this.performanceClient
|
|
401
|
+
);
|
|
402
|
+
form.submit();
|
|
403
|
+
return await new Promise<void>((resolve, reject) => {
|
|
404
|
+
setTimeout(() => {
|
|
405
|
+
reject(
|
|
406
|
+
createBrowserAuthError(
|
|
407
|
+
BrowserAuthErrorCodes.timedOut,
|
|
408
|
+
"",
|
|
409
|
+
"failed_to_redirect"
|
|
410
|
+
)
|
|
411
|
+
);
|
|
412
|
+
}, this.config.system.redirectNavigationTimeout);
|
|
413
|
+
});
|
|
414
|
+
} catch (e) {
|
|
415
|
+
await removeTokenBindingKeyOnFailure(
|
|
416
|
+
redirectRequest,
|
|
417
|
+
this.tokenBindingKeyManager,
|
|
418
|
+
this.logger,
|
|
419
|
+
this.performanceClient
|
|
420
|
+
);
|
|
421
|
+
throw e;
|
|
422
|
+
}
|
|
383
423
|
}
|
|
384
424
|
|
|
385
425
|
/**
|
|
@@ -472,6 +512,12 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
472
512
|
"handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache.",
|
|
473
513
|
this.correlationId
|
|
474
514
|
);
|
|
515
|
+
await removeTokenBindingKeyOnFailure(
|
|
516
|
+
request,
|
|
517
|
+
this.tokenBindingKeyManager,
|
|
518
|
+
this.logger,
|
|
519
|
+
this.performanceClient
|
|
520
|
+
);
|
|
475
521
|
this.browserStorage.resetRequestCache(this.correlationId);
|
|
476
522
|
|
|
477
523
|
// Do not instrument "no_server_response" if user clicked back button
|
|
@@ -609,6 +655,12 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
609
655
|
|
|
610
656
|
return null;
|
|
611
657
|
} catch (e) {
|
|
658
|
+
await removeTokenBindingKeyOnFailure(
|
|
659
|
+
request,
|
|
660
|
+
this.tokenBindingKeyManager,
|
|
661
|
+
this.logger,
|
|
662
|
+
this.performanceClient
|
|
663
|
+
);
|
|
612
664
|
if (e instanceof AuthError) {
|
|
613
665
|
(e as AuthError).correlationId = this.correlationId;
|
|
614
666
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
@@ -663,7 +715,6 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
663
715
|
return [null, ""];
|
|
664
716
|
}
|
|
665
717
|
|
|
666
|
-
BrowserUtils.clearHash(window);
|
|
667
718
|
this.logger.verbose(
|
|
668
719
|
"Hash contains known properties, returning response hash",
|
|
669
720
|
this.correlationId
|
|
@@ -751,7 +802,8 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
751
802
|
this.eventHandler,
|
|
752
803
|
this.logger,
|
|
753
804
|
this.performanceClient,
|
|
754
|
-
this.platformAuthProvider
|
|
805
|
+
this.platformAuthProvider,
|
|
806
|
+
this.tokenBindingKeyManager
|
|
755
807
|
);
|
|
756
808
|
}
|
|
757
809
|
|
|
@@ -780,7 +832,8 @@ export class RedirectClient extends StandardInteractionClient {
|
|
|
780
832
|
this.eventHandler,
|
|
781
833
|
this.logger,
|
|
782
834
|
this.performanceClient,
|
|
783
|
-
this.platformAuthProvider
|
|
835
|
+
this.platformAuthProvider,
|
|
836
|
+
this.tokenBindingKeyManager
|
|
784
837
|
);
|
|
785
838
|
}
|
|
786
839
|
|