@azure/msal-browser 5.29.1 → 5.31.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 +4 -2
- package/dist/app/IPublicClientApplication.mjs +4 -1
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.mjs +14 -2
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +10 -23
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -3
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +40 -4
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +11 -2
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +26 -5
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +44 -11
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +189 -5
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -4
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +11 -4
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +3 -3
- package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +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 -4
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +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 -8
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +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 -3
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +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 -7
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +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 -2
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +2 -5
- 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 +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -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 -2
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +2 -3
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.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 +32 -27
- 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 +6 -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 +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +7 -5
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +12 -3
- 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 +9 -39
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/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 +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +2 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
- package/dist/custom_auth/index.mjs +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +1 -1
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -2
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +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 -2
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +4 -2
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +18 -5
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +27 -21
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +8 -10
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +5 -8
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +2 -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 +13 -9
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +24 -6
- package/dist/popup_relay/constants.mjs.map +1 -1
- package/dist/popup_relay/index.mjs +142 -44
- package/dist/popup_relay/index.mjs.map +1 -1
- package/dist/popup_relay/relayClient.mjs +66 -23
- package/dist/popup_relay/relayClient.mjs.map +1 -1
- package/dist/protocol/Authorize.mjs +71 -13
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +2 -1
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/request/SilentRequestHelpers.mjs +7 -4
- 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 +14 -2
- package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserDetection.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +1 -1
- package/dist/utils/PopupOriginCheck.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +13 -9
- package/lib/custom-auth-path/msal-custom-auth.cjs +764 -314
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +764 -314
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +13 -9
- package/lib/msal-browser.cjs +791 -215
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +791 -215
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +231 -60
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +231 -60
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +2 -2
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/app/IPublicClientApplication.ts +16 -0
- package/src/app/PublicClientApplication.ts +22 -0
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +11 -44
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +1 -2
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +2 -6
- package/src/cache/BrowserCacheManager.ts +66 -6
- package/src/config/Configuration.ts +35 -0
- package/src/controllers/NestedAppAuthController.ts +35 -2
- package/src/controllers/StandardController.ts +76 -12
- package/src/controllers/UnknownOperatingContextController.ts +10 -0
- package/src/crypto/BrowserCrypto.ts +367 -2
- package/src/custom_auth/CustomAuthActionInputs.ts +0 -9
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +0 -3
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +0 -3
- package/src/custom_auth/controller/CustomAuthStandardController.ts +15 -2
- package/src/custom_auth/core/CustomAuthAuthority.ts +2 -1
- package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts +0 -3
- package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.ts +0 -7
- package/src/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/mfa/state/MfaState.ts +0 -6
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +0 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +0 -3
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +8 -6
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +1 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +43 -29
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +21 -2
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +12 -8
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +35 -4
- package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +10 -47
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +9 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +5 -5
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +2 -5
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +2 -4
- package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +1 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +0 -2
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -1
- package/src/custom_auth/sign_in/auth_flow/result/SignInResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +0 -1
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -1
- package/src/error/AsymmetricEarSubErrors.ts +18 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/BaseInteractionClient.ts +6 -1
- package/src/interaction_client/PlatformAuthInteractionClient.ts +28 -8
- package/src/interaction_client/PopupClient.ts +59 -29
- package/src/interaction_client/RedirectClient.ts +10 -13
- package/src/interaction_client/SilentIframeClient.ts +9 -13
- package/src/interaction_client/StandardInteractionClient.ts +1 -0
- package/src/packageMetadata.ts +1 -1
- package/src/popup_relay/constants.ts +34 -3
- package/src/popup_relay/index.ts +200 -45
- package/src/popup_relay/relayClient.ts +108 -24
- package/src/protocol/Authorize.ts +123 -11
- package/src/request/EndSessionPopupRequest.ts +3 -0
- package/src/request/PopupRequest.ts +1 -0
- package/src/request/RedirectRequest.ts +4 -0
- package/src/request/RequestHelpers.ts +5 -0
- package/src/request/SilentRequestHelpers.ts +10 -4
- package/src/request/SsoSilentRequest.ts +1 -0
- package/src/telemetry/BrowserPerformanceEvents.ts +14 -0
- package/types/app/IPublicClientApplication.d.ts +8 -0
- package/types/app/IPublicClientApplication.d.ts.map +1 -1
- package/types/app/PublicClientApplication.d.ts +6 -1
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +0 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +2 -6
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +20 -2
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +14 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/controllers/NestedAppAuthController.d.ts +5 -0
- package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +4 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/controllers/UnknownOperatingContextController.d.ts +5 -0
- package/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/types/crypto/BrowserCrypto.d.ts +34 -0
- package/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +0 -9
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +0 -3
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +0 -3
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/CustomAuthAuthority.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
- package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
- package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +0 -4
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +0 -2
- 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 +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +0 -1
- 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 +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +0 -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/CompletedStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.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 +3 -2
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +10 -1
- 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/BaseApiClientV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -1
- 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/HrefResolverV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -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 +8 -0
- 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 +4 -5
- 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 -6
- 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 +2 -5
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
- package/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +0 -2
- 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 +0 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +0 -2
- 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/state/SignInContinuationStateV2.d.ts +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +0 -2
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +0 -2
- 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/AttributesRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
- package/types/error/AsymmetricEarSubErrors.d.ts +14 -0
- package/types/error/AsymmetricEarSubErrors.d.ts.map +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/types/interaction_client/BaseInteractionClient.d.ts +3 -2
- package/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts +3 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts +0 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/popup_relay/constants.d.ts +10 -3
- package/types/popup_relay/constants.d.ts.map +1 -1
- package/types/popup_relay/index.d.ts +27 -11
- package/types/popup_relay/index.d.ts.map +1 -1
- package/types/popup_relay/relayClient.d.ts +9 -11
- package/types/popup_relay/relayClient.d.ts.map +1 -1
- package/types/protocol/Authorize.d.ts +5 -0
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/EndSessionPopupRequest.d.ts +3 -0
- package/types/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/types/request/PopupRequest.d.ts +1 -1
- package/types/request/PopupRequest.d.ts.map +1 -1
- package/types/request/RedirectRequest.d.ts +4 -1
- package/types/request/RedirectRequest.d.ts.map +1 -1
- package/types/request/RequestHelpers.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/request/SsoSilentRequest.d.ts +1 -1
- package/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +12 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.31.0 2026-12-02 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v16.
|
|
5
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -62,7 +62,7 @@ const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
|
62
62
|
*/
|
|
63
63
|
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
64
64
|
|
|
65
|
-
/*! @azure/msal-common v16.
|
|
65
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
66
66
|
/*
|
|
67
67
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
68
68
|
* Licensed under the MIT License.
|
|
@@ -296,7 +296,7 @@ const JsonWebTokenTypes = {
|
|
|
296
296
|
// Token renewal offset default in seconds
|
|
297
297
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
298
298
|
|
|
299
|
-
/*! @azure/msal-common v16.
|
|
299
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
300
300
|
/*
|
|
301
301
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
302
302
|
* Licensed under the MIT License.
|
|
@@ -325,7 +325,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
325
325
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
/*! @azure/msal-common v16.
|
|
328
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
329
329
|
|
|
330
330
|
/*
|
|
331
331
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -348,7 +348,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
348
348
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
/*! @azure/msal-common v16.
|
|
351
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
352
352
|
/*
|
|
353
353
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
354
354
|
* Licensed under the MIT License.
|
|
@@ -386,7 +386,7 @@ const methodNotImplemented = "method_not_implemented";
|
|
|
386
386
|
const resourceParameterRequired = "resource_parameter_required";
|
|
387
387
|
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
388
388
|
|
|
389
|
-
/*! @azure/msal-common v16.
|
|
389
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
390
390
|
|
|
391
391
|
/*
|
|
392
392
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -424,7 +424,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
/*! @azure/msal-common v16.
|
|
427
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
428
428
|
|
|
429
429
|
/*
|
|
430
430
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -490,7 +490,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
490
490
|
return matches[2];
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
-
/*! @azure/msal-common v16.
|
|
493
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
494
494
|
|
|
495
495
|
/*
|
|
496
496
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -578,7 +578,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
578
578
|
return updatedAccountInfo;
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
/*! @azure/msal-common v16.
|
|
581
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
582
582
|
/*
|
|
583
583
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
584
584
|
* Licensed under the MIT License.
|
|
@@ -592,7 +592,7 @@ const AuthorityType = {
|
|
|
592
592
|
Ciam: 3,
|
|
593
593
|
};
|
|
594
594
|
|
|
595
|
-
/*! @azure/msal-common v16.
|
|
595
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
596
596
|
/*
|
|
597
597
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
598
598
|
* Licensed under the MIT License.
|
|
@@ -614,7 +614,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
614
614
|
return null;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
/*! @azure/msal-common v16.
|
|
617
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
618
618
|
/*
|
|
619
619
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
620
620
|
* Licensed under the MIT License.
|
|
@@ -638,7 +638,7 @@ const ProtocolMode = {
|
|
|
638
638
|
EAR: "EAR",
|
|
639
639
|
};
|
|
640
640
|
|
|
641
|
-
/*! @azure/msal-common v16.
|
|
641
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
642
642
|
/**
|
|
643
643
|
* Returns the AccountInfo interface for this account.
|
|
644
644
|
* @internal
|
|
@@ -827,7 +827,7 @@ function isAccountEntity(entity) {
|
|
|
827
827
|
entity.hasOwnProperty("authorityType"));
|
|
828
828
|
}
|
|
829
829
|
|
|
830
|
-
/*! @azure/msal-common v16.
|
|
830
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
831
831
|
/*
|
|
832
832
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
833
833
|
* Licensed under the MIT License.
|
|
@@ -837,7 +837,7 @@ function isAccountEntity(entity) {
|
|
|
837
837
|
*/
|
|
838
838
|
const unexpectedError = "unexpected_error";
|
|
839
839
|
|
|
840
|
-
/*! @azure/msal-common v16.
|
|
840
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
841
841
|
|
|
842
842
|
/*
|
|
843
843
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -857,7 +857,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
857
857
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
858
858
|
}
|
|
859
859
|
|
|
860
|
-
/*! @azure/msal-common v16.
|
|
860
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
861
861
|
/*
|
|
862
862
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
863
863
|
* Licensed under the MIT License.
|
|
@@ -897,7 +897,7 @@ function getResponseHeader(headers, name) {
|
|
|
897
897
|
return headerName === undefined ? undefined : headers[headerName];
|
|
898
898
|
}
|
|
899
899
|
|
|
900
|
-
/*! @azure/msal-common v16.
|
|
900
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
901
901
|
/*
|
|
902
902
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
903
903
|
* Licensed under the MIT License.
|
|
@@ -928,7 +928,7 @@ const invalidDpopHtu = "invalid_dpop_htu";
|
|
|
928
928
|
const invalidDpopNonce = "invalid_dpop_nonce";
|
|
929
929
|
const dpopMissingResourceContext = "dpop_missing_resource_context";
|
|
930
930
|
|
|
931
|
-
/*! @azure/msal-common v16.
|
|
931
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
932
932
|
/*
|
|
933
933
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
934
934
|
* Licensed under the MIT License.
|
|
@@ -940,7 +940,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
940
940
|
response.hasOwnProperty("jwks_uri"));
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
-
/*! @azure/msal-common v16.
|
|
943
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
944
944
|
/*
|
|
945
945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
946
946
|
* Licensed under the MIT License.
|
|
@@ -1020,7 +1020,7 @@ class StringUtils {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
|
-
/*! @azure/msal-common v16.
|
|
1023
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1024
1024
|
|
|
1025
1025
|
/*
|
|
1026
1026
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1207,7 +1207,7 @@ class UrlString {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
1210
|
-
/*! @azure/msal-common v16.
|
|
1210
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1211
1211
|
|
|
1212
1212
|
/*
|
|
1213
1213
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1361,7 +1361,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1361
1361
|
return null;
|
|
1362
1362
|
}
|
|
1363
1363
|
|
|
1364
|
-
/*! @azure/msal-common v16.
|
|
1364
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1365
1365
|
/*
|
|
1366
1366
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1367
1367
|
* Licensed under the MIT License.
|
|
@@ -1370,7 +1370,7 @@ const AzureCloudInstance = {
|
|
|
1370
1370
|
// AzureCloudInstance is not specified.
|
|
1371
1371
|
None: "none"};
|
|
1372
1372
|
|
|
1373
|
-
/*! @azure/msal-common v16.
|
|
1373
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1374
1374
|
/*
|
|
1375
1375
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1376
1376
|
* Licensed under the MIT License.
|
|
@@ -1380,7 +1380,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1380
1380
|
response.hasOwnProperty("metadata"));
|
|
1381
1381
|
}
|
|
1382
1382
|
|
|
1383
|
-
/*! @azure/msal-common v16.
|
|
1383
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1384
1384
|
/*
|
|
1385
1385
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1386
1386
|
* Licensed under the MIT License.
|
|
@@ -1390,7 +1390,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1390
1390
|
response.hasOwnProperty("error_description"));
|
|
1391
1391
|
}
|
|
1392
1392
|
|
|
1393
|
-
/*! @azure/msal-common v16.
|
|
1393
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1394
1394
|
/*
|
|
1395
1395
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1396
1396
|
* Licensed under the MIT License.
|
|
@@ -1461,7 +1461,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1461
1461
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1462
1462
|
const SetUserData = "setUserData";
|
|
1463
1463
|
|
|
1464
|
-
/*! @azure/msal-common v16.
|
|
1464
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1465
1465
|
/*
|
|
1466
1466
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1467
1467
|
* Licensed under the MIT License.
|
|
@@ -1555,7 +1555,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1555
1555
|
};
|
|
1556
1556
|
};
|
|
1557
1557
|
|
|
1558
|
-
/*! @azure/msal-common v16.
|
|
1558
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1559
1559
|
|
|
1560
1560
|
/*
|
|
1561
1561
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1684,7 +1684,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1684
1684
|
},
|
|
1685
1685
|
};
|
|
1686
1686
|
|
|
1687
|
-
/*! @azure/msal-common v16.
|
|
1687
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1688
1688
|
/*
|
|
1689
1689
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1690
1690
|
* Licensed under the MIT License.
|
|
@@ -1749,7 +1749,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1749
1749
|
return cachedAtSec > nowSeconds();
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
|
-
/*! @azure/msal-common v16.
|
|
1752
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1753
1753
|
|
|
1754
1754
|
/*
|
|
1755
1755
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2036,7 +2036,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
2036
2036
|
return [...attributeTokens].sort().join(" ");
|
|
2037
2037
|
}
|
|
2038
2038
|
|
|
2039
|
-
/*! @azure/msal-common v16.
|
|
2039
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
2040
2040
|
|
|
2041
2041
|
/*
|
|
2042
2042
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3007,7 +3007,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3007
3007
|
};
|
|
3008
3008
|
}
|
|
3009
3009
|
|
|
3010
|
-
/*! @azure/msal-common v16.
|
|
3010
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3011
3011
|
|
|
3012
3012
|
/*
|
|
3013
3013
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3041,7 +3041,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3041
3041
|
}
|
|
3042
3042
|
}
|
|
3043
3043
|
|
|
3044
|
-
/*! @azure/msal-common v16.
|
|
3044
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3045
3045
|
|
|
3046
3046
|
/*
|
|
3047
3047
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3237,7 +3237,7 @@ class ScopeSet {
|
|
|
3237
3237
|
}
|
|
3238
3238
|
}
|
|
3239
3239
|
|
|
3240
|
-
/*! @azure/msal-common v16.
|
|
3240
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3241
3241
|
|
|
3242
3242
|
/*
|
|
3243
3243
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3705,12 +3705,13 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
|
|
|
3705
3705
|
* Add EAR (Encrypted Authorize Response) request parameters
|
|
3706
3706
|
* @param parameters
|
|
3707
3707
|
* @param jwk
|
|
3708
|
+
* @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
|
|
3708
3709
|
*/
|
|
3709
|
-
function addEARParameters(parameters, jwk) {
|
|
3710
|
+
function addEARParameters(parameters, jwk, jweCrypto) {
|
|
3710
3711
|
parameters.set(EAR_JWK, encodeURIComponent(jwk));
|
|
3711
|
-
//
|
|
3712
|
+
// Default symmetric EAR metadata; asymmetric requests supply their APV.
|
|
3712
3713
|
const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
|
|
3713
|
-
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
3714
|
+
parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
|
|
3714
3715
|
}
|
|
3715
3716
|
function addResource(parameters, resource) {
|
|
3716
3717
|
if (resource) {
|
|
@@ -3737,7 +3738,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3737
3738
|
}
|
|
3738
3739
|
}
|
|
3739
3740
|
|
|
3740
|
-
/*! @azure/msal-common v16.
|
|
3741
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3741
3742
|
|
|
3742
3743
|
/*
|
|
3743
3744
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3868,7 +3869,7 @@ function validateUrl(url, logger, correlationId) {
|
|
|
3868
3869
|
}
|
|
3869
3870
|
}
|
|
3870
3871
|
|
|
3871
|
-
/*! @azure/msal-common v16.
|
|
3872
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3872
3873
|
|
|
3873
3874
|
/*
|
|
3874
3875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3916,7 +3917,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3916
3917
|
},
|
|
3917
3918
|
};
|
|
3918
3919
|
|
|
3919
|
-
/*! @azure/msal-common v16.
|
|
3920
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3920
3921
|
|
|
3921
3922
|
/*
|
|
3922
3923
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3939,7 +3940,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
3939
3940
|
},
|
|
3940
3941
|
};
|
|
3941
3942
|
|
|
3942
|
-
/*! @azure/msal-common v16.
|
|
3943
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3943
3944
|
/*
|
|
3944
3945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3945
3946
|
* Licensed under the MIT License.
|
|
@@ -4214,12 +4215,12 @@ class Logger {
|
|
|
4214
4215
|
}
|
|
4215
4216
|
}
|
|
4216
4217
|
|
|
4217
|
-
/*! @azure/msal-common v16.
|
|
4218
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4218
4219
|
/* eslint-disable header/header */
|
|
4219
4220
|
const name$1 = "@azure/msal-common";
|
|
4220
|
-
const version$1 = "16.
|
|
4221
|
+
const version$1 = "16.18.0";
|
|
4221
4222
|
|
|
4222
|
-
/*! @azure/msal-common v16.
|
|
4223
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4223
4224
|
/*
|
|
4224
4225
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4225
4226
|
* Licensed under the MIT License.
|
|
@@ -4227,7 +4228,7 @@ const version$1 = "16.16.2";
|
|
|
4227
4228
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4228
4229
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4229
4230
|
|
|
4230
|
-
/*! @azure/msal-common v16.
|
|
4231
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4231
4232
|
|
|
4232
4233
|
/*
|
|
4233
4234
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4265,7 +4266,7 @@ function createCacheError(e) {
|
|
|
4265
4266
|
}
|
|
4266
4267
|
}
|
|
4267
4268
|
|
|
4268
|
-
/*! @azure/msal-common v16.
|
|
4269
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4269
4270
|
|
|
4270
4271
|
/*
|
|
4271
4272
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5492,7 +5493,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5492
5493
|
}
|
|
5493
5494
|
}
|
|
5494
5495
|
|
|
5495
|
-
/*! @azure/msal-common v16.
|
|
5496
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5496
5497
|
/*
|
|
5497
5498
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5498
5499
|
* Licensed under the MIT License.
|
|
@@ -5506,7 +5507,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5506
5507
|
const PerformanceEventStatus = {
|
|
5507
5508
|
InProgress: 1};
|
|
5508
5509
|
|
|
5509
|
-
/*! @azure/msal-common v16.
|
|
5510
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5510
5511
|
|
|
5511
5512
|
/*
|
|
5512
5513
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5564,7 +5565,7 @@ class StubPerformanceClient {
|
|
|
5564
5565
|
}
|
|
5565
5566
|
}
|
|
5566
5567
|
|
|
5567
|
-
/*! @azure/msal-common v16.
|
|
5568
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5568
5569
|
|
|
5569
5570
|
/*
|
|
5570
5571
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5618,7 +5619,7 @@ const DEFAULT_TELEMETRY_OPTIONS = {
|
|
|
5618
5619
|
* @returns Configuration
|
|
5619
5620
|
* @internal
|
|
5620
5621
|
*/
|
|
5621
|
-
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
|
|
5622
|
+
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, dpopNonceProvider: dpopNonceProvider, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
|
|
5622
5623
|
const loggerOptions = {
|
|
5623
5624
|
...DEFAULT_LOGGER_IMPLEMENTATION,
|
|
5624
5625
|
...userLoggerOption,
|
|
@@ -5633,6 +5634,7 @@ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions:
|
|
|
5633
5634
|
networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
|
|
5634
5635
|
cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
|
|
5635
5636
|
tokenBindingKeyManager: resolvedTokenBindingKeyManager,
|
|
5637
|
+
dpopNonceProvider,
|
|
5636
5638
|
clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
|
|
5637
5639
|
libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
|
|
5638
5640
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
|
|
@@ -5662,7 +5664,7 @@ function isOidcProtocolMode(config) {
|
|
|
5662
5664
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5663
5665
|
}
|
|
5664
5666
|
|
|
5665
|
-
/*! @azure/msal-common v16.
|
|
5667
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5666
5668
|
/*
|
|
5667
5669
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5668
5670
|
* Licensed under the MIT License.
|
|
@@ -5689,7 +5691,7 @@ function isOidcProtocolMode(config) {
|
|
|
5689
5691
|
}
|
|
5690
5692
|
}
|
|
5691
5693
|
|
|
5692
|
-
/*! @azure/msal-common v16.
|
|
5694
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5693
5695
|
|
|
5694
5696
|
/*
|
|
5695
5697
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5710,7 +5712,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5710
5712
|
return new JoseHeaderError(code, correlationId);
|
|
5711
5713
|
}
|
|
5712
5714
|
|
|
5713
|
-
/*! @azure/msal-common v16.
|
|
5715
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5714
5716
|
/*
|
|
5715
5717
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5716
5718
|
* Licensed under the MIT License.
|
|
@@ -5735,7 +5737,7 @@ function isPlainObject(value) {
|
|
|
5735
5737
|
return Object.getPrototypeOf(value) === proto;
|
|
5736
5738
|
}
|
|
5737
5739
|
|
|
5738
|
-
/*! @azure/msal-common v16.
|
|
5740
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5739
5741
|
/*
|
|
5740
5742
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5741
5743
|
* Licensed under the MIT License.
|
|
@@ -5745,7 +5747,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5745
5747
|
const missingJwkError = "missing_jwk_error";
|
|
5746
5748
|
const invalidJwkError = "invalid_jwk_error";
|
|
5747
5749
|
|
|
5748
|
-
/*! @azure/msal-common v16.
|
|
5750
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5749
5751
|
|
|
5750
5752
|
/*
|
|
5751
5753
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5811,7 +5813,7 @@ class JoseHeader {
|
|
|
5811
5813
|
}
|
|
5812
5814
|
}
|
|
5813
5815
|
|
|
5814
|
-
/*! @azure/msal-common v16.
|
|
5816
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5815
5817
|
|
|
5816
5818
|
/*
|
|
5817
5819
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5912,7 +5914,50 @@ class PopTokenGenerator {
|
|
|
5912
5914
|
}
|
|
5913
5915
|
}
|
|
5914
5916
|
|
|
5915
|
-
/*! @azure/msal-common v16.
|
|
5917
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5918
|
+
|
|
5919
|
+
/*
|
|
5920
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5921
|
+
* Licensed under the MIT License.
|
|
5922
|
+
*/
|
|
5923
|
+
/**
|
|
5924
|
+
* Validates that a DPoP nonce is a non-empty string and returns the opaque
|
|
5925
|
+
* value unchanged.
|
|
5926
|
+
* @internal
|
|
5927
|
+
*/
|
|
5928
|
+
function validateDpopNonce(nonce, correlationId = "") {
|
|
5929
|
+
if (typeof nonce !== "string" || nonce.length === 0) {
|
|
5930
|
+
throw createClientConfigurationError(invalidDpopNonce, correlationId);
|
|
5931
|
+
}
|
|
5932
|
+
return nonce;
|
|
5933
|
+
}
|
|
5934
|
+
/**
|
|
5935
|
+
* Returns the normalized HTTPS origin used to scope a resource-server nonce.
|
|
5936
|
+
* @internal
|
|
5937
|
+
*/
|
|
5938
|
+
function canonicalizeDpopResourceServer(resourceRequestUri, correlationId = "") {
|
|
5939
|
+
if (typeof resourceRequestUri !== "string" ||
|
|
5940
|
+
!/^https:\/\//i.test(resourceRequestUri)) {
|
|
5941
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
5942
|
+
}
|
|
5943
|
+
let parsedUrl;
|
|
5944
|
+
try {
|
|
5945
|
+
parsedUrl = new URL(resourceRequestUri);
|
|
5946
|
+
}
|
|
5947
|
+
catch {
|
|
5948
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
5949
|
+
}
|
|
5950
|
+
if (parsedUrl.protocol !== "https:" ||
|
|
5951
|
+
parsedUrl.origin === "null" ||
|
|
5952
|
+
!parsedUrl.hostname ||
|
|
5953
|
+
parsedUrl.username ||
|
|
5954
|
+
parsedUrl.password) {
|
|
5955
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
5956
|
+
}
|
|
5957
|
+
return parsedUrl.origin;
|
|
5958
|
+
}
|
|
5959
|
+
|
|
5960
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5916
5961
|
|
|
5917
5962
|
/*
|
|
5918
5963
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5957,11 +6002,6 @@ function normalizeHtu(url, correlationId) {
|
|
|
5957
6002
|
parsedUrl.hash = "";
|
|
5958
6003
|
return parsedUrl.href;
|
|
5959
6004
|
}
|
|
5960
|
-
function validateDpopNonce(nonce, correlationId) {
|
|
5961
|
-
if (nonce !== undefined && nonce.trim().length === 0) {
|
|
5962
|
-
throw createClientConfigurationError(invalidDpopNonce, correlationId);
|
|
5963
|
-
}
|
|
5964
|
-
}
|
|
5965
6005
|
/**
|
|
5966
6006
|
* Validates and normalizes the HTTP resource context for a DPoP-bound request.
|
|
5967
6007
|
* @internal
|
|
@@ -6005,7 +6045,6 @@ class DpopProofGenerator {
|
|
|
6005
6045
|
* - jti is a fresh CSPRNG-backed unique identifier for every proof.
|
|
6006
6046
|
*/
|
|
6007
6047
|
buildTokenProofClaims(params, correlationId = "") {
|
|
6008
|
-
validateDpopNonce(params.nonce, correlationId);
|
|
6009
6048
|
const claims = {
|
|
6010
6049
|
jti: this.cryptoUtils.createNewGuid(),
|
|
6011
6050
|
htm: "POST",
|
|
@@ -6013,7 +6052,7 @@ class DpopProofGenerator {
|
|
|
6013
6052
|
iat: nowSeconds(),
|
|
6014
6053
|
};
|
|
6015
6054
|
if (params.nonce !== undefined) {
|
|
6016
|
-
claims.nonce = params.nonce;
|
|
6055
|
+
claims.nonce = validateDpopNonce(params.nonce, correlationId);
|
|
6017
6056
|
}
|
|
6018
6057
|
return claims;
|
|
6019
6058
|
}
|
|
@@ -6031,7 +6070,6 @@ class DpopProofGenerator {
|
|
|
6031
6070
|
* - jti is a fresh CSPRNG-backed unique identifier for every proof.
|
|
6032
6071
|
*/
|
|
6033
6072
|
buildResourceProofClaims(params, correlationId = "") {
|
|
6034
|
-
validateDpopNonce(params.nonce, correlationId);
|
|
6035
6073
|
const resourceContext = normalizeDpopResourceRequestContext(params, correlationId);
|
|
6036
6074
|
const claims = {
|
|
6037
6075
|
jti: this.cryptoUtils.createNewGuid(),
|
|
@@ -6041,7 +6079,7 @@ class DpopProofGenerator {
|
|
|
6041
6079
|
iat: nowSeconds(),
|
|
6042
6080
|
};
|
|
6043
6081
|
if (params.nonce !== undefined) {
|
|
6044
|
-
claims.nonce = params.nonce;
|
|
6082
|
+
claims.nonce = validateDpopNonce(params.nonce, correlationId);
|
|
6045
6083
|
}
|
|
6046
6084
|
return claims;
|
|
6047
6085
|
}
|
|
@@ -6067,7 +6105,7 @@ class DpopProofGenerator {
|
|
|
6067
6105
|
}
|
|
6068
6106
|
}
|
|
6069
6107
|
|
|
6070
|
-
/*! @azure/msal-common v16.
|
|
6108
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6071
6109
|
/*
|
|
6072
6110
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6073
6111
|
* Licensed under the MIT License.
|
|
@@ -6118,7 +6156,7 @@ const badToken = "bad_token";
|
|
|
6118
6156
|
*/
|
|
6119
6157
|
const interruptedUser = "interrupted_user";
|
|
6120
6158
|
|
|
6121
|
-
/*! @azure/msal-common v16.
|
|
6159
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6122
6160
|
|
|
6123
6161
|
/*
|
|
6124
6162
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6185,7 +6223,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6185
6223
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6186
6224
|
}
|
|
6187
6225
|
|
|
6188
|
-
/*! @azure/msal-common v16.
|
|
6226
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6189
6227
|
|
|
6190
6228
|
/*
|
|
6191
6229
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6204,7 +6242,7 @@ class ServerError extends AuthError {
|
|
|
6204
6242
|
}
|
|
6205
6243
|
}
|
|
6206
6244
|
|
|
6207
|
-
/*! @azure/msal-common v16.
|
|
6245
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6208
6246
|
|
|
6209
6247
|
/*
|
|
6210
6248
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6275,18 +6313,29 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6275
6313
|
}
|
|
6276
6314
|
}
|
|
6277
6315
|
|
|
6278
|
-
/*! @azure/msal-common v16.
|
|
6316
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6279
6317
|
|
|
6280
6318
|
/*
|
|
6281
6319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6282
6320
|
* Licensed under the MIT License.
|
|
6283
6321
|
*/
|
|
6322
|
+
/*
|
|
6323
|
+
* Retains the signing key for fresh proofs on deduplicated calls without
|
|
6324
|
+
* exposing it on the public AuthenticationResult.
|
|
6325
|
+
*/
|
|
6326
|
+
const dpopKeyIdByAuthenticationResult = new WeakMap();
|
|
6327
|
+
function getDpopNonceForRequest(dpopNonceProvider, request) {
|
|
6328
|
+
if (!request.resourceRequestUri || !dpopNonceProvider) {
|
|
6329
|
+
return undefined;
|
|
6330
|
+
}
|
|
6331
|
+
return dpopNonceProvider.getDpopNonce(request.resourceRequestUri, request.correlationId);
|
|
6332
|
+
}
|
|
6284
6333
|
/**
|
|
6285
6334
|
* Class that handles response parsing.
|
|
6286
6335
|
* @internal
|
|
6287
6336
|
*/
|
|
6288
6337
|
class ResponseHandler {
|
|
6289
|
-
constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
|
|
6338
|
+
constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, dpopNonceProvider) {
|
|
6290
6339
|
this.clientId = clientId;
|
|
6291
6340
|
this.cacheStorage = cacheStorage;
|
|
6292
6341
|
this.cryptoObj = cryptoObj;
|
|
@@ -6295,6 +6344,7 @@ class ResponseHandler {
|
|
|
6295
6344
|
this.performanceClient = performanceClient;
|
|
6296
6345
|
this.serializableCache = serializableCache;
|
|
6297
6346
|
this.persistencePlugin = persistencePlugin;
|
|
6347
|
+
this.dpopNonceProvider = dpopNonceProvider;
|
|
6298
6348
|
}
|
|
6299
6349
|
/**
|
|
6300
6350
|
* Function which validates server authorization token response.
|
|
@@ -6433,6 +6483,7 @@ class ResponseHandler {
|
|
|
6433
6483
|
requestState: requestStateObj,
|
|
6434
6484
|
requestId: serverRequestId,
|
|
6435
6485
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
6486
|
+
dpopNonceProvider: this.dpopNonceProvider,
|
|
6436
6487
|
});
|
|
6437
6488
|
}
|
|
6438
6489
|
}
|
|
@@ -6452,6 +6503,7 @@ class ResponseHandler {
|
|
|
6452
6503
|
serverTokenResponse,
|
|
6453
6504
|
requestId: serverRequestId,
|
|
6454
6505
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
6506
|
+
dpopNonceProvider: this.dpopNonceProvider,
|
|
6455
6507
|
});
|
|
6456
6508
|
}
|
|
6457
6509
|
/**
|
|
@@ -6549,7 +6601,7 @@ class ResponseHandler {
|
|
|
6549
6601
|
* @param stateString
|
|
6550
6602
|
*/
|
|
6551
6603
|
static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, performanceClient, options = {}) {
|
|
6552
|
-
const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, } = options;
|
|
6604
|
+
const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, dpopNonceProvider, } = options;
|
|
6553
6605
|
let accessToken = "";
|
|
6554
6606
|
let responseScopes = [];
|
|
6555
6607
|
let expiresOn = null;
|
|
@@ -6557,8 +6609,13 @@ class ResponseHandler {
|
|
|
6557
6609
|
let refreshOn;
|
|
6558
6610
|
let familyId = "";
|
|
6559
6611
|
let dpopProof;
|
|
6612
|
+
const cachedAccessTokenType = cacheRecord.accessToken?.tokenType || "";
|
|
6613
|
+
const isDpopAccessToken = cachedAccessTokenType.toLowerCase() ===
|
|
6614
|
+
AuthenticationScheme.DPOP.toLowerCase();
|
|
6615
|
+
const resultTokenType = isDpopAccessToken
|
|
6616
|
+
? AuthenticationScheme.DPOP
|
|
6617
|
+
: cachedAccessTokenType;
|
|
6560
6618
|
if (cacheRecord.accessToken) {
|
|
6561
|
-
const accessTokenType = cacheRecord.accessToken.tokenType?.toLowerCase();
|
|
6562
6619
|
/*
|
|
6563
6620
|
* if the request object has `popKid` property, `signPopToken` will be set to false and
|
|
6564
6621
|
* the token will be returned unsigned
|
|
@@ -6576,15 +6633,17 @@ class ResponseHandler {
|
|
|
6576
6633
|
else {
|
|
6577
6634
|
accessToken = cacheRecord.accessToken.secret;
|
|
6578
6635
|
}
|
|
6579
|
-
if (
|
|
6580
|
-
AuthenticationScheme.DPOP.toLowerCase()) {
|
|
6636
|
+
if (isDpopAccessToken) {
|
|
6581
6637
|
if (!cacheRecord.accessToken.keyId) {
|
|
6582
6638
|
throw createClientAuthError(keyIdMissing, request.correlationId);
|
|
6583
6639
|
}
|
|
6584
6640
|
const dpopProofGenerator = new DpopProofGenerator(cryptoObj, tokenBindingKeyManager);
|
|
6641
|
+
const dpopNonce = getDpopNonceForRequest(dpopNonceProvider, request);
|
|
6642
|
+
performanceClient?.addFields({ dpopNonceAppliedToProof: Boolean(dpopNonce) }, request.correlationId);
|
|
6585
6643
|
dpopProof = await dpopProofGenerator.generateResourceProof({
|
|
6586
6644
|
htu: request.resourceRequestUri,
|
|
6587
6645
|
htm: request.resourceRequestMethod,
|
|
6646
|
+
nonce: dpopNonce,
|
|
6588
6647
|
accessToken: cacheRecord.accessToken.secret,
|
|
6589
6648
|
}, cacheRecord.accessToken.keyId, request.correlationId);
|
|
6590
6649
|
}
|
|
@@ -6632,7 +6691,7 @@ class ResponseHandler {
|
|
|
6632
6691
|
? updateAccountTenantProfileData(getAccountInfo(cacheRecord.account), undefined, // tenantProfile optional
|
|
6633
6692
|
idTokenClaims, cacheRecord.idToken?.secret)
|
|
6634
6693
|
: null;
|
|
6635
|
-
|
|
6694
|
+
const authenticationResult = {
|
|
6636
6695
|
authority: authority.canonicalAuthority,
|
|
6637
6696
|
uniqueId: uid,
|
|
6638
6697
|
tenantId: tid,
|
|
@@ -6649,16 +6708,49 @@ class ResponseHandler {
|
|
|
6649
6708
|
correlationId: request.correlationId,
|
|
6650
6709
|
requestId: requestId || "",
|
|
6651
6710
|
familyId: familyId,
|
|
6652
|
-
tokenType:
|
|
6653
|
-
AuthenticationScheme.DPOP.toLowerCase()
|
|
6654
|
-
? AuthenticationScheme.DPOP
|
|
6655
|
-
: cacheRecord.accessToken?.tokenType || "",
|
|
6711
|
+
tokenType: resultTokenType,
|
|
6656
6712
|
state: requestState ? requestState.userRequestState : "",
|
|
6657
6713
|
cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || "",
|
|
6658
6714
|
msGraphHost: cacheRecord.account?.msGraphHost || "",
|
|
6659
6715
|
code: serverTokenResponse?.spa_code,
|
|
6660
6716
|
fromPlatformBroker: false,
|
|
6661
6717
|
};
|
|
6718
|
+
if (isDpopAccessToken && cacheRecord.accessToken?.keyId) {
|
|
6719
|
+
ResponseHandler.setDpopKeyId(authenticationResult, cacheRecord.accessToken.keyId);
|
|
6720
|
+
}
|
|
6721
|
+
return authenticationResult;
|
|
6722
|
+
}
|
|
6723
|
+
/**
|
|
6724
|
+
* Retains an MSAL-owned DPoP key for fresh proofs on deduplicated calls.
|
|
6725
|
+
* @internal
|
|
6726
|
+
*/
|
|
6727
|
+
static setDpopKeyId(authenticationResult, keyId) {
|
|
6728
|
+
dpopKeyIdByAuthenticationResult.set(authenticationResult, keyId);
|
|
6729
|
+
}
|
|
6730
|
+
/**
|
|
6731
|
+
* Returns whether MSAL can generate another proof for this result.
|
|
6732
|
+
* @internal
|
|
6733
|
+
*/
|
|
6734
|
+
static hasDpopKeyId(authenticationResult) {
|
|
6735
|
+
return dpopKeyIdByAuthenticationResult.has(authenticationResult);
|
|
6736
|
+
}
|
|
6737
|
+
/**
|
|
6738
|
+
* Generates a fresh resource proof for a previously constructed DPoP result.
|
|
6739
|
+
* @internal
|
|
6740
|
+
*/
|
|
6741
|
+
static async generateDpopResourceProof(cryptoObj, authenticationResult, request, performanceClient, options = {}) {
|
|
6742
|
+
const keyId = dpopKeyIdByAuthenticationResult.get(authenticationResult);
|
|
6743
|
+
if (!keyId) {
|
|
6744
|
+
throw createClientAuthError(keyIdMissing, request.correlationId);
|
|
6745
|
+
}
|
|
6746
|
+
const dpopNonce = getDpopNonceForRequest(options.dpopNonceProvider, request);
|
|
6747
|
+
performanceClient.addFields({ dpopNonceAppliedToProof: Boolean(dpopNonce) }, request.correlationId);
|
|
6748
|
+
return new DpopProofGenerator(cryptoObj, options.tokenBindingKeyManager ?? DEFAULT_TOKEN_BINDING_KEY_MANAGER).generateResourceProof({
|
|
6749
|
+
htu: request.resourceRequestUri,
|
|
6750
|
+
htm: request.resourceRequestMethod,
|
|
6751
|
+
nonce: dpopNonce,
|
|
6752
|
+
accessToken: authenticationResult.accessToken,
|
|
6753
|
+
}, keyId, request.correlationId);
|
|
6662
6754
|
}
|
|
6663
6755
|
}
|
|
6664
6756
|
/** @internal */
|
|
@@ -6703,7 +6795,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6703
6795
|
return baseAccount;
|
|
6704
6796
|
}
|
|
6705
6797
|
|
|
6706
|
-
/*! @azure/msal-common v16.
|
|
6798
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6707
6799
|
/*
|
|
6708
6800
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6709
6801
|
* Licensed under the MIT License.
|
|
@@ -6713,7 +6805,7 @@ const CcsCredentialType = {
|
|
|
6713
6805
|
UPN: "UPN",
|
|
6714
6806
|
};
|
|
6715
6807
|
|
|
6716
|
-
/*! @azure/msal-common v16.
|
|
6808
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6717
6809
|
/*
|
|
6718
6810
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6719
6811
|
* Licensed under the MIT License.
|
|
@@ -6732,7 +6824,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6732
6824
|
}
|
|
6733
6825
|
}
|
|
6734
6826
|
|
|
6735
|
-
/*! @azure/msal-common v16.
|
|
6827
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6736
6828
|
|
|
6737
6829
|
/*
|
|
6738
6830
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6756,7 +6848,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6756
6848
|
};
|
|
6757
6849
|
}
|
|
6758
6850
|
|
|
6759
|
-
/*! @azure/msal-common v16.
|
|
6851
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6760
6852
|
|
|
6761
6853
|
/*
|
|
6762
6854
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6846,7 +6938,7 @@ function getRetryAfterHeader(response) {
|
|
|
6846
6938
|
return undefined;
|
|
6847
6939
|
}
|
|
6848
6940
|
|
|
6849
|
-
/*! @azure/msal-common v16.
|
|
6941
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6850
6942
|
|
|
6851
6943
|
/*
|
|
6852
6944
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6877,7 +6969,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6877
6969
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6878
6970
|
}
|
|
6879
6971
|
|
|
6880
|
-
/*! @azure/msal-common v16.
|
|
6972
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6881
6973
|
|
|
6882
6974
|
/*
|
|
6883
6975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7011,7 +7103,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
7011
7103
|
return response;
|
|
7012
7104
|
}
|
|
7013
7105
|
|
|
7014
|
-
/*! @azure/msal-common v16.
|
|
7106
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7015
7107
|
|
|
7016
7108
|
/*
|
|
7017
7109
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7062,7 +7154,7 @@ class AuthorizationCodeClient {
|
|
|
7062
7154
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request, this.serverTelemetryManager);
|
|
7063
7155
|
// Retrieve requestId from response headers
|
|
7064
7156
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
7065
|
-
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
|
|
7157
|
+
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager, this.config.dpopNonceProvider);
|
|
7066
7158
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
7067
7159
|
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
7068
7160
|
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
|
|
@@ -7279,7 +7371,7 @@ class AuthorizationCodeClient {
|
|
|
7279
7371
|
}
|
|
7280
7372
|
}
|
|
7281
7373
|
|
|
7282
|
-
/*! @azure/msal-common v16.
|
|
7374
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7283
7375
|
|
|
7284
7376
|
/*
|
|
7285
7377
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7509,7 +7601,7 @@ function extractLoginHint(account) {
|
|
|
7509
7601
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7510
7602
|
}
|
|
7511
7603
|
|
|
7512
|
-
/*! @azure/msal-common v16.
|
|
7604
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7513
7605
|
|
|
7514
7606
|
/*
|
|
7515
7607
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7544,7 +7636,7 @@ class RefreshTokenClient {
|
|
|
7544
7636
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
7545
7637
|
// Retrieve requestId from response headers
|
|
7546
7638
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
7547
|
-
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
|
|
7639
|
+
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager, this.config.dpopNonceProvider);
|
|
7548
7640
|
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
7549
7641
|
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
|
|
7550
7642
|
}
|
|
@@ -7744,7 +7836,7 @@ class RefreshTokenClient {
|
|
|
7744
7836
|
}
|
|
7745
7837
|
}
|
|
7746
7838
|
|
|
7747
|
-
/*! @azure/msal-common v16.
|
|
7839
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7748
7840
|
|
|
7749
7841
|
/*
|
|
7750
7842
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8037,7 +8129,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
|
|
|
8037
8129
|
clearNativeBrokerErrorCode() { }
|
|
8038
8130
|
}
|
|
8039
8131
|
|
|
8040
|
-
/*! @azure/msal-common v16.
|
|
8132
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8041
8133
|
|
|
8042
8134
|
/*
|
|
8043
8135
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8160,11 +8252,12 @@ class SilentFlowClient {
|
|
|
8160
8252
|
return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, this.performanceClient, {
|
|
8161
8253
|
idTokenClaims,
|
|
8162
8254
|
tokenBindingKeyManager: this.config.tokenBindingKeyManager,
|
|
8255
|
+
dpopNonceProvider: this.config.dpopNonceProvider,
|
|
8163
8256
|
});
|
|
8164
8257
|
}
|
|
8165
8258
|
}
|
|
8166
8259
|
|
|
8167
|
-
/*! @azure/msal-common v16.
|
|
8260
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8168
8261
|
|
|
8169
8262
|
/*
|
|
8170
8263
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8180,7 +8273,7 @@ const StubbedNetworkModule = {
|
|
|
8180
8273
|
},
|
|
8181
8274
|
};
|
|
8182
8275
|
|
|
8183
|
-
/*! @azure/msal-common v16.
|
|
8276
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8184
8277
|
|
|
8185
8278
|
/*
|
|
8186
8279
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8632,7 +8725,7 @@ function filterReservedSignUpAttributesV2(attributes, logger, correlationId) {
|
|
|
8632
8725
|
|
|
8633
8726
|
/* eslint-disable header/header */
|
|
8634
8727
|
const name = "@azure/msal-browser";
|
|
8635
|
-
const version = "5.
|
|
8728
|
+
const version = "5.31.0";
|
|
8636
8729
|
|
|
8637
8730
|
/*
|
|
8638
8731
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8962,7 +9055,6 @@ class SignInResult extends AuthFlowResultBase {
|
|
|
8962
9055
|
}
|
|
8963
9056
|
/**
|
|
8964
9057
|
* Checks if the result requires authentication method registration.
|
|
8965
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
8966
9058
|
*/
|
|
8967
9059
|
isAuthMethodRegistrationRequired() {
|
|
8968
9060
|
return (this.state.stateType ===
|
|
@@ -8970,7 +9062,6 @@ class SignInResult extends AuthFlowResultBase {
|
|
|
8970
9062
|
}
|
|
8971
9063
|
/**
|
|
8972
9064
|
* Checks if the result requires MFA.
|
|
8973
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
8974
9065
|
*/
|
|
8975
9066
|
isMfaRequired() {
|
|
8976
9067
|
return this.state.stateType === MFA_AWAITING_STATE_TYPE;
|
|
@@ -9161,6 +9252,11 @@ const AcquireTokenByRefreshToken = "acquireTokenByRefreshToken";
|
|
|
9161
9252
|
* Internal API for acquireTokenSilent.
|
|
9162
9253
|
*/
|
|
9163
9254
|
const AcquireTokenSilentAsync = "acquireTokenSilentAsync";
|
|
9255
|
+
/**
|
|
9256
|
+
* loadDpopNonce API in StandardController (msal-browser).
|
|
9257
|
+
* Stores a resource-server DPoP nonce in controller-owned memory.
|
|
9258
|
+
*/
|
|
9259
|
+
const StandardControllerLoadDpopNonce = "standardControllerLoadDpopNonce";
|
|
9164
9260
|
/**
|
|
9165
9261
|
* provisionTokenBindingKey API in TokenBindingKeyManager class (msal-browser).
|
|
9166
9262
|
* Used to provision token-binding key material and return a key identifier.
|
|
@@ -9276,6 +9372,13 @@ const UrlEncodeArr = "urlEncodeArr";
|
|
|
9276
9372
|
const Encrypt = "encrypt";
|
|
9277
9373
|
const Decrypt = "decrypt";
|
|
9278
9374
|
const GenerateEarKey = "generateEarKey";
|
|
9375
|
+
const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
|
|
9376
|
+
const ImportAsymmetricEarKey = "importAsymmetricEarKey";
|
|
9377
|
+
const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
|
|
9378
|
+
const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
|
|
9379
|
+
const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
|
|
9380
|
+
const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
|
|
9381
|
+
const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
|
|
9279
9382
|
const DecryptEarResponse = "decryptEarResponse";
|
|
9280
9383
|
/**
|
|
9281
9384
|
* Background telemetry measurement that tracks whether a late bridge response
|
|
@@ -9336,6 +9439,7 @@ const tokenBindingKeyJwkThumbprintMismatch = "token_binding_key_jwk_thumbprint_m
|
|
|
9336
9439
|
const failedToBuildHeaders = "failed_to_build_headers";
|
|
9337
9440
|
const failedToParseHeaders = "failed_to_parse_headers";
|
|
9338
9441
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
9442
|
+
const asymmetricEarKeyError = "asymmetric_ear_key_error";
|
|
9339
9443
|
const timedOut = "timed_out";
|
|
9340
9444
|
const emptyResponse = "empty_response";
|
|
9341
9445
|
|
|
@@ -9644,6 +9748,10 @@ const HKDF = "HKDF";
|
|
|
9644
9748
|
const S256_HASH_ALG = "SHA-256";
|
|
9645
9749
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
9646
9750
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
9751
|
+
const ECDH_P384_ALGORITHM = {
|
|
9752
|
+
name: "ECDH",
|
|
9753
|
+
namedCurve: "P-384",
|
|
9754
|
+
};
|
|
9647
9755
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
9648
9756
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
9649
9757
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -9781,6 +9889,16 @@ async function generateKeyPair(extractable, usages, algorithm) {
|
|
|
9781
9889
|
async function exportJwk(key) {
|
|
9782
9890
|
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
9783
9891
|
}
|
|
9892
|
+
/**
|
|
9893
|
+
* Imports key as Json Web Key (JWK), can set extractable and usages.
|
|
9894
|
+
* @param key
|
|
9895
|
+
* @param extractable
|
|
9896
|
+
* @param usages
|
|
9897
|
+
* @param algorithm
|
|
9898
|
+
*/
|
|
9899
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9900
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9901
|
+
}
|
|
9784
9902
|
/**
|
|
9785
9903
|
* Signs given data with given key.
|
|
9786
9904
|
* @param key
|
|
@@ -9803,6 +9921,172 @@ async function generateEarKey() {
|
|
|
9803
9921
|
};
|
|
9804
9922
|
return base64Encode(JSON.stringify(jwk));
|
|
9805
9923
|
}
|
|
9924
|
+
/**
|
|
9925
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
9926
|
+
* @internal
|
|
9927
|
+
*/
|
|
9928
|
+
async function generateAsymmetricEarKey() {
|
|
9929
|
+
const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9930
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
9931
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
9932
|
+
return {
|
|
9933
|
+
privateJwk,
|
|
9934
|
+
publicJwk,
|
|
9935
|
+
};
|
|
9936
|
+
}
|
|
9937
|
+
/**
|
|
9938
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
9939
|
+
* @internal
|
|
9940
|
+
*/
|
|
9941
|
+
async function importAsymmetricEarKey(privateJwk, correlationId = "") {
|
|
9942
|
+
if (privateJwk?.kty !== "EC" ||
|
|
9943
|
+
privateJwk.crv !== "P-384" ||
|
|
9944
|
+
!privateJwk.d) {
|
|
9945
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
|
|
9946
|
+
}
|
|
9947
|
+
try {
|
|
9948
|
+
return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9949
|
+
}
|
|
9950
|
+
catch {
|
|
9951
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
|
|
9952
|
+
}
|
|
9953
|
+
}
|
|
9954
|
+
/**
|
|
9955
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
9956
|
+
* @internal
|
|
9957
|
+
*/
|
|
9958
|
+
function generateAsymmetricEarApv(publicJwk) {
|
|
9959
|
+
const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
|
|
9960
|
+
if (point.length !== 97) {
|
|
9961
|
+
throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
|
|
9962
|
+
}
|
|
9963
|
+
const nonce = new Uint8Array(24);
|
|
9964
|
+
window.crypto.getRandomValues(nonce);
|
|
9965
|
+
return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
|
|
9966
|
+
}
|
|
9967
|
+
/**
|
|
9968
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
9969
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
9970
|
+
* @internal
|
|
9971
|
+
*/
|
|
9972
|
+
async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
|
|
9973
|
+
const correlationId = telemetry?.correlationId || "";
|
|
9974
|
+
const measure = (eventName, operation) => telemetry
|
|
9975
|
+
? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
|
|
9976
|
+
: operation();
|
|
9977
|
+
if (apv !== requestApv) {
|
|
9978
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
|
|
9979
|
+
}
|
|
9980
|
+
const parts = earJwe.split(".");
|
|
9981
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
9982
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9983
|
+
}
|
|
9984
|
+
let header;
|
|
9985
|
+
try {
|
|
9986
|
+
header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
|
|
9987
|
+
}
|
|
9988
|
+
catch {
|
|
9989
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
9990
|
+
}
|
|
9991
|
+
if (!header ||
|
|
9992
|
+
header.alg !== "ECDH-ES" ||
|
|
9993
|
+
header.enc !== "A256GCM" ||
|
|
9994
|
+
header.crit !== undefined ||
|
|
9995
|
+
header.zip !== undefined ||
|
|
9996
|
+
header.epk?.kty !== "EC" ||
|
|
9997
|
+
header.epk.crv !== "P-384" ||
|
|
9998
|
+
header.epk.d !== undefined ||
|
|
9999
|
+
(header.apv !== undefined && header.apv !== apv)) {
|
|
10000
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10001
|
+
}
|
|
10002
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
10003
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
10004
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
10005
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
10006
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
10007
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
10008
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
10009
|
+
if (x.length !== 48 ||
|
|
10010
|
+
y.length !== 48 ||
|
|
10011
|
+
iv.length !== 12 ||
|
|
10012
|
+
tag.length !== 16) {
|
|
10013
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10014
|
+
}
|
|
10015
|
+
let key;
|
|
10016
|
+
try {
|
|
10017
|
+
const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
|
|
10018
|
+
const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
|
|
10019
|
+
kty: "EC",
|
|
10020
|
+
crv: "P-384",
|
|
10021
|
+
x: header.epk.x,
|
|
10022
|
+
y: header.epk.y,
|
|
10023
|
+
}, false, [], ECDH_P384_ALGORITHM));
|
|
10024
|
+
const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
|
|
10025
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
10026
|
+
const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
|
|
10027
|
+
let derivedKey;
|
|
10028
|
+
try {
|
|
10029
|
+
derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
|
|
10030
|
+
}
|
|
10031
|
+
finally {
|
|
10032
|
+
secret.fill(0);
|
|
10033
|
+
input.fill(0);
|
|
10034
|
+
}
|
|
10035
|
+
try {
|
|
10036
|
+
key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
|
|
10037
|
+
}
|
|
10038
|
+
finally {
|
|
10039
|
+
new Uint8Array(derivedKey).fill(0);
|
|
10040
|
+
}
|
|
10041
|
+
}
|
|
10042
|
+
catch (error) {
|
|
10043
|
+
if (error instanceof AuthError) {
|
|
10044
|
+
throw error;
|
|
10045
|
+
}
|
|
10046
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
|
|
10047
|
+
}
|
|
10048
|
+
try {
|
|
10049
|
+
const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
|
|
10050
|
+
name: AES_GCM,
|
|
10051
|
+
iv,
|
|
10052
|
+
tagLength: 128,
|
|
10053
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
10054
|
+
}, key, concatEarBytes(ciphertext, tag)));
|
|
10055
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
10056
|
+
}
|
|
10057
|
+
catch {
|
|
10058
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
|
|
10059
|
+
}
|
|
10060
|
+
}
|
|
10061
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
10062
|
+
function decodeEarBase64Url(value, correlationId = "") {
|
|
10063
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
10064
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
10065
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10066
|
+
}
|
|
10067
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
10068
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
10069
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10070
|
+
}
|
|
10071
|
+
return bytes;
|
|
10072
|
+
}
|
|
10073
|
+
function earUint32(value) {
|
|
10074
|
+
const bytes = new Uint8Array(4);
|
|
10075
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
10076
|
+
return bytes;
|
|
10077
|
+
}
|
|
10078
|
+
function concatEarBytes(...parts) {
|
|
10079
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
10080
|
+
let offset = 0;
|
|
10081
|
+
for (const part of parts) {
|
|
10082
|
+
bytes.set(part, offset);
|
|
10083
|
+
offset += part.length;
|
|
10084
|
+
}
|
|
10085
|
+
return bytes.buffer;
|
|
10086
|
+
}
|
|
10087
|
+
function lengthPrefixEarBytes(bytes) {
|
|
10088
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
10089
|
+
}
|
|
9806
10090
|
/**
|
|
9807
10091
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
9808
10092
|
* @param earJwk
|
|
@@ -9836,7 +10120,9 @@ async function decryptEarResponse(earJwk, earJwe) {
|
|
|
9836
10120
|
const iv = base64DecToArr(earJweParts[2]);
|
|
9837
10121
|
const ciphertext = base64DecToArr(earJweParts[3]);
|
|
9838
10122
|
const tag = base64DecToArr(earJweParts[4]);
|
|
9839
|
-
|
|
10123
|
+
if (tag.byteLength !== 16) {
|
|
10124
|
+
throw new Error("Invalid AES-GCM authentication tag length");
|
|
10125
|
+
}
|
|
9840
10126
|
// Concat ciphertext and tag
|
|
9841
10127
|
const encryptedData = new Uint8Array(ciphertext.length + tag.length);
|
|
9842
10128
|
encryptedData.set(ciphertext);
|
|
@@ -9844,7 +10130,7 @@ async function decryptEarResponse(earJwk, earJwe) {
|
|
|
9844
10130
|
const decryptedData = await window.crypto.subtle.decrypt({
|
|
9845
10131
|
name: AES_GCM,
|
|
9846
10132
|
iv: iv,
|
|
9847
|
-
tagLength:
|
|
10133
|
+
tagLength: 128,
|
|
9848
10134
|
additionalData: header,
|
|
9849
10135
|
}, key, encryptedData);
|
|
9850
10136
|
return new TextDecoder().decode(decryptedData);
|
|
@@ -10908,7 +11194,7 @@ TokenBindingKeyManager.TOKEN_BINDING_KEY_USAGES = [
|
|
|
10908
11194
|
* Licensed under the MIT License.
|
|
10909
11195
|
*/
|
|
10910
11196
|
class BaseInteractionClient {
|
|
10911
|
-
constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, platformAuthProvider, tokenBindingKeyManager) {
|
|
11197
|
+
constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, platformAuthProvider, tokenBindingKeyManager, dpopNonceProvider) {
|
|
10912
11198
|
this.config = config;
|
|
10913
11199
|
this.browserStorage = storageImpl;
|
|
10914
11200
|
this.browserCrypto = browserCrypto;
|
|
@@ -10922,6 +11208,7 @@ class BaseInteractionClient {
|
|
|
10922
11208
|
this.tokenBindingKeyManager =
|
|
10923
11209
|
tokenBindingKeyManager ||
|
|
10924
11210
|
new TokenBindingKeyManager(this.logger, this.performanceClient);
|
|
11211
|
+
this.dpopNonceProvider = dpopNonceProvider ?? storageImpl;
|
|
10925
11212
|
}
|
|
10926
11213
|
}
|
|
10927
11214
|
/**
|
|
@@ -11020,6 +11307,7 @@ async function getDiscoveredAuthority(config, correlationId, performanceClient,
|
|
|
11020
11307
|
* @returns A promise that resolves when the cache has been cleared.
|
|
11021
11308
|
*/
|
|
11022
11309
|
async function clearCacheOnLogout(browserStorage, browserCrypto, logger, correlationId, account) {
|
|
11310
|
+
browserStorage.clearDpopNonces();
|
|
11023
11311
|
if (account) {
|
|
11024
11312
|
// Clear given account.
|
|
11025
11313
|
try {
|
|
@@ -11301,6 +11589,7 @@ async function initializeBaseRequest(request, config, performanceClient, logger,
|
|
|
11301
11589
|
}
|
|
11302
11590
|
logger.verbose(`1ecmns ${validatedRequest.authenticationScheme}`, correlationId);
|
|
11303
11591
|
}
|
|
11592
|
+
performanceClient.addFields({ authenticationScheme: validatedRequest.authenticationScheme }, correlationId);
|
|
11304
11593
|
return validatedRequest;
|
|
11305
11594
|
}
|
|
11306
11595
|
async function initializeSilentRequest(request, account, config, performanceClient, logger) {
|
|
@@ -11575,6 +11864,7 @@ class StandardInteractionClient extends BaseInteractionClient {
|
|
|
11575
11864
|
},
|
|
11576
11865
|
cryptoInterface: this.browserCrypto,
|
|
11577
11866
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
11867
|
+
dpopNonceProvider: this.dpopNonceProvider,
|
|
11578
11868
|
networkInterface: this.networkClient,
|
|
11579
11869
|
storageInterface: this.browserStorage,
|
|
11580
11870
|
serverTelemetryManager: serverTelemetryManager,
|
|
@@ -12682,27 +12972,21 @@ class ResponseHandlerV2 {
|
|
|
12682
12972
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12683
12973
|
* Licensed under the MIT License.
|
|
12684
12974
|
*/
|
|
12685
|
-
const API_MARKERS = ["/api/", "/oauth2/"];
|
|
12686
|
-
/*
|
|
12687
|
-
* Resolves a HAL href against the configured authority. Absolute HTTP(S) URLs
|
|
12688
|
-
* pass through; relative URLs retain their API path and query while using the
|
|
12689
|
-
* configured tenant path.
|
|
12690
|
-
*
|
|
12691
|
-
* TODO: Remove tenant-path rewriting once the service consistently returns links that can be
|
|
12692
|
-
* resolved directly against the configured authority.
|
|
12693
|
-
*/
|
|
12694
12975
|
function resolveHrefV2(base, href) {
|
|
12695
12976
|
const trimmed = href.trim();
|
|
12696
12977
|
if (!trimmed) {
|
|
12697
12978
|
throw new ParsedUrlError(InvalidUrl, "The HAL href cannot be empty");
|
|
12698
12979
|
}
|
|
12699
|
-
const absolute = tryParseAbsolute(trimmed);
|
|
12700
|
-
if (absolute) {
|
|
12701
|
-
return absolute;
|
|
12702
|
-
}
|
|
12703
12980
|
let resolved;
|
|
12704
12981
|
try {
|
|
12705
|
-
|
|
12982
|
+
let path = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
12983
|
+
const lowerHref = trimmed.toLowerCase();
|
|
12984
|
+
if (lowerHref.startsWith("https://") ||
|
|
12985
|
+
lowerHref.startsWith("http://")) {
|
|
12986
|
+
const absoluteHref = new URL(trimmed);
|
|
12987
|
+
path = `${absoluteHref.pathname}${absoluteHref.search}${absoluteHref.hash}`;
|
|
12988
|
+
}
|
|
12989
|
+
resolved = new URL(`${base.origin}${path}`);
|
|
12706
12990
|
}
|
|
12707
12991
|
catch (e) {
|
|
12708
12992
|
throw new ParsedUrlError(InvalidUrl, `The HAL href "${href}" could not be resolved: ${e}`);
|
|
@@ -12710,31 +12994,7 @@ function resolveHrefV2(base, href) {
|
|
|
12710
12994
|
if (resolved.protocol !== "http:" && resolved.protocol !== "https:") {
|
|
12711
12995
|
throw new ParsedUrlError(InvalidUrl, `The HAL href "${href}" must use the HTTP or HTTPS protocol`);
|
|
12712
12996
|
}
|
|
12713
|
-
const tenantPath = base.pathname.endsWith("/")
|
|
12714
|
-
? base.pathname.slice(0, -1)
|
|
12715
|
-
: base.pathname;
|
|
12716
|
-
resolved.pathname = tenantPath + apiPath(resolved.pathname);
|
|
12717
12997
|
return resolved;
|
|
12718
|
-
}
|
|
12719
|
-
function tryParseAbsolute(href) {
|
|
12720
|
-
try {
|
|
12721
|
-
const url = new URL(href);
|
|
12722
|
-
return url.protocol === "http:" || url.protocol === "https:"
|
|
12723
|
-
? url
|
|
12724
|
-
: undefined;
|
|
12725
|
-
}
|
|
12726
|
-
catch {
|
|
12727
|
-
return undefined;
|
|
12728
|
-
}
|
|
12729
|
-
}
|
|
12730
|
-
function apiPath(path) {
|
|
12731
|
-
for (const marker of API_MARKERS) {
|
|
12732
|
-
const index = path.indexOf(marker);
|
|
12733
|
-
if (index >= 0) {
|
|
12734
|
-
return path.slice(index);
|
|
12735
|
-
}
|
|
12736
|
-
}
|
|
12737
|
-
return path.startsWith("/") ? path : `/${path}`;
|
|
12738
12998
|
}
|
|
12739
12999
|
|
|
12740
13000
|
/*
|
|
@@ -12841,17 +13101,17 @@ class BaseApiClientV2 {
|
|
|
12841
13101
|
* Redeems a continuation token for an authorization code and then tokens.
|
|
12842
13102
|
*/
|
|
12843
13103
|
async completeWithTokens(request, context) {
|
|
12844
|
-
const code = await this.authorizeChallengeContinue(request.continuationToken, context);
|
|
13104
|
+
const code = await this.authorizeChallengeContinue(request.continueHref, request.continuationToken, context);
|
|
12845
13105
|
return this.token(code, context);
|
|
12846
13106
|
}
|
|
12847
13107
|
/*
|
|
12848
13108
|
* Redeems a continuation token for an authorization code.
|
|
12849
13109
|
*/
|
|
12850
|
-
async authorizeChallengeContinue(continuationToken, context) {
|
|
13110
|
+
async authorizeChallengeContinue(continueHref, continuationToken, context) {
|
|
12851
13111
|
const request = {
|
|
12852
13112
|
continuation_token: continuationToken,
|
|
12853
13113
|
};
|
|
12854
|
-
const parsedResponse = await this.postOAuthForm(
|
|
13114
|
+
const parsedResponse = await this.postOAuthForm(resolveHrefV2(this.baseRequestUrl, continueHref), request, context);
|
|
12855
13115
|
this.throwOnApiError(parsedResponse);
|
|
12856
13116
|
const code = parsedResponse.body.code;
|
|
12857
13117
|
if (!code) {
|
|
@@ -12900,7 +13160,9 @@ class BaseApiClientV2 {
|
|
|
12900
13160
|
}
|
|
12901
13161
|
async postOAuthForm(endpoint, data, context) {
|
|
12902
13162
|
const formData = new URLSearchParams(Object.entries(data));
|
|
12903
|
-
const url =
|
|
13163
|
+
const url = typeof endpoint === "string"
|
|
13164
|
+
? buildUrl(this.baseRequestUrl.href, endpoint, this.customAuthApiQueryParams)
|
|
13165
|
+
: endpoint;
|
|
12904
13166
|
const response = await this.sendRequest(url, HttpMethod.POST, formData, URL_FORM_CONTENT_TYPE, context);
|
|
12905
13167
|
const parsedResponse = await this.handler.parseResponse(response, context.correlationId);
|
|
12906
13168
|
this.throwOnWebFallback(parsedResponse);
|
|
@@ -13042,6 +13304,7 @@ class CustomAuthApiClientV2 extends BaseApiClientV2 {
|
|
|
13042
13304
|
return {
|
|
13043
13305
|
nextAction: SignUpSubmitAttributesNextActionV2.CONTINUE,
|
|
13044
13306
|
continuationToken,
|
|
13307
|
+
continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, correlationId),
|
|
13045
13308
|
};
|
|
13046
13309
|
}
|
|
13047
13310
|
if (parsedResponse.body.action === COLLECT_ATTRIBUTES_RELATION) {
|
|
@@ -13119,6 +13382,7 @@ class CustomAuthApiClientV2 extends BaseApiClientV2 {
|
|
|
13119
13382
|
return {
|
|
13120
13383
|
nextAction: ResponseStateV2.CONTINUE,
|
|
13121
13384
|
continuationToken: this.handler.requireContinuationToken(parsedResponse.continuationToken, parsedResponse.correlationId),
|
|
13385
|
+
continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, parsedResponse.correlationId),
|
|
13122
13386
|
};
|
|
13123
13387
|
}
|
|
13124
13388
|
/*
|
|
@@ -13166,6 +13430,7 @@ class CustomAuthApiClientV2 extends BaseApiClientV2 {
|
|
|
13166
13430
|
return {
|
|
13167
13431
|
nextAction,
|
|
13168
13432
|
continuationToken,
|
|
13433
|
+
continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, correlationId),
|
|
13169
13434
|
};
|
|
13170
13435
|
}
|
|
13171
13436
|
const message = `Password reset poll next action '${nextAction}' is not supported.`;
|
|
@@ -13189,6 +13454,7 @@ class CustomAuthApiClientV2 extends BaseApiClientV2 {
|
|
|
13189
13454
|
return {
|
|
13190
13455
|
nextAction: ResponseStateV2.CONTINUE,
|
|
13191
13456
|
continuationToken,
|
|
13457
|
+
continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, correlationId),
|
|
13192
13458
|
};
|
|
13193
13459
|
}
|
|
13194
13460
|
if (parsedResponse.body.action === COLLECT_ATTRIBUTES_RELATION) {
|
|
@@ -13297,11 +13563,16 @@ class CustomAuthApiClientV2 extends BaseApiClientV2 {
|
|
|
13297
13563
|
}
|
|
13298
13564
|
resolveMethods(methods, correlationId) {
|
|
13299
13565
|
const resolved = [];
|
|
13300
|
-
methods.forEach((method
|
|
13566
|
+
methods.forEach((method) => {
|
|
13301
13567
|
const href = method._links?.challenge?.href;
|
|
13302
13568
|
if (href) {
|
|
13569
|
+
if (typeof method.id !== "string" || !method.id.trim()) {
|
|
13570
|
+
const message = "Invalid HAL response: authentication method ID is missing or malformed";
|
|
13571
|
+
this.logger?.error(message, correlationId);
|
|
13572
|
+
throw new CustomAuthApiError(INVALID_HAL_RESPONSE, message, correlationId);
|
|
13573
|
+
}
|
|
13303
13574
|
resolved.push({
|
|
13304
|
-
id: method.id
|
|
13575
|
+
id: method.id,
|
|
13305
13576
|
type: method.type,
|
|
13306
13577
|
hint: method.hint,
|
|
13307
13578
|
challengeHref: href,
|
|
@@ -13381,6 +13652,7 @@ const FLOW_METHOD_SELECTION_REQUIRED_V2 = "FlowMethodSelectionRequiredResultV2";
|
|
|
13381
13652
|
const FLOW_CODE_REQUIRED_V2 = "FlowCodeRequiredResultV2";
|
|
13382
13653
|
const FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2 = "FlowExistingAccountCodeRequiredResultV2";
|
|
13383
13654
|
const FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2 = "FlowExistingAccountPasswordRequiredResultV2";
|
|
13655
|
+
const FLOW_EXISTING_ACCOUNT_START_V2 = "FlowExistingAccountStartResultV2";
|
|
13384
13656
|
const FLOW_PASSWORD_REQUIRED_V2 = "FlowPasswordRequiredResultV2";
|
|
13385
13657
|
const FLOW_SIGN_UP_PASSWORD_REQUIRED_V2 = "FlowSignUpPasswordRequiredResultV2";
|
|
13386
13658
|
const FLOW_MFA_REQUIRED_V2 = "FlowMFARequiredResultV2";
|
|
@@ -13402,6 +13674,9 @@ function createFlowExistingAccountCodeRequiredResultV2(input) {
|
|
|
13402
13674
|
function createFlowExistingAccountPasswordRequiredResultV2(input) {
|
|
13403
13675
|
return { type: FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2, ...input };
|
|
13404
13676
|
}
|
|
13677
|
+
function createFlowExistingAccountStartResultV2(input) {
|
|
13678
|
+
return { type: FLOW_EXISTING_ACCOUNT_START_V2, ...input };
|
|
13679
|
+
}
|
|
13405
13680
|
function createFlowPasswordRequiredResultV2(input) {
|
|
13406
13681
|
return { type: FLOW_PASSWORD_REQUIRED_V2, ...input };
|
|
13407
13682
|
}
|
|
@@ -13436,7 +13711,6 @@ function createFlowAuthMethodVerificationRequiredResultV2(input) {
|
|
|
13436
13711
|
*/
|
|
13437
13712
|
/**
|
|
13438
13713
|
* The native auth V2 flow that a result or error originates from.
|
|
13439
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
13440
13714
|
*/
|
|
13441
13715
|
const CustomAuthFlowScenarioV2 = {
|
|
13442
13716
|
SignIn: "signIn",
|
|
@@ -13604,17 +13878,25 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13604
13878
|
codeLength: startResult.codeLength,
|
|
13605
13879
|
});
|
|
13606
13880
|
}
|
|
13607
|
-
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13881
|
+
return createFlowExistingAccountStartResultV2({
|
|
13882
|
+
correlationId,
|
|
13883
|
+
continuationState: {
|
|
13884
|
+
continuationToken: startResult.continuationToken,
|
|
13885
|
+
scenario: CustomAuthFlowScenarioV2.SignIn,
|
|
13886
|
+
scopes,
|
|
13887
|
+
links: {},
|
|
13888
|
+
signUp: {
|
|
13889
|
+
purpose: "existingAccount",
|
|
13890
|
+
},
|
|
13614
13891
|
},
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13892
|
+
authenticationFactor: startResult.authenticationFactor,
|
|
13893
|
+
methods: startResult.methods,
|
|
13894
|
+
});
|
|
13895
|
+
}
|
|
13896
|
+
async challengeExistingAccount(parameters) {
|
|
13897
|
+
const { continuationState, correlationId } = parameters;
|
|
13898
|
+
this.ensureAuthenticationFactor(parameters.authenticationFactor, AuthenticationFactorV2.SINGLE_FACTOR, "existing-account sign-up", correlationId);
|
|
13899
|
+
const supportedMethods = parameters.methods
|
|
13618
13900
|
.map((method) => ({
|
|
13619
13901
|
id: method.id,
|
|
13620
13902
|
type: method.type ?? "",
|
|
@@ -13780,11 +14062,11 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13780
14062
|
continuationState: {
|
|
13781
14063
|
...continuationState,
|
|
13782
14064
|
continuationToken: result.continuationToken,
|
|
13783
|
-
links: {},
|
|
14065
|
+
links: { continue: result.continueHref },
|
|
13784
14066
|
},
|
|
13785
14067
|
});
|
|
13786
14068
|
}
|
|
13787
|
-
return this.completeSignInAfterVerification(continuationState, result.continuationToken, correlationId);
|
|
14069
|
+
return this.completeSignInAfterVerification(continuationState, result.continuationToken, result.continueHref, correlationId);
|
|
13788
14070
|
}
|
|
13789
14071
|
/*
|
|
13790
14072
|
* Requests a replacement authentication-method activation challenge.
|
|
@@ -13822,7 +14104,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13822
14104
|
continuationState: {
|
|
13823
14105
|
...continuationState,
|
|
13824
14106
|
continuationToken: verifyResult.continuationToken,
|
|
13825
|
-
links: {},
|
|
14107
|
+
links: { continue: verifyResult.continueHref },
|
|
13826
14108
|
},
|
|
13827
14109
|
});
|
|
13828
14110
|
}
|
|
@@ -13844,10 +14126,6 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13844
14126
|
if (continuationState.scenario === CustomAuthFlowScenarioV2.SignIn) {
|
|
13845
14127
|
return this.handleSignInVerification(continuationState, verifyResult, correlationId);
|
|
13846
14128
|
}
|
|
13847
|
-
if (continuationState.scenario === CustomAuthFlowScenarioV2.SignUp &&
|
|
13848
|
-
continuationState.signUp?.purpose === "existingAccount") {
|
|
13849
|
-
return this.handleSignInVerification(continuationState, verifyResult, correlationId);
|
|
13850
|
-
}
|
|
13851
14129
|
if (continuationState.scenario === CustomAuthFlowScenarioV2.SignUp) {
|
|
13852
14130
|
return this.handleSignUpVerification(continuationState, verifyResult, correlationId);
|
|
13853
14131
|
}
|
|
@@ -13875,9 +14153,9 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13875
14153
|
codeLength: challengeResult.codeLength,
|
|
13876
14154
|
});
|
|
13877
14155
|
}
|
|
13878
|
-
async submitSignUpAttributes(parameters) {
|
|
14156
|
+
async submitSignUpAttributes(parameters, step = "submitAttributes") {
|
|
13879
14157
|
const { continuationState, correlationId, attributes: submittedAttributes, } = parameters;
|
|
13880
|
-
const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario,
|
|
14158
|
+
const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, step, correlationId), correlationId);
|
|
13881
14159
|
this.logger.verbose("0js2ub", correlationId);
|
|
13882
14160
|
const submittedAttributeIds = Object.keys(submittedAttributes);
|
|
13883
14161
|
const submitResult = await this.apiClient.submitSignUpAttributes(this.requireLink(correlationId, continuationState.links.submitAttributes), {
|
|
@@ -13974,7 +14252,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13974
14252
|
continuationToken: pollResult.continuationToken,
|
|
13975
14253
|
scenario: continuationState.scenario,
|
|
13976
14254
|
scopes: continuationState.scopes,
|
|
13977
|
-
links: {},
|
|
14255
|
+
links: { continue: pollResult.continueHref },
|
|
13978
14256
|
},
|
|
13979
14257
|
});
|
|
13980
14258
|
}
|
|
@@ -14000,6 +14278,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
14000
14278
|
this.logger.verbose("09mk3f", correlationId);
|
|
14001
14279
|
const tokenResponse = await this.apiClient.completeWithTokens({
|
|
14002
14280
|
continuationToken: continuationState.continuationToken,
|
|
14281
|
+
continueHref: this.requireLink(correlationId, continuationState.links.continue),
|
|
14003
14282
|
}, context);
|
|
14004
14283
|
const authenticationResult = await this.handleTokenResponse(tokenResponse, continuationState.scopes, correlationId, apiId);
|
|
14005
14284
|
this.logger.verbose("15nu4j", correlationId);
|
|
@@ -14038,7 +14317,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
14038
14317
|
});
|
|
14039
14318
|
}
|
|
14040
14319
|
if (verifyResult.nextAction === ResponseStateV2.CONTINUE) {
|
|
14041
|
-
return this.completeSignInAfterVerification(continuationState, verifyResult.continuationToken, correlationId);
|
|
14320
|
+
return this.completeSignInAfterVerification(continuationState, verifyResult.continuationToken, verifyResult.continueHref, correlationId);
|
|
14042
14321
|
}
|
|
14043
14322
|
const message = `Verification next action '${verifyResult.nextAction}' is not supported for authentication.`;
|
|
14044
14323
|
this.logger.error(message, correlationId);
|
|
@@ -14094,7 +14373,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
14094
14373
|
continuationState: {
|
|
14095
14374
|
...continuationState,
|
|
14096
14375
|
continuationToken: verifyResult.continuationToken,
|
|
14097
|
-
links: {},
|
|
14376
|
+
links: { continue: verifyResult.continueHref },
|
|
14098
14377
|
},
|
|
14099
14378
|
});
|
|
14100
14379
|
}
|
|
@@ -14233,7 +14512,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
14233
14512
|
continuationState: {
|
|
14234
14513
|
...continuationState,
|
|
14235
14514
|
continuationToken: result.continuationToken,
|
|
14236
|
-
links: {},
|
|
14515
|
+
links: { continue: result.continueHref },
|
|
14237
14516
|
},
|
|
14238
14517
|
});
|
|
14239
14518
|
}
|
|
@@ -14295,13 +14574,13 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
14295
14574
|
password: parameters.password,
|
|
14296
14575
|
}, context);
|
|
14297
14576
|
}
|
|
14298
|
-
completeSignInAfterVerification(continuationState, continuationToken, correlationId) {
|
|
14577
|
+
completeSignInAfterVerification(continuationState, continuationToken, continueHref, correlationId) {
|
|
14299
14578
|
return this.signInWithContinuation({
|
|
14300
14579
|
correlationId,
|
|
14301
14580
|
continuationState: {
|
|
14302
14581
|
...continuationState,
|
|
14303
14582
|
continuationToken,
|
|
14304
|
-
links: {},
|
|
14583
|
+
links: { continue: continueHref },
|
|
14305
14584
|
},
|
|
14306
14585
|
});
|
|
14307
14586
|
}
|
|
@@ -14366,7 +14645,6 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
14366
14645
|
*/
|
|
14367
14646
|
/**
|
|
14368
14647
|
* Terminal state indicating the operation failed.
|
|
14369
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14370
14648
|
*/
|
|
14371
14649
|
class FailedStateV2 extends AuthFlowStateBase {
|
|
14372
14650
|
constructor() {
|
|
@@ -14396,7 +14674,6 @@ const USER_NOT_FOUND = "userNotFound";
|
|
|
14396
14674
|
*/
|
|
14397
14675
|
/**
|
|
14398
14676
|
* Error returned by a native authentication V2 operation.
|
|
14399
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14400
14677
|
*/
|
|
14401
14678
|
class AuthFlowErrorV2 {
|
|
14402
14679
|
constructor(errorData, scenario = CustomAuthFlowScenarioV2.Unknown, errorContext = "default") {
|
|
@@ -14549,7 +14826,6 @@ class AuthFlowErrorV2 {
|
|
|
14549
14826
|
*/
|
|
14550
14827
|
/**
|
|
14551
14828
|
* Result of a native auth V2 operation.
|
|
14552
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14553
14829
|
*/
|
|
14554
14830
|
class CustomAuthResultV2 {
|
|
14555
14831
|
constructor(state, data, scenario = CustomAuthFlowScenarioV2.Unknown) {
|
|
@@ -14624,7 +14900,6 @@ class CustomAuthResultV2 {
|
|
|
14624
14900
|
*/
|
|
14625
14901
|
/**
|
|
14626
14902
|
* Terminal state indicating the operation completed successfully.
|
|
14627
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14628
14903
|
*/
|
|
14629
14904
|
class CompletedStateV2 extends AuthFlowStateBase {
|
|
14630
14905
|
constructor() {
|
|
@@ -14639,7 +14914,6 @@ class CompletedStateV2 extends AuthFlowStateBase {
|
|
|
14639
14914
|
*/
|
|
14640
14915
|
/**
|
|
14641
14916
|
* State returned when a completed V2 flow can sign the user in.
|
|
14642
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14643
14917
|
*/
|
|
14644
14918
|
class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase {
|
|
14645
14919
|
constructor() {
|
|
@@ -14708,7 +14982,6 @@ class ChallengeVerificationStateBaseV2 extends AuthFlowActionRequiredStateBase {
|
|
|
14708
14982
|
/**
|
|
14709
14983
|
* State returned when a newly registered authentication method must be
|
|
14710
14984
|
* activated with the challenge sent by the service.
|
|
14711
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14712
14985
|
*/
|
|
14713
14986
|
class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
14714
14987
|
constructor(stateParameters) {
|
|
@@ -14795,7 +15068,6 @@ class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequiredStateB
|
|
|
14795
15068
|
*/
|
|
14796
15069
|
/**
|
|
14797
15070
|
* State returned when an authentication method must be registered.
|
|
14798
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14799
15071
|
*/
|
|
14800
15072
|
class AuthMethodRegistrationRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
14801
15073
|
constructor(stateParameters) {
|
|
@@ -14853,7 +15125,6 @@ class AuthMethodRegistrationRequiredStateV2 extends AuthFlowActionRequiredStateB
|
|
|
14853
15125
|
*/
|
|
14854
15126
|
/**
|
|
14855
15127
|
* State returned when first-factor authentication requires a one-time code.
|
|
14856
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14857
15128
|
*/
|
|
14858
15129
|
class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
14859
15130
|
constructor() {
|
|
@@ -14974,7 +15245,6 @@ class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
|
14974
15245
|
/**
|
|
14975
15246
|
* State returned when authentication requires verification of an email or SMS MFA
|
|
14976
15247
|
* challenge. It allows the app to submit the challenge or request a replacement.
|
|
14977
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14978
15248
|
*/
|
|
14979
15249
|
class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
14980
15250
|
constructor() {
|
|
@@ -15198,7 +15468,6 @@ class ExistingAccountPasswordRequiredStateV2 extends AuthFlowActionRequiredState
|
|
|
15198
15468
|
*/
|
|
15199
15469
|
/**
|
|
15200
15470
|
* State returned when the user must select an authentication method.
|
|
15201
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15202
15471
|
*/
|
|
15203
15472
|
class AuthMethodSelectionRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
15204
15473
|
constructor(stateParameters) {
|
|
@@ -15225,9 +15494,7 @@ class AuthMethodSelectionRequiredStateV2 extends AuthFlowActionRequiredStateBase
|
|
|
15225
15494
|
cacheClient: this.stateParameters.cacheClient,
|
|
15226
15495
|
signInStateTransitionHandler,
|
|
15227
15496
|
};
|
|
15228
|
-
const isExistingAccountSignUp = continuationState.
|
|
15229
|
-
CustomAuthFlowScenarioV2.SignUp &&
|
|
15230
|
-
continuationState.signUp?.purpose === "existingAccount";
|
|
15497
|
+
const isExistingAccountSignUp = continuationState.signUp?.purpose === "existingAccount";
|
|
15231
15498
|
const channel = result.type === FLOW_CODE_REQUIRED_V2
|
|
15232
15499
|
? result.channel?.toLowerCase()
|
|
15233
15500
|
: undefined;
|
|
@@ -15334,7 +15601,6 @@ class AuthMethodSelectionRequiredStateV2 extends AuthFlowActionRequiredStateBase
|
|
|
15334
15601
|
*/
|
|
15335
15602
|
/**
|
|
15336
15603
|
* State returned when sign-in or sign-up requires a password.
|
|
15337
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15338
15604
|
*/
|
|
15339
15605
|
class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
15340
15606
|
constructor(stateParameters) {
|
|
@@ -15379,7 +15645,7 @@ class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
15379
15645
|
correlationId,
|
|
15380
15646
|
continuationState,
|
|
15381
15647
|
attributes: { password },
|
|
15382
|
-
});
|
|
15648
|
+
}, "submitPassword");
|
|
15383
15649
|
return signUpStateTransitionHandler.handleAttributeSubmission(result, { ...this.stateParameters, signUpStateTransitionHandler }, "password");
|
|
15384
15650
|
}
|
|
15385
15651
|
async submitSignInPassword(password) {
|
|
@@ -15455,7 +15721,6 @@ class SignInStateTransitionHandlerV2 {
|
|
|
15455
15721
|
* State returned when the user must supply a new password. Submission can
|
|
15456
15722
|
* require method registration or MFA, and the flow is not complete until any
|
|
15457
15723
|
* subsequent required actions finish.
|
|
15458
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15459
15724
|
*/
|
|
15460
15725
|
class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
15461
15726
|
constructor() {
|
|
@@ -15548,7 +15813,6 @@ class ResetPasswordStateTransitionHandlerV2 {
|
|
|
15548
15813
|
*/
|
|
15549
15814
|
/**
|
|
15550
15815
|
* State returned when sign-up requires profile or custom attributes.
|
|
15551
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15552
15816
|
*/
|
|
15553
15817
|
class AttributesRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
15554
15818
|
constructor(stateParameters) {
|
|
@@ -15646,7 +15910,7 @@ class CustomAuthAuthority extends Authority {
|
|
|
15646
15910
|
* @param customAuthProxyDomain - The custom auth proxy domain.
|
|
15647
15911
|
*/
|
|
15648
15912
|
constructor(authority, config, networkInterface, cacheManager, logger, performanceClient, customAuthProxyDomain) {
|
|
15649
|
-
const ciamAuthorityUrl = CustomAuthAuthority.transformCIAMAuthority(authority, "");
|
|
15913
|
+
const ciamAuthorityUrl = CustomAuthAuthority.transformCIAMAuthority(formatAuthorityUri(authority), "");
|
|
15650
15914
|
const authorityOptions = {
|
|
15651
15915
|
protocolMode: config.system.protocolMode,
|
|
15652
15916
|
OIDCOptions: config.auth.OIDCOptions,
|
|
@@ -16951,6 +17215,7 @@ class CustomAuthSilentCacheClient extends CustomAuthInteractionClientBase {
|
|
|
16951
17215
|
},
|
|
16952
17216
|
cryptoInterface: this.browserCrypto,
|
|
16953
17217
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
17218
|
+
dpopNonceProvider: this.browserStorage,
|
|
16954
17219
|
networkInterface: this.networkClient,
|
|
16955
17220
|
storageInterface: this.browserStorage,
|
|
16956
17221
|
serverTelemetryManager: serverTelemetryManager,
|
|
@@ -17048,7 +17313,6 @@ class SignInSubmitCodeResult extends AuthFlowResultBase {
|
|
|
17048
17313
|
}
|
|
17049
17314
|
/**
|
|
17050
17315
|
* Checks if the result requires authentication method registration.
|
|
17051
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17052
17316
|
*/
|
|
17053
17317
|
isAuthMethodRegistrationRequired() {
|
|
17054
17318
|
return (this.state.stateType ===
|
|
@@ -17056,7 +17320,6 @@ class SignInSubmitCodeResult extends AuthFlowResultBase {
|
|
|
17056
17320
|
}
|
|
17057
17321
|
/**
|
|
17058
17322
|
* Checks if the result requires MFA.
|
|
17059
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17060
17323
|
*/
|
|
17061
17324
|
isMfaRequired() {
|
|
17062
17325
|
return this.state.stateType === MFA_AWAITING_STATE_TYPE;
|
|
@@ -17138,7 +17401,6 @@ class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultBase {
|
|
|
17138
17401
|
/**
|
|
17139
17402
|
* Checks if the result indicates that verification is required.
|
|
17140
17403
|
* @returns true if verification is required, false otherwise.
|
|
17141
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17142
17404
|
*/
|
|
17143
17405
|
isVerificationRequired() {
|
|
17144
17406
|
return (this.state.stateType ===
|
|
@@ -17147,7 +17409,6 @@ class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultBase {
|
|
|
17147
17409
|
/**
|
|
17148
17410
|
* Checks if the result indicates that registration is completed (fast-pass scenario).
|
|
17149
17411
|
* @returns true if registration is completed, false otherwise.
|
|
17150
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17151
17412
|
*/
|
|
17152
17413
|
isCompleted() {
|
|
17153
17414
|
return (this.state.stateType ===
|
|
@@ -17156,7 +17417,6 @@ class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultBase {
|
|
|
17156
17417
|
/**
|
|
17157
17418
|
* Checks if the result is in a failed state.
|
|
17158
17419
|
* @returns true if the result is failed, false otherwise.
|
|
17159
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17160
17420
|
*/
|
|
17161
17421
|
isFailed() {
|
|
17162
17422
|
return (this.state.stateType === AUTH_METHOD_REGISTRATION_FAILED_STATE_TYPE);
|
|
@@ -17184,7 +17444,6 @@ class AuthMethodRegistrationSubmitChallengeResult extends AuthFlowResultBase {
|
|
|
17184
17444
|
/**
|
|
17185
17445
|
* Checks if the result indicates that registration is completed.
|
|
17186
17446
|
* @returns true if registration is completed, false otherwise.
|
|
17187
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17188
17447
|
*/
|
|
17189
17448
|
isCompleted() {
|
|
17190
17449
|
return (this.state.stateType ===
|
|
@@ -17193,7 +17452,6 @@ class AuthMethodRegistrationSubmitChallengeResult extends AuthFlowResultBase {
|
|
|
17193
17452
|
/**
|
|
17194
17453
|
* Checks if the result is in a failed state.
|
|
17195
17454
|
* @returns true if the result is failed, false otherwise.
|
|
17196
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17197
17455
|
*/
|
|
17198
17456
|
isFailed() {
|
|
17199
17457
|
return (this.state.stateType === AUTH_METHOD_REGISTRATION_FAILED_STATE_TYPE);
|
|
@@ -17294,7 +17552,6 @@ class AuthMethodRegistrationRequiredState extends AuthMethodRegistrationState {
|
|
|
17294
17552
|
/**
|
|
17295
17553
|
* Gets the available authentication methods for registration.
|
|
17296
17554
|
* @returns Array of available authentication methods.
|
|
17297
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17298
17555
|
*/
|
|
17299
17556
|
getAuthMethods() {
|
|
17300
17557
|
return this.stateParameters.authMethods;
|
|
@@ -17303,7 +17560,6 @@ class AuthMethodRegistrationRequiredState extends AuthMethodRegistrationState {
|
|
|
17303
17560
|
* Challenges an authentication method for registration.
|
|
17304
17561
|
* @param authMethodDetails The authentication method details to challenge.
|
|
17305
17562
|
* @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
|
|
17306
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17307
17563
|
*/
|
|
17308
17564
|
async challengeAuthMethod(authMethodDetails) {
|
|
17309
17565
|
return this.challengeAuthMethodInternal(authMethodDetails);
|
|
@@ -17323,7 +17579,6 @@ class AuthMethodVerificationRequiredState extends AuthMethodRegistrationState {
|
|
|
17323
17579
|
/**
|
|
17324
17580
|
* Gets the length of the expected verification code.
|
|
17325
17581
|
* @returns The code length.
|
|
17326
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17327
17582
|
*/
|
|
17328
17583
|
getCodeLength() {
|
|
17329
17584
|
return this.stateParameters.codeLength;
|
|
@@ -17331,7 +17586,6 @@ class AuthMethodVerificationRequiredState extends AuthMethodRegistrationState {
|
|
|
17331
17586
|
/**
|
|
17332
17587
|
* Gets the channel through which the challenge was sent.
|
|
17333
17588
|
* @returns The challenge channel (e.g., "email").
|
|
17334
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17335
17589
|
*/
|
|
17336
17590
|
getChannel() {
|
|
17337
17591
|
return this.stateParameters.challengeChannel;
|
|
@@ -17339,7 +17593,6 @@ class AuthMethodVerificationRequiredState extends AuthMethodRegistrationState {
|
|
|
17339
17593
|
/**
|
|
17340
17594
|
* Gets the target label indicating where the challenge was sent.
|
|
17341
17595
|
* @returns The challenge target label (e.g., masked email address).
|
|
17342
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17343
17596
|
*/
|
|
17344
17597
|
getSentTo() {
|
|
17345
17598
|
return this.stateParameters.challengeTargetLabel;
|
|
@@ -17348,7 +17601,6 @@ class AuthMethodVerificationRequiredState extends AuthMethodRegistrationState {
|
|
|
17348
17601
|
* Submits the verification challenge to complete the authentication method registration.
|
|
17349
17602
|
* @param code The verification code entered by the user.
|
|
17350
17603
|
* @returns Promise that resolves to AuthMethodRegistrationSubmitChallengeResult.
|
|
17351
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17352
17604
|
*/
|
|
17353
17605
|
async submitChallenge(code) {
|
|
17354
17606
|
try {
|
|
@@ -17377,7 +17629,6 @@ class AuthMethodVerificationRequiredState extends AuthMethodRegistrationState {
|
|
|
17377
17629
|
* Challenges a different authentication method for registration.
|
|
17378
17630
|
* @param authMethodDetails The authentication method details to challenge.
|
|
17379
17631
|
* @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
|
|
17380
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17381
17632
|
*/
|
|
17382
17633
|
async challengeAuthMethod(authMethodDetails) {
|
|
17383
17634
|
return this.challengeAuthMethodInternal(authMethodDetails);
|
|
@@ -17458,7 +17709,6 @@ class MfaSubmitChallengeResult extends AuthFlowResultBase {
|
|
|
17458
17709
|
/**
|
|
17459
17710
|
* Checks if the MFA flow is completed successfully.
|
|
17460
17711
|
* @returns true if completed, false otherwise.
|
|
17461
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17462
17712
|
*/
|
|
17463
17713
|
isCompleted() {
|
|
17464
17714
|
return this.state.stateType === MFA_COMPLETED_STATE_TYPE;
|
|
@@ -17466,7 +17716,6 @@ class MfaSubmitChallengeResult extends AuthFlowResultBase {
|
|
|
17466
17716
|
/**
|
|
17467
17717
|
* Checks if the result is in a failed state.
|
|
17468
17718
|
* @returns true if the result is failed, false otherwise.
|
|
17469
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17470
17719
|
*/
|
|
17471
17720
|
isFailed() {
|
|
17472
17721
|
return this.state.stateType === MFA_FAILED_STATE_TYPE;
|
|
@@ -17495,7 +17744,6 @@ class MfaRequestChallengeResult extends AuthFlowResultBase {
|
|
|
17495
17744
|
/**
|
|
17496
17745
|
* Checks if the result indicates that verification is required.
|
|
17497
17746
|
* @returns true if verification is required, false otherwise.
|
|
17498
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17499
17747
|
*/
|
|
17500
17748
|
isVerificationRequired() {
|
|
17501
17749
|
return this.state.stateType === MFA_VERIFICATION_REQUIRED_STATE_TYPE;
|
|
@@ -17503,7 +17751,6 @@ class MfaRequestChallengeResult extends AuthFlowResultBase {
|
|
|
17503
17751
|
/**
|
|
17504
17752
|
* Checks if the result is in a failed state.
|
|
17505
17753
|
* @returns true if the result is failed, false otherwise.
|
|
17506
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17507
17754
|
*/
|
|
17508
17755
|
isFailed() {
|
|
17509
17756
|
return this.state.stateType === MFA_FAILED_STATE_TYPE;
|
|
@@ -17536,7 +17783,6 @@ class MfaState extends AuthFlowActionRequiredStateBase {
|
|
|
17536
17783
|
* Requests an MFA challenge for a specific authentication method.
|
|
17537
17784
|
* @param authMethodId The authentication method ID to use for the challenge.
|
|
17538
17785
|
* @returns Promise that resolves to MfaRequestChallengeResult.
|
|
17539
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17540
17786
|
*/
|
|
17541
17787
|
async requestChallenge(authMethodId) {
|
|
17542
17788
|
try {
|
|
@@ -17585,7 +17831,6 @@ class MfaAwaitingState extends MfaState {
|
|
|
17585
17831
|
/**
|
|
17586
17832
|
* Gets the available authentication methods for MFA.
|
|
17587
17833
|
* @returns Array of available authentication methods.
|
|
17588
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17589
17834
|
*/
|
|
17590
17835
|
getAuthMethods() {
|
|
17591
17836
|
return this.stateParameters.authMethods;
|
|
@@ -17606,7 +17851,6 @@ class MfaVerificationRequiredState extends MfaState {
|
|
|
17606
17851
|
/**
|
|
17607
17852
|
* Gets the length of the code that the user needs to provide.
|
|
17608
17853
|
* @returns The expected code length.
|
|
17609
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17610
17854
|
*/
|
|
17611
17855
|
getCodeLength() {
|
|
17612
17856
|
return this.stateParameters.codeLength;
|
|
@@ -17614,7 +17858,6 @@ class MfaVerificationRequiredState extends MfaState {
|
|
|
17614
17858
|
/**
|
|
17615
17859
|
* Gets the channel through which the challenge was sent.
|
|
17616
17860
|
* @returns The challenge channel (e.g., "email").
|
|
17617
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17618
17861
|
*/
|
|
17619
17862
|
getChannel() {
|
|
17620
17863
|
return this.stateParameters.challengeChannel;
|
|
@@ -17622,7 +17865,6 @@ class MfaVerificationRequiredState extends MfaState {
|
|
|
17622
17865
|
/**
|
|
17623
17866
|
* Gets the target label indicating where the challenge was sent.
|
|
17624
17867
|
* @returns The challenge target label (e.g., masked email address).
|
|
17625
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17626
17868
|
*/
|
|
17627
17869
|
getSentTo() {
|
|
17628
17870
|
return this.stateParameters.challengeTargetLabel;
|
|
@@ -17631,7 +17873,6 @@ class MfaVerificationRequiredState extends MfaState {
|
|
|
17631
17873
|
* Submits the MFA challenge (e.g., OTP code) to complete the authentication.
|
|
17632
17874
|
* @param challenge The challenge code (e.g., OTP code) entered by the user.
|
|
17633
17875
|
* @returns Promise that resolves to MfaSubmitChallengeResult.
|
|
17634
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17635
17876
|
*/
|
|
17636
17877
|
async submitChallenge(challenge) {
|
|
17637
17878
|
try {
|
|
@@ -17878,7 +18119,6 @@ class SignInSubmitPasswordResult extends AuthFlowResultBase {
|
|
|
17878
18119
|
}
|
|
17879
18120
|
/**
|
|
17880
18121
|
* Checks if the result requires authentication method registration.
|
|
17881
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17882
18122
|
*/
|
|
17883
18123
|
isAuthMethodRegistrationRequired() {
|
|
17884
18124
|
return (this.state.stateType ===
|
|
@@ -17886,7 +18126,6 @@ class SignInSubmitPasswordResult extends AuthFlowResultBase {
|
|
|
17886
18126
|
}
|
|
17887
18127
|
/**
|
|
17888
18128
|
* Checks if the result requires MFA.
|
|
17889
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17890
18129
|
*/
|
|
17891
18130
|
isMfaRequired() {
|
|
17892
18131
|
return this.state.stateType === MFA_AWAITING_STATE_TYPE;
|
|
@@ -19462,6 +19701,7 @@ function removeElementFromArray(array, element) {
|
|
|
19462
19701
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19463
19702
|
* Licensed under the MIT License.
|
|
19464
19703
|
*/
|
|
19704
|
+
const MAX_RESOURCE_SERVER_NONCES = 50;
|
|
19465
19705
|
/**
|
|
19466
19706
|
* Reason an old-schema cache entry was removed during migration.
|
|
19467
19707
|
*/
|
|
@@ -19477,6 +19717,7 @@ const MigrationRemovalReason = {
|
|
|
19477
19717
|
class BrowserCacheManager extends CacheManager {
|
|
19478
19718
|
constructor(clientId, cacheConfig, cryptoImpl, logger, performanceClient, eventHandler, staticAuthorityOptions, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
|
|
19479
19719
|
super(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager);
|
|
19720
|
+
this.dpopNonces = new Map();
|
|
19480
19721
|
this.cacheConfig = cacheConfig;
|
|
19481
19722
|
this.logger = logger;
|
|
19482
19723
|
this.internalStorage = new MemoryStorage();
|
|
@@ -20497,6 +20738,40 @@ class BrowserCacheManager extends CacheManager {
|
|
|
20497
20738
|
const version = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_VER) || "";
|
|
20498
20739
|
return [sku, version];
|
|
20499
20740
|
}
|
|
20741
|
+
/**
|
|
20742
|
+
* Stores a validated resource-server DPoP nonce in PCA-local memory.
|
|
20743
|
+
* @internal
|
|
20744
|
+
*/
|
|
20745
|
+
setDpopNonce(resourceRequestUri, dpopNonce, correlationId = "") {
|
|
20746
|
+
const resourceServer = canonicalizeDpopResourceServer(resourceRequestUri, correlationId);
|
|
20747
|
+
const validatedNonce = validateDpopNonce(dpopNonce, correlationId);
|
|
20748
|
+
// Reinsert replacements so eviction remains oldest-write ordered.
|
|
20749
|
+
this.dpopNonces.delete(resourceServer);
|
|
20750
|
+
this.dpopNonces.set(resourceServer, validatedNonce);
|
|
20751
|
+
if (this.dpopNonces.size > MAX_RESOURCE_SERVER_NONCES) {
|
|
20752
|
+
const oldestResourceServer = this.dpopNonces.keys().next().value;
|
|
20753
|
+
if (oldestResourceServer) {
|
|
20754
|
+
this.dpopNonces.delete(oldestResourceServer);
|
|
20755
|
+
}
|
|
20756
|
+
this.performanceClient.incrementFields({ "ext.dpopNonceCacheEvictionCount": 1 }, correlationId);
|
|
20757
|
+
}
|
|
20758
|
+
}
|
|
20759
|
+
/**
|
|
20760
|
+
* Reads the current resource-server DPoP nonce from PCA-local memory.
|
|
20761
|
+
* This optional structural capability is consumed by msal-common without
|
|
20762
|
+
* adding methods to the CacheManager abstraction.
|
|
20763
|
+
* @internal
|
|
20764
|
+
*/
|
|
20765
|
+
getDpopNonce(resourceRequestUri, correlationId = "") {
|
|
20766
|
+
return this.dpopNonces.get(canonicalizeDpopResourceServer(resourceRequestUri, correlationId));
|
|
20767
|
+
}
|
|
20768
|
+
/**
|
|
20769
|
+
* Clears all PCA-local DPoP nonce state.
|
|
20770
|
+
* @internal
|
|
20771
|
+
*/
|
|
20772
|
+
clearDpopNonces() {
|
|
20773
|
+
this.dpopNonces.clear();
|
|
20774
|
+
}
|
|
20500
20775
|
/**
|
|
20501
20776
|
*
|
|
20502
20777
|
* @param key
|
|
@@ -20641,6 +20916,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
20641
20916
|
}
|
|
20642
20917
|
});
|
|
20643
20918
|
this.internalStorage.clear();
|
|
20919
|
+
this.dpopNonces.clear();
|
|
20644
20920
|
}
|
|
20645
20921
|
/**
|
|
20646
20922
|
* Prepend msal.<client-id> to each key
|
|
@@ -20747,8 +21023,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
20747
21023
|
}
|
|
20748
21024
|
}
|
|
20749
21025
|
catch (e) {
|
|
20750
|
-
this.logger.
|
|
20751
|
-
this.logger.error(`0tvdic ${e}`, correlationId);
|
|
21026
|
+
this.logger.error("023ixj", correlationId);
|
|
20752
21027
|
throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
|
|
20753
21028
|
}
|
|
20754
21029
|
return [parsedRequest, verifier];
|
|
@@ -21223,30 +21498,42 @@ function shouldUseEar(protocolMode, logger, performanceClient, correlationId, us
|
|
|
21223
21498
|
* page (see `runPopupRelay`) back to the embedded frame that opened it. See
|
|
21224
21499
|
* {@link BrowserAuthOptions.popupRelayUri}.
|
|
21225
21500
|
*
|
|
21226
|
-
*
|
|
21227
|
-
*
|
|
21228
|
-
* pulling in the other's dependencies.
|
|
21501
|
+
* Shared by the relay-page entry and client helpers without importing either
|
|
21502
|
+
* implementation into the other bundle.
|
|
21229
21503
|
*
|
|
21230
21504
|
* @internal
|
|
21231
21505
|
*/
|
|
21232
|
-
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
21506
|
+
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
21507
|
+
/** @internal Response bound to an authenticated v2 relay document. */
|
|
21508
|
+
const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
|
|
21509
|
+
/** @internal Ready signal for the authenticated popup-relay request handoff. */
|
|
21510
|
+
const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
|
|
21511
|
+
/** @internal Request delivered only to the same-origin relay window. */
|
|
21512
|
+
const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
|
|
21513
|
+
/** @internal Resolve the compatibility default without downgrading invalid versions. */
|
|
21514
|
+
function getPopupRelayProtocolVersion(version, correlationId = "") {
|
|
21515
|
+
if (version === undefined) {
|
|
21516
|
+
return 1;
|
|
21517
|
+
}
|
|
21518
|
+
if (version !== 1 && version !== 2) {
|
|
21519
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
|
|
21520
|
+
}
|
|
21521
|
+
return version;
|
|
21522
|
+
}
|
|
21233
21523
|
|
|
21234
21524
|
/*
|
|
21235
21525
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
21236
21526
|
* Licensed under the MIT License.
|
|
21237
21527
|
*/
|
|
21238
21528
|
/**
|
|
21239
|
-
* Builds the
|
|
21240
|
-
*
|
|
21241
|
-
*
|
|
21242
|
-
* library-state `id` so the relay page can listen on the right BroadcastChannel
|
|
21243
|
-
* and echo the id back. The relay URI is resolved against the app origin, so it
|
|
21244
|
-
* must be same-origin as the embedded frame. See `runPopupRelay`.
|
|
21529
|
+
* Builds the same-origin relay URL. V1 preserves the fragment descriptor;
|
|
21530
|
+
* explicitly selected v2 carries only the id and retains the navigation for
|
|
21531
|
+
* the authenticated handoff.
|
|
21245
21532
|
*
|
|
21246
21533
|
* @internal
|
|
21247
21534
|
*/
|
|
21248
|
-
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
21249
|
-
const
|
|
21535
|
+
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
|
|
21536
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
|
|
21250
21537
|
const target = new URL(popupRelayUri, window.location.origin);
|
|
21251
21538
|
/*
|
|
21252
21539
|
* The relay page must be same-origin as the embedded frame: the response is
|
|
@@ -21259,7 +21546,12 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
|
21259
21546
|
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
|
|
21260
21547
|
}
|
|
21261
21548
|
const hashParams = new URLSearchParams();
|
|
21262
|
-
|
|
21549
|
+
if (version === 1) {
|
|
21550
|
+
hashParams.set("req", JSON.stringify({ id, ...action }));
|
|
21551
|
+
}
|
|
21552
|
+
else {
|
|
21553
|
+
hashParams.set("id", id);
|
|
21554
|
+
}
|
|
21263
21555
|
target.hash = hashParams.toString();
|
|
21264
21556
|
return target.toString();
|
|
21265
21557
|
}
|
|
@@ -21270,21 +21562,30 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
|
21270
21562
|
* partitioning blocks the BroadcastChannel the redirect bridge uses from
|
|
21271
21563
|
* reaching the embedded frame.
|
|
21272
21564
|
*
|
|
21273
|
-
*
|
|
21274
|
-
*
|
|
21275
|
-
*
|
|
21565
|
+
* In v2, the retained navigation is sent once, after a ready signal from the popup
|
|
21566
|
+
* window we opened on our own origin with the matching library-state id.
|
|
21567
|
+
* Successful responses must also carry that handoff's relay-document nonce.
|
|
21568
|
+
* Setup failures can reject the request before the handoff completes.
|
|
21276
21569
|
*
|
|
21277
21570
|
* @internal
|
|
21278
21571
|
*/
|
|
21279
|
-
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
|
|
21572
|
+
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
|
|
21573
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
|
|
21574
|
+
if (version === 2 && !action) {
|
|
21575
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
|
|
21576
|
+
}
|
|
21280
21577
|
return new Promise((resolve, reject) => {
|
|
21281
21578
|
const correlationId = request.correlationId;
|
|
21282
21579
|
logger.verbose("1d05g9", correlationId);
|
|
21283
|
-
performanceClient.addFields({
|
|
21580
|
+
performanceClient.addFields({
|
|
21581
|
+
redirectBridgeTimeoutMs: timeoutMs,
|
|
21582
|
+
popupRelayProtocolVersion: version,
|
|
21583
|
+
}, correlationId);
|
|
21284
21584
|
const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
|
|
21285
21585
|
const expectedId = libraryState.id;
|
|
21286
21586
|
const expectedOrigin = window.location.origin;
|
|
21287
21587
|
let settled = false;
|
|
21588
|
+
let handoffNonce = "";
|
|
21288
21589
|
const cleanup = () => {
|
|
21289
21590
|
window.removeEventListener("message", onMessage);
|
|
21290
21591
|
clearTimeout(timeoutId);
|
|
@@ -21296,20 +21597,52 @@ async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow
|
|
|
21296
21597
|
return;
|
|
21297
21598
|
}
|
|
21298
21599
|
const data = event.data;
|
|
21299
|
-
if (!data ||
|
|
21300
|
-
data.type !== POPUP_RELAY_RESPONSE_TYPE ||
|
|
21301
|
-
data.id !== expectedId) {
|
|
21600
|
+
if (!data || data.id !== expectedId) {
|
|
21302
21601
|
return;
|
|
21303
21602
|
}
|
|
21304
21603
|
if (settled) {
|
|
21305
21604
|
return;
|
|
21306
21605
|
}
|
|
21606
|
+
if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
|
|
21607
|
+
if (handoffNonce ||
|
|
21608
|
+
typeof data.nonce !== "string" ||
|
|
21609
|
+
!data.nonce) {
|
|
21610
|
+
return;
|
|
21611
|
+
}
|
|
21612
|
+
handoffNonce = data.nonce;
|
|
21613
|
+
try {
|
|
21614
|
+
popupWindow.postMessage({
|
|
21615
|
+
type: POPUP_RELAY_REQUEST_TYPE,
|
|
21616
|
+
id: expectedId,
|
|
21617
|
+
nonce: handoffNonce,
|
|
21618
|
+
request: { id: expectedId, ...action },
|
|
21619
|
+
}, expectedOrigin);
|
|
21620
|
+
performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
|
|
21621
|
+
}
|
|
21622
|
+
catch {
|
|
21623
|
+
settled = true;
|
|
21624
|
+
cleanup();
|
|
21625
|
+
logger.error("0sx3jz", correlationId);
|
|
21626
|
+
reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
|
|
21627
|
+
}
|
|
21628
|
+
return;
|
|
21629
|
+
}
|
|
21630
|
+
const hasError = typeof data.error === "string" && data.error.length > 0;
|
|
21631
|
+
const responseType = version === 1
|
|
21632
|
+
? POPUP_RELAY_RESPONSE_TYPE
|
|
21633
|
+
: POPUP_RELAY_V2_RESPONSE_TYPE;
|
|
21634
|
+
if (data.type !== responseType ||
|
|
21635
|
+
(version === 2 &&
|
|
21636
|
+
((!handoffNonce && !hasError) ||
|
|
21637
|
+
(handoffNonce && data.nonce !== handoffNonce)))) {
|
|
21638
|
+
return;
|
|
21639
|
+
}
|
|
21307
21640
|
settled = true;
|
|
21308
21641
|
cleanup();
|
|
21309
|
-
if (
|
|
21310
|
-
reject(createBrowserAuthError(data.error, correlationId));
|
|
21642
|
+
if (hasError) {
|
|
21643
|
+
reject(createBrowserAuthError(data.error, correlationId, data.subError));
|
|
21311
21644
|
}
|
|
21312
|
-
else if (data.payload) {
|
|
21645
|
+
else if (typeof data.payload === "string" && data.payload) {
|
|
21313
21646
|
resolve(data.payload);
|
|
21314
21647
|
}
|
|
21315
21648
|
else {
|
|
@@ -21687,7 +22020,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
21687
22020
|
this.accountId = accountId;
|
|
21688
22021
|
this.platformAuthProvider = provider;
|
|
21689
22022
|
this.nativeStorageManager = nativeStorageImpl;
|
|
21690
|
-
this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, this.tokenBindingKeyManager);
|
|
22023
|
+
this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, this.tokenBindingKeyManager, browserStorage);
|
|
21691
22024
|
const extensionName = this.platformAuthProvider.getExtensionName();
|
|
21692
22025
|
this.skus = ServerTelemetryManager.makeExtraSkuString({
|
|
21693
22026
|
libraryName: BrowserConstants.MSAL_SKU,
|
|
@@ -22072,6 +22405,11 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
22072
22405
|
const shouldRemoveGeneratedDpopKey = isL3DpopResponse ||
|
|
22073
22406
|
(this.isDpopBrokerRequest(request) &&
|
|
22074
22407
|
storeInCache?.accessToken === false);
|
|
22408
|
+
if (dpopBrokerOutcome === "L1" &&
|
|
22409
|
+
!shouldRemoveGeneratedDpopKey &&
|
|
22410
|
+
request.keyId) {
|
|
22411
|
+
ResponseHandler.setDpopKeyId(result, request.keyId);
|
|
22412
|
+
}
|
|
22075
22413
|
if (shouldRemoveGeneratedDpopKey) {
|
|
22076
22414
|
await this.resetGeneratedDpopRequestKey(request);
|
|
22077
22415
|
}
|
|
@@ -22340,7 +22678,12 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
22340
22678
|
const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
|
|
22341
22679
|
? undefined
|
|
22342
22680
|
: this.config.auth.clientCapabilities;
|
|
22343
|
-
const { scopes, claims
|
|
22681
|
+
const { scopes, claims } = request;
|
|
22682
|
+
const dpopNonce = request.authenticationScheme ===
|
|
22683
|
+
AuthenticationScheme.DPOP &&
|
|
22684
|
+
request.resourceRequestUri
|
|
22685
|
+
? this.browserStorage.getDpopNonce(request.resourceRequestUri, this.correlationId)
|
|
22686
|
+
: undefined;
|
|
22344
22687
|
const scopeSet = new ScopeSet([...(scopes || []), ...OIDC_DEFAULT_SCOPES], this.correlationId);
|
|
22345
22688
|
const mergedClaims = buildMergedClaims(claims, configClaims?.length ? configClaims : undefined);
|
|
22346
22689
|
const hasAttributeTokens = !!request.attributeTokens?.length;
|
|
@@ -22650,11 +22993,14 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
22650
22993
|
return brokerProof;
|
|
22651
22994
|
}
|
|
22652
22995
|
const dpopProofGenerator = new DpopProofGenerator(this.browserCrypto, this.tokenBindingKeyManager);
|
|
22996
|
+
const currentNonce = request.resourceRequestUri
|
|
22997
|
+
? this.browserStorage.getDpopNonce(request.resourceRequestUri, this.correlationId)
|
|
22998
|
+
: undefined;
|
|
22653
22999
|
return dpopProofGenerator.generateResourceProof({
|
|
22654
23000
|
htu: request.resourceRequestUri,
|
|
22655
23001
|
htm: request.resourceRequestMethod,
|
|
22656
23002
|
accessToken: response.access_token,
|
|
22657
|
-
nonce: request.extraParametersNoCache?.pop_nonce,
|
|
23003
|
+
nonce: currentNonce ?? request.extraParametersNoCache?.pop_nonce,
|
|
22658
23004
|
}, request.keyId, this.correlationId);
|
|
22659
23005
|
}
|
|
22660
23006
|
/**
|
|
@@ -22977,6 +23323,36 @@ function getAuthorizeFormAction(authority, request, parameters) {
|
|
|
22977
23323
|
addCorrelationId(queryParams, request.correlationId);
|
|
22978
23324
|
return getAuthorizeUrl(authority, queryParams);
|
|
22979
23325
|
}
|
|
23326
|
+
/**
|
|
23327
|
+
* Prepares the selected EAR construction.
|
|
23328
|
+
* @internal
|
|
23329
|
+
*/
|
|
23330
|
+
async function initializeEarRequest(config, request, logger, performanceClient) {
|
|
23331
|
+
if (!config.experimental.enableAsymmetricEar) {
|
|
23332
|
+
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
|
|
23333
|
+
return {
|
|
23334
|
+
...request,
|
|
23335
|
+
earJwk,
|
|
23336
|
+
asymmetricEar: undefined,
|
|
23337
|
+
};
|
|
23338
|
+
}
|
|
23339
|
+
try {
|
|
23340
|
+
const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
|
|
23341
|
+
const apv = generateAsymmetricEarApv(publicJwk);
|
|
23342
|
+
const earJwk = base64Encode(JSON.stringify(publicJwk));
|
|
23343
|
+
return {
|
|
23344
|
+
...request,
|
|
23345
|
+
earJwk,
|
|
23346
|
+
asymmetricEar: { privateJwk, apv },
|
|
23347
|
+
};
|
|
23348
|
+
}
|
|
23349
|
+
catch (error) {
|
|
23350
|
+
if (error instanceof AuthError) {
|
|
23351
|
+
throw error;
|
|
23352
|
+
}
|
|
23353
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
|
|
23354
|
+
}
|
|
23355
|
+
}
|
|
22980
23356
|
/**
|
|
22981
23357
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
22982
23358
|
*/
|
|
@@ -22986,7 +23362,18 @@ async function getEARFormData(config, authority, request, logger, performanceCli
|
|
|
22986
23362
|
}
|
|
22987
23363
|
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
22988
23364
|
addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
22989
|
-
|
|
23365
|
+
try {
|
|
23366
|
+
addEARParameters(parameters, request.earJwk, request.asymmetricEar
|
|
23367
|
+
? base64Encode(JSON.stringify({
|
|
23368
|
+
alg: "ECDH-ES",
|
|
23369
|
+
enc: "A256GCM",
|
|
23370
|
+
apv: request.asymmetricEar.apv,
|
|
23371
|
+
}))
|
|
23372
|
+
: undefined);
|
|
23373
|
+
}
|
|
23374
|
+
catch {
|
|
23375
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
|
|
23376
|
+
}
|
|
22990
23377
|
// Also add codeChallenge as backup in case EAR is not supported
|
|
22991
23378
|
addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
|
|
22992
23379
|
addExtraParameters(parameters, {
|
|
@@ -23070,12 +23457,14 @@ async function handleResponsePlatformBroker(request, accountId, apiId, config, b
|
|
|
23070
23457
|
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
23071
23458
|
const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
|
|
23072
23459
|
const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
|
|
23460
|
+
const brokerRequest = {
|
|
23461
|
+
...request,
|
|
23462
|
+
state: userRequestState,
|
|
23463
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
23464
|
+
};
|
|
23465
|
+
delete brokerRequest.asymmetricEar;
|
|
23073
23466
|
try {
|
|
23074
|
-
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(
|
|
23075
|
-
...request,
|
|
23076
|
-
state: userRequestState,
|
|
23077
|
-
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
23078
|
-
});
|
|
23467
|
+
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
|
|
23079
23468
|
}
|
|
23080
23469
|
catch (e) {
|
|
23081
23470
|
await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
|
|
@@ -23099,6 +23488,7 @@ async function handleResponseCode(request, response, codeVerifier, apiId, config
|
|
|
23099
23488
|
// Instrument clientdata telemetry fields from the authorize response
|
|
23100
23489
|
instrumentClientData(response, request.correlationId, performanceClient);
|
|
23101
23490
|
if (response.accountId) {
|
|
23491
|
+
validateAuthorizationResponse(response, request.state, request.correlationId);
|
|
23102
23492
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, response.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
23103
23493
|
}
|
|
23104
23494
|
const authCodeRequest = {
|
|
@@ -23140,7 +23530,20 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
|
|
|
23140
23530
|
if (!request.earJwk) {
|
|
23141
23531
|
throw createBrowserAuthError(earJwkEmpty, request.correlationId);
|
|
23142
23532
|
}
|
|
23143
|
-
|
|
23533
|
+
let plaintext;
|
|
23534
|
+
if (request.asymmetricEar) {
|
|
23535
|
+
plaintext = await invokeAsync(decryptAsymmetricEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.asymmetricEar.privateJwk, request.asymmetricEar.apv, response.ear_jwe, request.asymmetricEar.apv, { logger, performanceClient, correlationId: request.correlationId });
|
|
23536
|
+
}
|
|
23537
|
+
else {
|
|
23538
|
+
plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
|
|
23539
|
+
}
|
|
23540
|
+
let decryptedData;
|
|
23541
|
+
try {
|
|
23542
|
+
decryptedData = JSON.parse(plaintext);
|
|
23543
|
+
}
|
|
23544
|
+
catch {
|
|
23545
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
|
|
23546
|
+
}
|
|
23144
23547
|
if (decryptedData.accountId) {
|
|
23145
23548
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
23146
23549
|
}
|
|
@@ -23431,6 +23834,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
23431
23834
|
: "",
|
|
23432
23835
|
postLogoutRedirectUri: "",
|
|
23433
23836
|
popupRelayUri: "",
|
|
23837
|
+
popupRelayProtocolVersion: 1,
|
|
23434
23838
|
clientCapabilities: [],
|
|
23435
23839
|
OIDCOptions: {
|
|
23436
23840
|
responseMode: ResponseMode.FRAGMENT,
|
|
@@ -23497,6 +23901,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
23497
23901
|
client: new StubPerformanceClient(),
|
|
23498
23902
|
};
|
|
23499
23903
|
const DEFAULT_EXPERIMENTAL_OPTIONS = {
|
|
23904
|
+
enableAsymmetricEar: false,
|
|
23500
23905
|
iframeTimeoutTelemetry: false,
|
|
23501
23906
|
allowPlatformBrokerWithDOM: false,
|
|
23502
23907
|
};
|
|
@@ -23550,9 +23955,16 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
23550
23955
|
experimental: {
|
|
23551
23956
|
...DEFAULT_EXPERIMENTAL_OPTIONS,
|
|
23552
23957
|
...userInputExperimental,
|
|
23958
|
+
enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
|
|
23553
23959
|
},
|
|
23554
23960
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
|
|
23555
23961
|
};
|
|
23962
|
+
if (overlayedConfig.experimental.enableAsymmetricEar &&
|
|
23963
|
+
overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
|
|
23964
|
+
const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
23965
|
+
logger.warning("07xxx7", "");
|
|
23966
|
+
overlayedConfig.experimental.enableAsymmetricEar = false;
|
|
23967
|
+
}
|
|
23556
23968
|
return overlayedConfig;
|
|
23557
23969
|
}
|
|
23558
23970
|
|
|
@@ -23934,7 +24346,6 @@ class PlatformAuthExtensionHandler {
|
|
|
23934
24346
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
23935
24347
|
* Licensed under the MIT License.
|
|
23936
24348
|
*/
|
|
23937
|
-
const PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED = "platform_auth_dom_dpop_not_supported";
|
|
23938
24349
|
class PlatformAuthDOMHandler {
|
|
23939
24350
|
constructor(logger, performanceClient, correlationId) {
|
|
23940
24351
|
this.logger = logger;
|
|
@@ -24014,11 +24425,9 @@ class PlatformAuthDOMHandler {
|
|
|
24014
24425
|
});
|
|
24015
24426
|
this.logger.trace(`02bcil ${this.platformAuthType}`, correlationId);
|
|
24016
24427
|
try {
|
|
24017
|
-
if (request.tokenType?.trim().toLowerCase() ===
|
|
24018
|
-
PlatformAuthTokenType.DPOP_WITH_PROOF) {
|
|
24019
|
-
throw createBrowserAuthError(PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED, correlationId);
|
|
24020
|
-
}
|
|
24021
24428
|
const platformDOMRequest = invoke(this.initializePlatformDOMRequest.bind(this), PlatformAuthDOMInitializeRequest, this.logger, this.performanceClient, correlationId)(request);
|
|
24429
|
+
request.bindingPreferenceSent =
|
|
24430
|
+
platformDOMRequest.preferBinding !== undefined;
|
|
24022
24431
|
const response =
|
|
24023
24432
|
// @ts-ignore
|
|
24024
24433
|
await window.navigator.platformAuthentication.executeGetToken(platformDOMRequest);
|
|
@@ -24063,8 +24472,12 @@ class PlatformAuthDOMHandler {
|
|
|
24063
24472
|
preferBinding: preferBinding,
|
|
24064
24473
|
enclave: enclave,
|
|
24065
24474
|
requestConfirmation: reqCnf,
|
|
24066
|
-
extraParametersNoCache
|
|
24475
|
+
extraParametersNoCache: extraParametersNoCache && {
|
|
24476
|
+
...extraParametersNoCache,
|
|
24477
|
+
},
|
|
24067
24478
|
};
|
|
24479
|
+
delete platformDOMRequest.extraParameters?.bindingPreferenceSent;
|
|
24480
|
+
delete platformDOMRequest.extraParametersNoCache?.bindingPreferenceSent;
|
|
24068
24481
|
return platformDOMRequest;
|
|
24069
24482
|
}
|
|
24070
24483
|
validatePlatformBrokerResponse(response, correlationId) {
|
|
@@ -24081,7 +24494,8 @@ class PlatformAuthDOMHandler {
|
|
|
24081
24494
|
requiredKeys.every((key) => Object.prototype.hasOwnProperty.call(response, key));
|
|
24082
24495
|
if (response &&
|
|
24083
24496
|
Object.prototype.hasOwnProperty.call(response, "isSuccess")) {
|
|
24084
|
-
if (isValid
|
|
24497
|
+
if (isValid &&
|
|
24498
|
+
response.isSuccess === true) {
|
|
24085
24499
|
this.logger.trace(`0h4vei ${this.platformAuthType}`, correlationId);
|
|
24086
24500
|
try {
|
|
24087
24501
|
const validatedResponse = this.convertToPlatformBrokerResponse(response, correlationId);
|
|
@@ -24134,7 +24548,6 @@ class PlatformAuthDOMHandler {
|
|
|
24134
24548
|
convertToPlatformBrokerResponse(response, correlationId) {
|
|
24135
24549
|
this.logger.trace(`14913t ${this.platformAuthType}`, correlationId);
|
|
24136
24550
|
const responseProperties = response.properties || {};
|
|
24137
|
-
const bindingAttested = this.parseDOMBoolean(responseProperties.binding_attested, "binding_attested", correlationId);
|
|
24138
24551
|
const nativeResponse = {
|
|
24139
24552
|
access_token: response.accessToken,
|
|
24140
24553
|
id_token: response.idToken,
|
|
@@ -24146,21 +24559,9 @@ class PlatformAuthDOMHandler {
|
|
|
24146
24559
|
properties: responseProperties,
|
|
24147
24560
|
extendedLifetimeToken: response.extendedLifetimeToken ?? false,
|
|
24148
24561
|
shr: response.proofOfPossessionPayload,
|
|
24149
|
-
token_type: responseProperties.token_type,
|
|
24150
|
-
DPoP: responseProperties.dpop_proof,
|
|
24151
|
-
binding_attested: bindingAttested,
|
|
24152
24562
|
};
|
|
24153
24563
|
return nativeResponse;
|
|
24154
24564
|
}
|
|
24155
|
-
parseDOMBoolean(value, propertyName, correlationId) {
|
|
24156
|
-
if (value === undefined) {
|
|
24157
|
-
return undefined;
|
|
24158
|
-
}
|
|
24159
|
-
if (value === "true" || value === "false") {
|
|
24160
|
-
return value === "true";
|
|
24161
|
-
}
|
|
24162
|
-
throw createAuthError(unexpectedError, correlationId, `Platform broker returned invalid ${propertyName} value.`);
|
|
24163
|
-
}
|
|
24164
24565
|
getDOMExtraParams(extraParameters, correlationId) {
|
|
24165
24566
|
try {
|
|
24166
24567
|
const stringifiedProperties = {};
|
|
@@ -24256,8 +24657,7 @@ function isPlatformAuthAllowed(config, logger, correlationId, platformAuthProvid
|
|
|
24256
24657
|
const schemeSupported = !authenticationScheme ||
|
|
24257
24658
|
authenticationScheme === AuthenticationScheme.BEARER ||
|
|
24258
24659
|
authenticationScheme === AuthenticationScheme.POP ||
|
|
24259
|
-
|
|
24260
|
-
!(platformAuthProvider instanceof PlatformAuthDOMHandler));
|
|
24660
|
+
authenticationScheme === AuthenticationScheme.DPOP;
|
|
24261
24661
|
const fields = {
|
|
24262
24662
|
allowPlatformBroker: config.system.allowPlatformBroker,
|
|
24263
24663
|
...(config.system.allowPlatformBroker && {
|
|
@@ -24440,19 +24840,21 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24440
24840
|
/*
|
|
24441
24841
|
* When a popup-relay page is configured, open it top-level
|
|
24442
24842
|
* (same first-party origin) instead of navigating the popup
|
|
24443
|
-
* straight to the IdP
|
|
24843
|
+
* straight to the IdP. V1 carries the action in the hash; v2
|
|
24844
|
+
* retains it for the authenticated handoff.
|
|
24444
24845
|
* The relay page opens the IdP child popup and relays the
|
|
24445
24846
|
* response back via postMessage (see waitForPopupResponse).
|
|
24446
24847
|
*/
|
|
24447
24848
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
24849
|
+
popupParams.relayAction = { method: "GET", url: navigateUrl };
|
|
24448
24850
|
const popupNavigateUrl = popupRelayUri
|
|
24449
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId),
|
|
24851
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
24450
24852
|
: navigateUrl;
|
|
24451
24853
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
24452
24854
|
const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
|
|
24453
24855
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, InteractionType.Popup, { popupWindow }, null);
|
|
24454
24856
|
// Wait for the redirect bridge response
|
|
24455
|
-
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
|
|
24857
|
+
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24456
24858
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24457
24859
|
return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
24458
24860
|
}
|
|
@@ -24476,21 +24878,20 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24476
24878
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
24477
24879
|
// Get the frame handle for the silent request
|
|
24478
24880
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
24479
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
24480
24881
|
const pkce = pkceCodes ||
|
|
24481
24882
|
(await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
|
|
24482
24883
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24483
|
-
|
|
24884
|
+
let popupRequest = {
|
|
24484
24885
|
...request,
|
|
24485
|
-
earJwk: earJwk,
|
|
24486
24886
|
codeChallenge: pkce.challenge,
|
|
24487
24887
|
...tokenBindingParams,
|
|
24488
24888
|
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
24489
24889
|
};
|
|
24490
24890
|
try {
|
|
24891
|
+
popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
|
|
24491
24892
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
24492
24893
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
24493
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
24894
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24494
24895
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24495
24896
|
if (!serverParams.ear_jwe && serverParams.code) {
|
|
24496
24897
|
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
|
|
@@ -24518,7 +24919,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24518
24919
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
|
|
24519
24920
|
const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
|
|
24520
24921
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
24521
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
|
|
24922
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
24522
24923
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
24523
24924
|
return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
24524
24925
|
}
|
|
@@ -24574,21 +24975,22 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24574
24975
|
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, InteractionType.Popup, validRequest);
|
|
24575
24976
|
/*
|
|
24576
24977
|
* When a popup-relay page is configured, open it top-level (same
|
|
24577
|
-
* first-party origin)
|
|
24578
|
-
*
|
|
24978
|
+
* first-party origin), using the configured wire protocol for the
|
|
24979
|
+
* end-session URL. The relay page opens the IdP child
|
|
24579
24980
|
* popup and the post-logout redirect page (running the redirect
|
|
24580
24981
|
* bridge) relays completion back via postMessage — so logout works
|
|
24581
24982
|
* from an embedded, cross-origin iframe where a direct popup to the
|
|
24582
24983
|
* IdP cannot. See runPopupRelay / waitForPopupResponse.
|
|
24583
24984
|
*/
|
|
24584
24985
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
24986
|
+
popupParams.relayAction = { method: "GET", url: logoutUri };
|
|
24585
24987
|
const popupNavigateUrl = popupRelayUri
|
|
24586
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId),
|
|
24988
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
24587
24989
|
: logoutUri;
|
|
24588
24990
|
// Open the popup window to requestUrl.
|
|
24589
24991
|
const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
|
|
24590
24992
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, InteractionType.Popup, { popupWindow }, null);
|
|
24591
|
-
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
|
|
24993
|
+
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
|
|
24592
24994
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
24593
24995
|
});
|
|
24594
24996
|
if (mainWindowRedirectUri) {
|
|
@@ -24800,11 +25202,12 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24800
25202
|
? getEARFormData
|
|
24801
25203
|
: getCodeFormData;
|
|
24802
25204
|
const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
|
|
24803
|
-
|
|
25205
|
+
popupParams.relayAction = {
|
|
24804
25206
|
method: "POST",
|
|
24805
25207
|
action: formData.action,
|
|
24806
25208
|
fields: formData.fields,
|
|
24807
|
-
}
|
|
25209
|
+
};
|
|
25210
|
+
const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
|
|
24808
25211
|
return this.initiateAuthRequest(relayUrl, popupParams);
|
|
24809
25212
|
}
|
|
24810
25213
|
const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
@@ -24813,7 +25216,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24813
25216
|
form.submit();
|
|
24814
25217
|
return popupWindow;
|
|
24815
25218
|
}
|
|
24816
|
-
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
25219
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
|
|
24817
25220
|
/*
|
|
24818
25221
|
* When a popup-relay page is configured the response is relayed back to
|
|
24819
25222
|
* this frame by the relay page via postMessage, and the relay popup's
|
|
@@ -24823,7 +25226,11 @@ class PopupClient extends StandardInteractionClient {
|
|
|
24823
25226
|
* frame and which does not track the relay popup.
|
|
24824
25227
|
*/
|
|
24825
25228
|
if (this.config.auth.popupRelayUri) {
|
|
24826
|
-
|
|
25229
|
+
if (this.config.auth.popupRelayProtocolVersion === 2 &&
|
|
25230
|
+
!relayAction) {
|
|
25231
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
|
|
25232
|
+
}
|
|
25233
|
+
return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
|
|
24827
25234
|
}
|
|
24828
25235
|
if (this.waitForPopupResponseHook) {
|
|
24829
25236
|
return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
|
|
@@ -24948,16 +25355,15 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
24948
25355
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
24949
25356
|
// Get the frame handle for the silent request
|
|
24950
25357
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
24951
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
24952
25358
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
24953
25359
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24954
|
-
|
|
25360
|
+
let redirectRequest = {
|
|
24955
25361
|
...request,
|
|
24956
|
-
earJwk: earJwk,
|
|
24957
25362
|
codeChallenge: pkceCodes.challenge,
|
|
24958
25363
|
...tokenBindingParams,
|
|
24959
25364
|
};
|
|
24960
25365
|
try {
|
|
25366
|
+
redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
|
|
24961
25367
|
if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
|
|
24962
25368
|
throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
|
|
24963
25369
|
}
|
|
@@ -24970,9 +25376,10 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
24970
25376
|
}, this.config.system.redirectNavigationTimeout);
|
|
24971
25377
|
});
|
|
24972
25378
|
}
|
|
24973
|
-
catch (
|
|
25379
|
+
catch (error) {
|
|
25380
|
+
this.browserStorage.resetRequestCache(correlationId);
|
|
24974
25381
|
await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
24975
|
-
throw
|
|
25382
|
+
throw error;
|
|
24976
25383
|
}
|
|
24977
25384
|
}
|
|
24978
25385
|
/**
|
|
@@ -25161,7 +25568,6 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
25161
25568
|
/**
|
|
25162
25569
|
* Redirects window to given URL.
|
|
25163
25570
|
* @param urlNavigate
|
|
25164
|
-
* @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
|
|
25165
25571
|
*/
|
|
25166
25572
|
async initiateAuthRequest(requestUrl) {
|
|
25167
25573
|
this.logger.verbose("0yaw2e", this.correlationId);
|
|
@@ -25449,13 +25855,11 @@ class SilentIframeClient extends StandardInteractionClient {
|
|
|
25449
25855
|
async executeEarFlow(request) {
|
|
25450
25856
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
25451
25857
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
25452
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
25453
25858
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
25454
|
-
const silentRequest = {
|
|
25859
|
+
const silentRequest = await initializeEarRequest(this.config, {
|
|
25455
25860
|
...request,
|
|
25456
|
-
earJwk: earJwk,
|
|
25457
25861
|
codeChallenge: pkceCodes.challenge,
|
|
25458
|
-
};
|
|
25862
|
+
}, this.logger, this.performanceClient);
|
|
25459
25863
|
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
25460
25864
|
const iframe = createHiddenIframe();
|
|
25461
25865
|
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
@@ -25805,6 +26209,7 @@ function prepareWebSilentRequest({ request, account, correlationId, config, }) {
|
|
|
25805
26209
|
return {
|
|
25806
26210
|
key: JSON.stringify({
|
|
25807
26211
|
...thumbprint,
|
|
26212
|
+
accountTenantId: account.tenantId,
|
|
25808
26213
|
forceRefresh: !!request.forceRefresh,
|
|
25809
26214
|
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
25810
26215
|
extraParameters: canonicalizeStringDict(request.extraParameters),
|
|
@@ -25823,7 +26228,10 @@ function preparePlatformSilentRequest({ request, account, config, }) {
|
|
|
25823
26228
|
account,
|
|
25824
26229
|
});
|
|
25825
26230
|
return {
|
|
25826
|
-
key:
|
|
26231
|
+
key: platformRequest.authenticationScheme ===
|
|
26232
|
+
AuthenticationScheme.DPOP
|
|
26233
|
+
? undefined
|
|
26234
|
+
: `platform:${getPlatformSilentRequestKey(platformRequest, config)}`,
|
|
25827
26235
|
request: platformRequest,
|
|
25828
26236
|
account: platformRequest.account,
|
|
25829
26237
|
};
|
|
@@ -25855,7 +26263,6 @@ function getPlatformSilentRequestKey(request, config) {
|
|
|
25855
26263
|
loginHint: request.loginHint,
|
|
25856
26264
|
popKid: request.popKid,
|
|
25857
26265
|
shrNonce: request.shrNonce,
|
|
25858
|
-
dpopNonce: request.dpopNonce,
|
|
25859
26266
|
skipBrokerClaims: request.embeddedClientId
|
|
25860
26267
|
? !!request.skipBrokerClaims
|
|
25861
26268
|
: undefined,
|
|
@@ -27104,6 +27511,16 @@ class StandardController {
|
|
|
27104
27511
|
getLogger() {
|
|
27105
27512
|
return this.logger;
|
|
27106
27513
|
}
|
|
27514
|
+
/**
|
|
27515
|
+
* Stores a resource-server DPoP nonce for the matching HTTPS origin.
|
|
27516
|
+
*/
|
|
27517
|
+
async loadDpopNonce(resourceRequestUri, dpopNonce) {
|
|
27518
|
+
blockNonBrowserEnvironment();
|
|
27519
|
+
const correlationId = createNewGuid();
|
|
27520
|
+
return invokeAsync(async () => {
|
|
27521
|
+
this.browserStorage.setDpopNonce(resourceRequestUri, dpopNonce, correlationId);
|
|
27522
|
+
}, StandardControllerLoadDpopNonce, this.logger, this.performanceClient, correlationId)();
|
|
27523
|
+
}
|
|
27107
27524
|
/**
|
|
27108
27525
|
* Replaces the default logger set in configurations with new Logger with new configurations
|
|
27109
27526
|
* @param logger Logger instance
|
|
@@ -27258,32 +27675,55 @@ class StandardController {
|
|
|
27258
27675
|
correlationId,
|
|
27259
27676
|
config: this.config,
|
|
27260
27677
|
}, this.platformAuthProvider, this.logger, this.performanceClient);
|
|
27261
|
-
const
|
|
27262
|
-
|
|
27678
|
+
const requestKey = preparedRequest.key;
|
|
27679
|
+
const shouldDeduplicate = requestKey !== undefined;
|
|
27263
27680
|
const inProgressRequest = shouldDeduplicate
|
|
27264
|
-
? this.activeSilentTokenRequests.get(
|
|
27681
|
+
? this.activeSilentTokenRequests.get(requestKey)
|
|
27265
27682
|
: undefined;
|
|
27266
27683
|
if (typeof inProgressRequest === "undefined") {
|
|
27267
27684
|
this.logger.verbose(shouldDeduplicate
|
|
27268
27685
|
? "0fcjbk"
|
|
27269
|
-
: "acquireTokenSilent called for DPoP request, starting an independent operation", correlationId);
|
|
27686
|
+
: "acquireTokenSilent called for platform DPoP request, starting an independent operation", correlationId);
|
|
27270
27687
|
this.performanceClient.addFields({ deduped: false }, correlationId);
|
|
27271
27688
|
const activeRequest = invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)({
|
|
27272
27689
|
...preparedRequest.request,
|
|
27273
27690
|
correlationId,
|
|
27274
27691
|
}, preparedRequest.account);
|
|
27275
|
-
if (
|
|
27692
|
+
if (requestKey === undefined) {
|
|
27276
27693
|
return activeRequest;
|
|
27277
27694
|
}
|
|
27278
|
-
this.activeSilentTokenRequests.set(
|
|
27695
|
+
this.activeSilentTokenRequests.set(requestKey, activeRequest);
|
|
27279
27696
|
return activeRequest.finally(() => {
|
|
27280
|
-
this.activeSilentTokenRequests.delete(
|
|
27697
|
+
this.activeSilentTokenRequests.delete(requestKey);
|
|
27281
27698
|
});
|
|
27282
27699
|
}
|
|
27283
27700
|
else {
|
|
27284
27701
|
this.logger.verbose("1yq7nb", correlationId);
|
|
27285
27702
|
this.performanceClient.addFields({ deduped: true }, correlationId);
|
|
27286
|
-
|
|
27703
|
+
const joiningRequest = {
|
|
27704
|
+
...preparedRequest.request,
|
|
27705
|
+
correlationId,
|
|
27706
|
+
};
|
|
27707
|
+
const result = await inProgressRequest;
|
|
27708
|
+
if (joiningRequest.authenticationScheme !==
|
|
27709
|
+
AuthenticationScheme.DPOP) {
|
|
27710
|
+
return result;
|
|
27711
|
+
}
|
|
27712
|
+
if (result.fromPlatformBroker &&
|
|
27713
|
+
!ResponseHandler.hasDpopKeyId(result)) {
|
|
27714
|
+
return invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)(joiningRequest, result.account || preparedRequest.account);
|
|
27715
|
+
}
|
|
27716
|
+
const dpopProof = await ResponseHandler.generateDpopResourceProof(this.browserCrypto, result, {
|
|
27717
|
+
...joiningRequest,
|
|
27718
|
+
authority: joiningRequest.authority || this.config.auth.authority,
|
|
27719
|
+
}, this.performanceClient, {
|
|
27720
|
+
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
27721
|
+
dpopNonceProvider: this.browserStorage,
|
|
27722
|
+
});
|
|
27723
|
+
return {
|
|
27724
|
+
...result,
|
|
27725
|
+
dpopProof,
|
|
27726
|
+
};
|
|
27287
27727
|
}
|
|
27288
27728
|
}
|
|
27289
27729
|
/**
|
|
@@ -27906,6 +28346,7 @@ class CustomAuthStandardController extends StandardController {
|
|
|
27906
28346
|
}
|
|
27907
28347
|
async signUpV2(inputs) {
|
|
27908
28348
|
const correlationId = this.getCorrelationId(inputs);
|
|
28349
|
+
let scenario = CustomAuthFlowScenarioV2.SignUp;
|
|
27909
28350
|
try {
|
|
27910
28351
|
ensureArgumentIsNotNullOrUndefined("inputs", inputs, correlationId);
|
|
27911
28352
|
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
@@ -27917,13 +28358,19 @@ class CustomAuthStandardController extends StandardController {
|
|
|
27917
28358
|
}
|
|
27918
28359
|
this.ensureUserNotSignedIn(correlationId);
|
|
27919
28360
|
this.logger.verbose("0010xn", correlationId);
|
|
27920
|
-
const
|
|
28361
|
+
const startResult = await this.flowClientV2.signUp({
|
|
27921
28362
|
correlationId,
|
|
27922
28363
|
username: inputs.username,
|
|
27923
28364
|
scopes: inputs.scopes,
|
|
27924
28365
|
claims: inputs.claims,
|
|
27925
28366
|
attributes: inputs.attributes,
|
|
27926
28367
|
});
|
|
28368
|
+
if (startResult.type === FLOW_EXISTING_ACCOUNT_START_V2) {
|
|
28369
|
+
scenario = startResult.continuationState.scenario;
|
|
28370
|
+
}
|
|
28371
|
+
const result = startResult.type === FLOW_EXISTING_ACCOUNT_START_V2
|
|
28372
|
+
? await this.flowClientV2.challengeExistingAccount(startResult)
|
|
28373
|
+
: startResult;
|
|
27927
28374
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
27928
28375
|
return new CustomAuthResultV2(new CodeRequiredStateV2({
|
|
27929
28376
|
correlationId: result.correlationId,
|
|
@@ -27982,7 +28429,7 @@ class CustomAuthStandardController extends StandardController {
|
|
|
27982
28429
|
catch (error) {
|
|
27983
28430
|
this.logger.errorPii(`196wno ${error}`, correlationId);
|
|
27984
28431
|
return CustomAuthResultV2.createWithError(error, {
|
|
27985
|
-
scenario
|
|
28432
|
+
scenario,
|
|
27986
28433
|
correlationId,
|
|
27987
28434
|
});
|
|
27988
28435
|
}
|
|
@@ -28821,6 +29268,12 @@ class PublicClientApplication {
|
|
|
28821
29268
|
getActiveAccount() {
|
|
28822
29269
|
return this.controller.getActiveAccount();
|
|
28823
29270
|
}
|
|
29271
|
+
/**
|
|
29272
|
+
* Stores an opaque resource-server DPoP nonce for the matching HTTPS origin.
|
|
29273
|
+
*/
|
|
29274
|
+
loadDpopNonce(resourceRequestUri, dpopNonce) {
|
|
29275
|
+
return this.controller.loadDpopNonce(resourceRequestUri, dpopNonce);
|
|
29276
|
+
}
|
|
28824
29277
|
/**
|
|
28825
29278
|
* Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
|
|
28826
29279
|
* @param sku
|
|
@@ -28964,7 +29417,6 @@ class CustomAuthPublicClientApplication extends PublicClientApplication {
|
|
|
28964
29417
|
}
|
|
28965
29418
|
/**
|
|
28966
29419
|
* Starts native auth V2 sign-in.
|
|
28967
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
28968
29420
|
* @param inputs - Inputs for the sign-in V2 flow.
|
|
28969
29421
|
* @returns A promise that resolves to the sign-in start result.
|
|
28970
29422
|
*/
|
|
@@ -28973,7 +29425,6 @@ class CustomAuthPublicClientApplication extends PublicClientApplication {
|
|
|
28973
29425
|
}
|
|
28974
29426
|
/**
|
|
28975
29427
|
* Starts native auth V2 sign-up.
|
|
28976
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
28977
29428
|
* @param inputs - Inputs for the sign-up V2 flow.
|
|
28978
29429
|
* @returns A promise that resolves to the sign-up start result.
|
|
28979
29430
|
*/
|
|
@@ -28982,7 +29433,6 @@ class CustomAuthPublicClientApplication extends PublicClientApplication {
|
|
|
28982
29433
|
}
|
|
28983
29434
|
/**
|
|
28984
29435
|
* Starts native auth V2 self-service password reset.
|
|
28985
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
28986
29436
|
* @param {ResetPasswordInputsV2} inputs - Inputs for the reset-password V2 flow
|
|
28987
29437
|
* @returns {Promise<ResetPasswordStartResultV2>} - A promise that resolves to ResetPasswordStartResultV2
|
|
28988
29438
|
*/
|