@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
|
@@ -22,7 +22,10 @@ import {
|
|
|
22
22
|
initializeAuthorizationRequest,
|
|
23
23
|
StandardInteractionClient,
|
|
24
24
|
} from "./StandardInteractionClient.js";
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
getTokenBindingRequestParams,
|
|
27
|
+
removeTokenBindingKeyOnFailure,
|
|
28
|
+
} from "../request/RequestHelpers.js";
|
|
26
29
|
import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
|
|
27
30
|
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
28
31
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
@@ -421,7 +424,8 @@ export class SilentIframeClient extends StandardInteractionClient {
|
|
|
421
424
|
this.eventHandler,
|
|
422
425
|
this.logger,
|
|
423
426
|
this.performanceClient,
|
|
424
|
-
this.platformAuthProvider
|
|
427
|
+
this.platformAuthProvider,
|
|
428
|
+
this.tokenBindingKeyManager
|
|
425
429
|
);
|
|
426
430
|
} else {
|
|
427
431
|
return invokeAsync(
|
|
@@ -441,7 +445,8 @@ export class SilentIframeClient extends StandardInteractionClient {
|
|
|
441
445
|
this.eventHandler,
|
|
442
446
|
this.logger,
|
|
443
447
|
this.performanceClient,
|
|
444
|
-
this.platformAuthProvider
|
|
448
|
+
this.platformAuthProvider,
|
|
449
|
+
this.tokenBindingKeyManager
|
|
445
450
|
);
|
|
446
451
|
}
|
|
447
452
|
}
|
|
@@ -554,26 +559,37 @@ export class SilentIframeClient extends StandardInteractionClient {
|
|
|
554
559
|
const { serverParams, pkceCodes, silentRequest } =
|
|
555
560
|
await this.silentAuthorizeHelper(authClient, request);
|
|
556
561
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
562
|
+
try {
|
|
563
|
+
return await invokeAsync(
|
|
564
|
+
Authorize.handleResponseCode,
|
|
565
|
+
BrowserPerformanceEvents.HandleResponseCode,
|
|
566
|
+
this.logger,
|
|
567
|
+
this.performanceClient,
|
|
568
|
+
request.correlationId
|
|
569
|
+
)(
|
|
570
|
+
silentRequest,
|
|
571
|
+
serverParams,
|
|
572
|
+
pkceCodes.verifier,
|
|
573
|
+
this.apiId,
|
|
574
|
+
this.config,
|
|
575
|
+
authClient,
|
|
576
|
+
this.browserStorage,
|
|
577
|
+
this.nativeStorage,
|
|
578
|
+
this.eventHandler,
|
|
579
|
+
this.logger,
|
|
580
|
+
this.performanceClient,
|
|
581
|
+
this.platformAuthProvider,
|
|
582
|
+
this.tokenBindingKeyManager
|
|
583
|
+
);
|
|
584
|
+
} catch (e) {
|
|
585
|
+
await removeTokenBindingKeyOnFailure(
|
|
586
|
+
silentRequest,
|
|
587
|
+
this.tokenBindingKeyManager,
|
|
588
|
+
this.logger,
|
|
589
|
+
this.performanceClient
|
|
590
|
+
);
|
|
591
|
+
throw e;
|
|
592
|
+
}
|
|
577
593
|
}
|
|
578
594
|
|
|
579
595
|
/**
|
|
@@ -611,91 +627,101 @@ export class SilentIframeClient extends StandardInteractionClient {
|
|
|
611
627
|
...tokenBindingParams,
|
|
612
628
|
};
|
|
613
629
|
|
|
614
|
-
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
615
|
-
const iframe = createHiddenIframe();
|
|
616
|
-
|
|
617
|
-
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
618
|
-
// Wait for response from the redirect bridge.
|
|
619
|
-
let responseString: string;
|
|
620
630
|
try {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
* responsePromise is awaited, the listener still rejects on
|
|
632
|
-
* timeout. Swallow it here so it does not surface as an
|
|
633
|
-
* unhandled rejection; the navigation error is propagated
|
|
634
|
-
* instead.
|
|
635
|
-
*/
|
|
636
|
-
});
|
|
637
|
-
|
|
638
|
-
if (request.httpMethod === Constants.HttpMethod.POST) {
|
|
639
|
-
await invokeAsync(
|
|
640
|
-
initiateCodeFlowWithPost,
|
|
641
|
-
BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
|
|
642
|
-
this.logger,
|
|
643
|
-
this.performanceClient,
|
|
644
|
-
correlationId
|
|
645
|
-
)(
|
|
646
|
-
iframe,
|
|
647
|
-
this.config,
|
|
648
|
-
authClient.authority,
|
|
649
|
-
silentRequest,
|
|
650
|
-
this.logger,
|
|
651
|
-
this.performanceClient
|
|
652
|
-
);
|
|
653
|
-
} else {
|
|
654
|
-
// Create authorize request url
|
|
655
|
-
const navigateUrl = await invokeAsync(
|
|
656
|
-
Authorize.getAuthCodeRequestUrl,
|
|
657
|
-
PerformanceEvents.GetAuthCodeUrl,
|
|
631
|
+
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
632
|
+
const iframe = createHiddenIframe();
|
|
633
|
+
|
|
634
|
+
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
635
|
+
// Wait for response from the redirect bridge.
|
|
636
|
+
let responseString: string;
|
|
637
|
+
try {
|
|
638
|
+
const responsePromise = invokeAsync(
|
|
639
|
+
this.waitForIframeResponse.bind(this),
|
|
640
|
+
BrowserPerformanceEvents.SilentHandlerMonitorIframeForHash,
|
|
658
641
|
this.logger,
|
|
659
642
|
this.performanceClient,
|
|
660
643
|
correlationId
|
|
661
|
-
)(
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
644
|
+
)(iframe, request);
|
|
645
|
+
responsePromise.catch(() => {
|
|
646
|
+
/*
|
|
647
|
+
* If URL creation or navigation below throws before
|
|
648
|
+
* responsePromise is awaited, the listener still rejects on
|
|
649
|
+
* timeout. Swallow it here so it does not surface as an
|
|
650
|
+
* unhandled rejection; the navigation error is propagated
|
|
651
|
+
* instead.
|
|
652
|
+
*/
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
if (request.httpMethod === Constants.HttpMethod.POST) {
|
|
656
|
+
await invokeAsync(
|
|
657
|
+
initiateCodeFlowWithPost,
|
|
658
|
+
BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
|
|
659
|
+
this.logger,
|
|
660
|
+
this.performanceClient,
|
|
661
|
+
correlationId
|
|
662
|
+
)(
|
|
663
|
+
iframe,
|
|
664
|
+
this.config,
|
|
665
|
+
authClient.authority,
|
|
666
|
+
silentRequest,
|
|
667
|
+
this.logger,
|
|
668
|
+
this.performanceClient
|
|
669
|
+
);
|
|
670
|
+
} else {
|
|
671
|
+
// Create authorize request url
|
|
672
|
+
const navigateUrl = await invokeAsync(
|
|
673
|
+
Authorize.getAuthCodeRequestUrl,
|
|
674
|
+
PerformanceEvents.GetAuthCodeUrl,
|
|
675
|
+
this.logger,
|
|
676
|
+
this.performanceClient,
|
|
677
|
+
correlationId
|
|
678
|
+
)(
|
|
679
|
+
this.config,
|
|
680
|
+
authClient.authority,
|
|
681
|
+
silentRequest,
|
|
682
|
+
this.logger,
|
|
683
|
+
this.performanceClient
|
|
684
|
+
);
|
|
685
|
+
|
|
686
|
+
// Navigate the iframe to the authorize request url
|
|
687
|
+
await invokeAsync(
|
|
688
|
+
initiateCodeRequest,
|
|
689
|
+
BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
|
|
690
|
+
this.logger,
|
|
691
|
+
this.performanceClient,
|
|
692
|
+
correlationId
|
|
693
|
+
)(iframe, navigateUrl, this.logger, correlationId);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
responseString = await responsePromise;
|
|
697
|
+
} finally {
|
|
698
|
+
invoke(
|
|
699
|
+
removeHiddenIframe,
|
|
700
|
+
BrowserPerformanceEvents.RemoveHiddenIframe,
|
|
673
701
|
this.logger,
|
|
674
702
|
this.performanceClient,
|
|
675
703
|
correlationId
|
|
676
|
-
)(iframe
|
|
704
|
+
)(iframe);
|
|
677
705
|
}
|
|
678
706
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
removeHiddenIframe,
|
|
683
|
-
BrowserPerformanceEvents.RemoveHiddenIframe,
|
|
707
|
+
const serverParams = invoke(
|
|
708
|
+
ResponseHandler.deserializeResponse,
|
|
709
|
+
BrowserPerformanceEvents.DeserializeResponse,
|
|
684
710
|
this.logger,
|
|
685
711
|
this.performanceClient,
|
|
686
712
|
correlationId
|
|
687
|
-
)(
|
|
688
|
-
}
|
|
713
|
+
)(responseString, responseType, this.logger, this.correlationId);
|
|
689
714
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
715
|
+
return { serverParams, pkceCodes, silentRequest };
|
|
716
|
+
} catch (e) {
|
|
717
|
+
await removeTokenBindingKeyOnFailure(
|
|
718
|
+
silentRequest,
|
|
719
|
+
this.tokenBindingKeyManager,
|
|
720
|
+
this.logger,
|
|
721
|
+
this.performanceClient
|
|
722
|
+
);
|
|
723
|
+
throw e;
|
|
724
|
+
}
|
|
699
725
|
}
|
|
700
726
|
|
|
701
727
|
protected async waitForIframeResponse(
|
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
initializeBaseRequest,
|
|
47
47
|
validateRequestMethod,
|
|
48
48
|
} from "../request/RequestHelpers.js";
|
|
49
|
+
import { computePocd } from "../utils/PopupOriginCheck.js";
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* Defines the class structure and helper functions used by the "standard", non-brokered auth flows (popup, redirect, silent (RT), silent (iframe))
|
|
@@ -66,6 +67,11 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
66
67
|
const validLogoutRequest: CommonEndSessionRequest = {
|
|
67
68
|
correlationId: this.correlationId,
|
|
68
69
|
...logoutRequest,
|
|
70
|
+
/*
|
|
71
|
+
* Computed here rather than per flow so every end-session request
|
|
72
|
+
* carries it, matching the authorize path.
|
|
73
|
+
*/
|
|
74
|
+
popupOriginCheckDone: computePocd(this.config) === 1,
|
|
69
75
|
};
|
|
70
76
|
|
|
71
77
|
/**
|
package/src/packageMetadata.ts
CHANGED
|
@@ -26,9 +26,11 @@ import {
|
|
|
26
26
|
ServerAuthorizationTokenResponse,
|
|
27
27
|
Constants,
|
|
28
28
|
AADServerParamKeys,
|
|
29
|
+
ITokenBindingKeyManager,
|
|
29
30
|
} from "@azure/msal-common/browser";
|
|
30
31
|
import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
|
|
31
32
|
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
33
|
+
import { computePocd } from "../utils/PopupOriginCheck.js";
|
|
32
34
|
import { ApiId, BrowserConstants } from "../utils/BrowserConstants.js";
|
|
33
35
|
import { version } from "../packageMetadata.js";
|
|
34
36
|
import { CryptoOps } from "../crypto/CryptoOps.js";
|
|
@@ -44,6 +46,7 @@ import { EventHandler } from "../event/EventHandler.js";
|
|
|
44
46
|
import { decryptEarResponse } from "../crypto/BrowserCrypto.js";
|
|
45
47
|
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
46
48
|
import { TokenBindingKeyManager } from "../crypto/TokenBindingKeyManager.js";
|
|
49
|
+
import { removeTokenBindingKeyOnFailure } from "../request/RequestHelpers.js";
|
|
47
50
|
|
|
48
51
|
/**
|
|
49
52
|
* Parsed representation of the clientdata response parameter from the /authorize endpoint.
|
|
@@ -156,7 +159,17 @@ async function getStandardParameters(
|
|
|
156
159
|
): Promise<Map<string, string>> {
|
|
157
160
|
const parameters = AuthorizeProtocol.getStandardAuthorizeRequestParameters(
|
|
158
161
|
{ ...config.auth, authority: authority },
|
|
159
|
-
|
|
162
|
+
{
|
|
163
|
+
...request,
|
|
164
|
+
/*
|
|
165
|
+
* Computed here rather than per flow so every authorize request
|
|
166
|
+
* carries it — GET, POST and EAR, interactive and silent alike.
|
|
167
|
+
* A request may assert it instead when the topology, rather than
|
|
168
|
+
* the current window, is what makes the popup unreachable.
|
|
169
|
+
*/
|
|
170
|
+
popupOriginCheckDone:
|
|
171
|
+
request.popupOriginCheckDone ?? computePocd(config) === 1,
|
|
172
|
+
},
|
|
160
173
|
logger,
|
|
161
174
|
performanceClient
|
|
162
175
|
);
|
|
@@ -197,6 +210,7 @@ async function getStandardParameters(
|
|
|
197
210
|
|
|
198
211
|
if (
|
|
199
212
|
request.authenticationScheme === Constants.AuthenticationScheme.DPOP &&
|
|
213
|
+
!request.platformBroker &&
|
|
200
214
|
request.dpopJkt
|
|
201
215
|
) {
|
|
202
216
|
parameters.set(AADServerParamKeys.DPOP_JKT, request.dpopJkt);
|
|
@@ -267,6 +281,26 @@ export type AuthorizeFormData = {
|
|
|
267
281
|
fields: Record<string, string>;
|
|
268
282
|
};
|
|
269
283
|
|
|
284
|
+
function getAuthorizeFormAction(
|
|
285
|
+
authority: Authority,
|
|
286
|
+
request: CommonAuthorizationUrlRequest,
|
|
287
|
+
parameters: Map<string, string>
|
|
288
|
+
): string {
|
|
289
|
+
const queryParams = new Map<string, string>();
|
|
290
|
+
RequestParameterBuilder.addExtraParameters(
|
|
291
|
+
queryParams,
|
|
292
|
+
request.extraQueryParameters || {}
|
|
293
|
+
);
|
|
294
|
+
if (parameters.has(AADServerParamKeys.POPUP_ORIGIN_CHECK_DONE)) {
|
|
295
|
+
queryParams.delete(AADServerParamKeys.POPUP_ORIGIN_CHECK_DONE);
|
|
296
|
+
}
|
|
297
|
+
RequestParameterBuilder.addCorrelationId(
|
|
298
|
+
queryParams,
|
|
299
|
+
request.correlationId
|
|
300
|
+
);
|
|
301
|
+
return AuthorizeProtocol.getAuthorizeUrl(authority, queryParams);
|
|
302
|
+
}
|
|
303
|
+
|
|
270
304
|
/**
|
|
271
305
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
272
306
|
*/
|
|
@@ -309,19 +343,7 @@ export async function getEARFormData(
|
|
|
309
343
|
...request.extraParameters,
|
|
310
344
|
});
|
|
311
345
|
|
|
312
|
-
const
|
|
313
|
-
RequestParameterBuilder.addExtraParameters(
|
|
314
|
-
queryParams,
|
|
315
|
-
request.extraQueryParameters || {}
|
|
316
|
-
);
|
|
317
|
-
|
|
318
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
319
|
-
RequestParameterBuilder.addCorrelationId(
|
|
320
|
-
queryParams,
|
|
321
|
-
request.correlationId
|
|
322
|
-
);
|
|
323
|
-
|
|
324
|
-
const action = AuthorizeProtocol.getAuthorizeUrl(authority, queryParams);
|
|
346
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
325
347
|
|
|
326
348
|
return { action, fields: Object.fromEntries(parameters) };
|
|
327
349
|
}
|
|
@@ -381,20 +403,7 @@ export async function getCodeFormData(
|
|
|
381
403
|
...request.extraParameters,
|
|
382
404
|
});
|
|
383
405
|
|
|
384
|
-
|
|
385
|
-
const queryParams = new Map<string, string>();
|
|
386
|
-
RequestParameterBuilder.addExtraParameters(
|
|
387
|
-
queryParams,
|
|
388
|
-
request.extraQueryParameters || {}
|
|
389
|
-
);
|
|
390
|
-
|
|
391
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
392
|
-
RequestParameterBuilder.addCorrelationId(
|
|
393
|
-
queryParams,
|
|
394
|
-
request.correlationId
|
|
395
|
-
);
|
|
396
|
-
|
|
397
|
-
const action = AuthorizeProtocol.getAuthorizeUrl(authority, queryParams);
|
|
406
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
398
407
|
|
|
399
408
|
return { action, fields: Object.fromEntries(parameters) };
|
|
400
409
|
}
|
|
@@ -476,7 +485,11 @@ export async function handleResponsePlatformBroker(
|
|
|
476
485
|
eventHandler: EventHandler,
|
|
477
486
|
logger: Logger,
|
|
478
487
|
performanceClient: IPerformanceClient,
|
|
479
|
-
platformAuthProvider?: IPlatformAuthHandler
|
|
488
|
+
platformAuthProvider?: IPlatformAuthHandler,
|
|
489
|
+
tokenBindingKeyManager: ITokenBindingKeyManager = new TokenBindingKeyManager(
|
|
490
|
+
logger,
|
|
491
|
+
performanceClient
|
|
492
|
+
)
|
|
480
493
|
): Promise<AuthenticationResult> {
|
|
481
494
|
logger.verbose(
|
|
482
495
|
"Account id found, calling WAM for token",
|
|
@@ -502,24 +515,35 @@ export async function handleResponsePlatformBroker(
|
|
|
502
515
|
platformAuthProvider,
|
|
503
516
|
accountId,
|
|
504
517
|
nativeStorage,
|
|
505
|
-
request.correlationId
|
|
518
|
+
request.correlationId,
|
|
519
|
+
tokenBindingKeyManager
|
|
506
520
|
);
|
|
507
521
|
const { userRequestState } = ProtocolUtils.parseRequestState(
|
|
508
522
|
browserCrypto.base64Decode,
|
|
509
523
|
request.state,
|
|
510
524
|
request.correlationId
|
|
511
525
|
);
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
526
|
+
try {
|
|
527
|
+
return await invokeAsync(
|
|
528
|
+
nativeInteractionClient.acquireToken.bind(nativeInteractionClient),
|
|
529
|
+
BrowserPerformanceEvents.NativeInteractionClientAcquireToken,
|
|
530
|
+
logger,
|
|
531
|
+
performanceClient,
|
|
532
|
+
request.correlationId
|
|
533
|
+
)({
|
|
534
|
+
...request,
|
|
535
|
+
state: userRequestState,
|
|
536
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
537
|
+
});
|
|
538
|
+
} catch (e) {
|
|
539
|
+
await removeTokenBindingKeyOnFailure(
|
|
540
|
+
request,
|
|
541
|
+
tokenBindingKeyManager,
|
|
542
|
+
logger,
|
|
543
|
+
performanceClient
|
|
544
|
+
);
|
|
545
|
+
throw e;
|
|
546
|
+
}
|
|
523
547
|
}
|
|
524
548
|
|
|
525
549
|
/**
|
|
@@ -545,7 +569,11 @@ export async function handleResponseCode(
|
|
|
545
569
|
eventHandler: EventHandler,
|
|
546
570
|
logger: Logger,
|
|
547
571
|
performanceClient: IPerformanceClient,
|
|
548
|
-
platformAuthProvider?: IPlatformAuthHandler
|
|
572
|
+
platformAuthProvider?: IPlatformAuthHandler,
|
|
573
|
+
tokenBindingKeyManager: ITokenBindingKeyManager = new TokenBindingKeyManager(
|
|
574
|
+
logger,
|
|
575
|
+
performanceClient
|
|
576
|
+
)
|
|
549
577
|
): Promise<AuthenticationResult> {
|
|
550
578
|
// Remove throttle if it exists
|
|
551
579
|
ThrottlingUtils.removeThrottle(
|
|
@@ -574,7 +602,8 @@ export async function handleResponseCode(
|
|
|
574
602
|
eventHandler,
|
|
575
603
|
logger,
|
|
576
604
|
performanceClient,
|
|
577
|
-
platformAuthProvider
|
|
605
|
+
platformAuthProvider,
|
|
606
|
+
tokenBindingKeyManager
|
|
578
607
|
);
|
|
579
608
|
}
|
|
580
609
|
const authCodeRequest: CommonAuthorizationCodeRequest = {
|
|
@@ -628,7 +657,11 @@ export async function handleResponseEAR(
|
|
|
628
657
|
eventHandler: EventHandler,
|
|
629
658
|
logger: Logger,
|
|
630
659
|
performanceClient: IPerformanceClient,
|
|
631
|
-
platformAuthProvider?: IPlatformAuthHandler
|
|
660
|
+
platformAuthProvider?: IPlatformAuthHandler,
|
|
661
|
+
tokenBindingKeyManager: ITokenBindingKeyManager = new TokenBindingKeyManager(
|
|
662
|
+
logger,
|
|
663
|
+
performanceClient
|
|
664
|
+
)
|
|
632
665
|
): Promise<AuthenticationResult> {
|
|
633
666
|
// Remove throttle if it exists
|
|
634
667
|
ThrottlingUtils.removeThrottle(
|
|
@@ -688,7 +721,8 @@ export async function handleResponseEAR(
|
|
|
688
721
|
eventHandler,
|
|
689
722
|
logger,
|
|
690
723
|
performanceClient,
|
|
691
|
-
platformAuthProvider
|
|
724
|
+
platformAuthProvider,
|
|
725
|
+
tokenBindingKeyManager
|
|
692
726
|
);
|
|
693
727
|
}
|
|
694
728
|
|
|
@@ -700,7 +734,7 @@ export async function handleResponseEAR(
|
|
|
700
734
|
performanceClient,
|
|
701
735
|
null,
|
|
702
736
|
null,
|
|
703
|
-
|
|
737
|
+
tokenBindingKeyManager
|
|
704
738
|
);
|
|
705
739
|
|
|
706
740
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
@@ -69,9 +69,9 @@ function validateDpopRequest(
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Resolves the token-binding parameters needed before building authorize or token requests.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* DPoP requests provision a browser key for token endpoint redemption. Platform broker
|
|
73
|
+
* authorization requests retain the key for auth-code fallback but suppress dpop_jkt on
|
|
74
|
+
* /authorize. Platform broker PoP requests use a reqCnf confirmation claim.
|
|
75
75
|
*/
|
|
76
76
|
export async function getTokenBindingRequestParams(
|
|
77
77
|
request: Partial<BaseAuthRequest> & {
|
|
@@ -84,14 +84,6 @@ export async function getTokenBindingRequestParams(
|
|
|
84
84
|
): Promise<Pick<CommonAuthorizationUrlRequest, "dpopJkt" | "reqCnf">> {
|
|
85
85
|
switch (request.authenticationScheme) {
|
|
86
86
|
case Constants.AuthenticationScheme.DPOP:
|
|
87
|
-
if (request.platformBroker) {
|
|
88
|
-
return {};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (request.dpopJkt) {
|
|
92
|
-
return { dpopJkt: request.dpopJkt };
|
|
93
|
-
}
|
|
94
|
-
|
|
95
87
|
return {
|
|
96
88
|
dpopJkt: await tokenBindingKeyManager.provisionTokenBindingKey({
|
|
97
89
|
tokenBindingKeyType:
|
|
@@ -129,6 +121,67 @@ export async function getTokenBindingRequestParams(
|
|
|
129
121
|
}
|
|
130
122
|
}
|
|
131
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Removes a DPoP key that was provisioned for an authorization attempt which
|
|
126
|
+
* did not complete. Cleanup failures are recorded without replacing the
|
|
127
|
+
* original authorization error.
|
|
128
|
+
*/
|
|
129
|
+
export async function removeTokenBindingKeyOnFailure(
|
|
130
|
+
request: Partial<CommonAuthorizationUrlRequest> & {
|
|
131
|
+
correlationId: string;
|
|
132
|
+
},
|
|
133
|
+
tokenBindingKeyManager: ITokenBindingKeyManager,
|
|
134
|
+
logger: Logger,
|
|
135
|
+
performanceClient: IPerformanceClient
|
|
136
|
+
): Promise<void> {
|
|
137
|
+
if (
|
|
138
|
+
request.authenticationScheme !== Constants.AuthenticationScheme.DPOP ||
|
|
139
|
+
!request.dpopJkt
|
|
140
|
+
) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
try {
|
|
145
|
+
await tokenBindingKeyManager.removeTokenBindingKey(
|
|
146
|
+
request.dpopJkt,
|
|
147
|
+
request.correlationId
|
|
148
|
+
);
|
|
149
|
+
} catch {
|
|
150
|
+
logger.error(
|
|
151
|
+
"Failed to remove unused DPoP key after authorization failure.",
|
|
152
|
+
request.correlationId
|
|
153
|
+
);
|
|
154
|
+
performanceClient.incrementFields(
|
|
155
|
+
{ removeTokenBindingKeyFailure: 1 },
|
|
156
|
+
request.correlationId
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Returns whether an MSAL-owned DPoP key is available in persistent storage
|
|
163
|
+
* before a redirect navigation. Custom managers without a persistence probe
|
|
164
|
+
* retain their existing behavior.
|
|
165
|
+
*/
|
|
166
|
+
export async function isTokenBindingKeyPersistedForRedirect(
|
|
167
|
+
request: {
|
|
168
|
+
correlationId: string;
|
|
169
|
+
dpopJkt?: string;
|
|
170
|
+
keyId?: string;
|
|
171
|
+
},
|
|
172
|
+
tokenBindingKeyManager: ITokenBindingKeyManager
|
|
173
|
+
): Promise<boolean> {
|
|
174
|
+
const keyId = request.dpopJkt ?? request.keyId;
|
|
175
|
+
if (!keyId || !tokenBindingKeyManager.isTokenBindingKeyPersisted) {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return tokenBindingKeyManager.isTokenBindingKeyPersisted(
|
|
180
|
+
keyId,
|
|
181
|
+
request.correlationId
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
132
185
|
/**
|
|
133
186
|
* Initializer function for all request APIs
|
|
134
187
|
* @param request
|
|
@@ -16,7 +16,6 @@ import type {
|
|
|
16
16
|
} from "@azure/msal-common/browser";
|
|
17
17
|
import type { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
18
18
|
import { isPlatformAuthAllowed } from "../broker/nativeBroker/PlatformAuthProvider.js";
|
|
19
|
-
import type { PlatformAuthExtraParametersNoCache } from "../broker/nativeBroker/PlatformAuthRequest.js";
|
|
20
19
|
import type { BrowserConfiguration } from "../config/Configuration.js";
|
|
21
20
|
import { CacheLookupPolicy } from "../utils/BrowserConstants.js";
|
|
22
21
|
import type { SilentRequest } from "./SilentRequest.js";
|
|
@@ -44,7 +43,6 @@ export type PreparedSilentRequest = {
|
|
|
44
43
|
type PlatformSilentRequest = SilentRequest &
|
|
45
44
|
Pick<SsoSilentRequest, "nonce" | "loginHint"> & {
|
|
46
45
|
account: AccountInfo;
|
|
47
|
-
extraParametersNoCache?: PlatformAuthExtraParametersNoCache;
|
|
48
46
|
dpopNonce?: string;
|
|
49
47
|
};
|
|
50
48
|
|
|
@@ -175,9 +173,6 @@ function getPlatformSilentRequestKey(
|
|
|
175
173
|
extraQueryParameters: canonicalizeStringDict(
|
|
176
174
|
request.extraQueryParameters
|
|
177
175
|
),
|
|
178
|
-
extraParametersNoCache: canonicalizeStringDict(
|
|
179
|
-
request.extraParametersNoCache
|
|
180
|
-
),
|
|
181
176
|
forceRefresh: !!request.forceRefresh,
|
|
182
177
|
cacheLookupPolicy:
|
|
183
178
|
request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
@@ -190,8 +185,15 @@ function getPlatformSilentRequestKey(
|
|
|
190
185
|
function snapshotPlatformSilentRequest(
|
|
191
186
|
request: PlatformSilentRequest
|
|
192
187
|
): PlatformSilentRequest {
|
|
193
|
-
|
|
188
|
+
const snapshot = {
|
|
194
189
|
...request,
|
|
190
|
+
} as PlatformSilentRequest & {
|
|
191
|
+
extraParametersNoCache?: unknown;
|
|
192
|
+
};
|
|
193
|
+
delete snapshot.extraParametersNoCache;
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
...snapshot,
|
|
195
197
|
scopes: [...(request.scopes || [])],
|
|
196
198
|
account: { ...request.account },
|
|
197
199
|
azureCloudOptions: request.azureCloudOptions
|
|
@@ -203,9 +205,6 @@ function snapshotPlatformSilentRequest(
|
|
|
203
205
|
extraQueryParameters: request.extraQueryParameters
|
|
204
206
|
? { ...request.extraQueryParameters }
|
|
205
207
|
: undefined,
|
|
206
|
-
extraParametersNoCache: request.extraParametersNoCache
|
|
207
|
-
? { ...request.extraParametersNoCache }
|
|
208
|
-
: undefined,
|
|
209
208
|
attributeTokens: request.attributeTokens
|
|
210
209
|
? [...request.attributeTokens]
|
|
211
210
|
: undefined,
|
|
@@ -179,6 +179,7 @@ export const PlatformAuthHandleNativeResponse =
|
|
|
179
179
|
"platformAuthHandleNativeResponse";
|
|
180
180
|
export const PlatformAuthCacheAccount = "platformAuthCacheAccount";
|
|
181
181
|
export const PlatformAuthCacheNativeTokens = "platformAuthCacheNativeTokens";
|
|
182
|
+
export const PlatformAuthDpopKeyCleanup = "platformAuthDpopKeyCleanup";
|
|
182
183
|
export const RemoveHiddenIframe = "removeHiddenIframe";
|
|
183
184
|
|
|
184
185
|
export const ImportExistingCache = "importExistingCache";
|