@azure/msal-browser 5.22.0 → 5.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +133 -29
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +178 -64
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +61 -22
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +49 -0
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -0
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +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 +97 -29
- package/dist/cache/LocalStorage.mjs.map +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 +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +10 -10
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +27 -2
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +192 -2
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +21 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +80 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +102 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +12 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +20 -0
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +29 -0
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +76 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +134 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +23 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +22 -0
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +61 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +87 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +3 -2
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +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 +602 -0
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +67 -0
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +46 -0
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -0
- 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 +3 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs.map +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 +30 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +193 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +236 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +26 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +66 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +97 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +56 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +23 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +14 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +3 -2
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +38 -0
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -0
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +20 -3
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +23 -1
- package/dist/custom_auth/index.mjs.map +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs +29 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +59 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs +18 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +37 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +23 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +70 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +61 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -0
- 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/error_type/SignUpStartErrorV2.mjs +25 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +33 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +40 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +25 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +47 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +60 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +21 -14
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +11 -8
- 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 +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +1381 -1185
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +16 -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/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +38 -0
- package/dist/webBrokerBridge/PerfEventNames.mjs.map +1 -0
- 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 +2 -1
- package/dist/webBrokerBridge/index.mjs.map +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +215 -19
- package/lib/custom-auth-path/msal-custom-auth.cjs +3571 -479
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +3571 -479
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +23 -11
- package/lib/msal-browser.cjs +622 -233
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +622 -233
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +59 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs.map +1 -1
- package/package.json +3 -3
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +217 -45
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +261 -107
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +92 -37
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +118 -6
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +14 -1
- package/src/cache/LocalStorage.ts +135 -28
- package/src/controllers/StandardController.ts +17 -23
- package/src/custom_auth/CustomAuthActionInputs.ts +11 -0
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +40 -4
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +44 -0
- package/src/custom_auth/controller/CustomAuthStandardController.ts +360 -1
- package/src/custom_auth/controller/ICustomAuthStandardController.ts +14 -0
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +20 -0
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +133 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +146 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +8 -0
- package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +33 -0
- package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +25 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +25 -0
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +30 -0
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +40 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +100 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +59 -0
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +53 -0
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +196 -0
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +16 -0
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +44 -0
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +76 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +119 -0
- package/src/custom_auth/core/error/CustomAuthApiError.ts +3 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +35 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +1145 -0
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +150 -0
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +66 -0
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +185 -0
- package/src/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +30 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +423 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +553 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +24 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +81 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +177 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +129 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +68 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +50 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.ts +20 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +202 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +111 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +26 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +44 -0
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +64 -0
- package/src/custom_auth/core/telemetry/PublicApiId.ts +18 -0
- package/src/custom_auth/index.ts +96 -0
- package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +25 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +33 -0
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +69 -0
- package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.ts +9 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +13 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +35 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +19 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +31 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +32 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +22 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +96 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +83 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +12 -0
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +21 -0
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +32 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +28 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +20 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +48 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +34 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +63 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +24 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +112 -0
- package/src/interaction_client/PlatformAuthInteractionClient.ts +79 -17
- package/src/interaction_client/RedirectClient.ts +15 -5
- package/src/packageMetadata.ts +1 -1
- package/src/telemetry/BrowserPerformanceEvents.ts +20 -0
- package/src/webBrokerBridge/PerfEventNames.ts +43 -0
- package/src/webBrokerBridge/index.ts +26 -0
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +3 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts +3 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +68 -5
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +12 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/LocalStorage.d.ts +4 -5
- package/types/cache/LocalStorage.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +7 -0
- 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 +27 -5
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +30 -0
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +11 -2
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/controller/ICustomAuthStandardController.d.ts +7 -1
- package/types/custom_auth/controller/ICustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +53 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +40 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +4 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +7 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +15 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +21 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +17 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +25 -0
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +28 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +10 -0
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +25 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts +3 -1
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +21 -0
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +35 -0
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +26 -0
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +43 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +80 -0
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +17 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +31 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +23 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts +19 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts +2 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +15 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +52 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts +3 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts +37 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts +12 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +133 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +70 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +10 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +33 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +4 -0
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +16 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +37 -0
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +18 -0
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +22 -0
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +19 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts +3 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +22 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +12 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +21 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +17 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +17 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +24 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +4 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +14 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +20 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +15 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +8 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +15 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +11 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +19 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +14 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +10 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +13 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/types/webBrokerBridge/PerfEventNames.d.ts +30 -0
- package/types/webBrokerBridge/PerfEventNames.d.ts.map +1 -0
- package/types/webBrokerBridge/index.d.ts +1 -0
- package/types/webBrokerBridge/index.d.ts.map +1 -1
|
@@ -21,6 +21,8 @@ import { PlatformAuthExtensionHandler } from "./PlatformAuthExtensionHandler.js"
|
|
|
21
21
|
import { IPlatformAuthHandler } from "./IPlatformAuthHandler.js";
|
|
22
22
|
import { PlatformAuthDOMHandler } from "./PlatformAuthDOMHandler.js";
|
|
23
23
|
import { createNewGuid } from "../../crypto/BrowserCrypto.js";
|
|
24
|
+
import * as BrowserPerformanceEvents from "../../telemetry/BrowserPerformanceEvents.js";
|
|
25
|
+
import { PlatformAuthConstants } from "../../utils/BrowserConstants.js";
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* Checks if the platform broker is available in the current environment.
|
|
@@ -65,7 +67,10 @@ export async function getPlatformAuthProvider(
|
|
|
65
67
|
enablePlatformBrokerDOMSupport?: boolean
|
|
66
68
|
): Promise<IPlatformAuthHandler | undefined> {
|
|
67
69
|
logger.trace("getPlatformAuthProvider called", correlationId);
|
|
68
|
-
|
|
70
|
+
const discoveryMeasurement = performanceClient.startMeasurement(
|
|
71
|
+
BrowserPerformanceEvents.PlatformAuthProviderDiscovery,
|
|
72
|
+
correlationId
|
|
73
|
+
);
|
|
69
74
|
logger.trace(
|
|
70
75
|
`Has client allowed platform auth via DOM API: '${enablePlatformBrokerDOMSupport}'`,
|
|
71
76
|
correlationId
|
|
@@ -75,32 +80,70 @@ export async function getPlatformAuthProvider(
|
|
|
75
80
|
try {
|
|
76
81
|
if (enablePlatformBrokerDOMSupport) {
|
|
77
82
|
// Check if DOM platform API is supported first
|
|
78
|
-
|
|
83
|
+
try {
|
|
84
|
+
platformAuthProvider =
|
|
85
|
+
await PlatformAuthDOMHandler.createProvider(
|
|
86
|
+
logger,
|
|
87
|
+
performanceClient,
|
|
88
|
+
correlationId
|
|
89
|
+
);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
logger.trace(
|
|
92
|
+
"Platform auth via DOM API unavailable, checking for extension",
|
|
93
|
+
correlationId
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
if (platformAuthProvider) {
|
|
97
|
+
discoveryMeasurement.add({
|
|
98
|
+
platformAuthProviderType:
|
|
99
|
+
PlatformAuthConstants.PLATFORM_DOM_PROVIDER,
|
|
100
|
+
});
|
|
101
|
+
discoveryMeasurement.end({
|
|
102
|
+
success: true,
|
|
103
|
+
platformAuthProviderType:
|
|
104
|
+
PlatformAuthConstants.PLATFORM_DOM_PROVIDER,
|
|
105
|
+
});
|
|
106
|
+
return platformAuthProvider;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
logger.trace(
|
|
111
|
+
"Platform auth via DOM API not available, checking for extension",
|
|
112
|
+
correlationId
|
|
113
|
+
);
|
|
114
|
+
/*
|
|
115
|
+
* If DOM APIs are not available, check if browser extension is available.
|
|
116
|
+
* Platform authentication via DOM APIs is preferred over extension APIs.
|
|
117
|
+
*/
|
|
118
|
+
platformAuthProvider =
|
|
119
|
+
await PlatformAuthExtensionHandler.createProvider(
|
|
79
120
|
logger,
|
|
121
|
+
nativeBrokerHandshakeTimeout ||
|
|
122
|
+
DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
|
|
80
123
|
performanceClient,
|
|
81
124
|
correlationId
|
|
82
125
|
);
|
|
126
|
+
|
|
127
|
+
if (platformAuthProvider) {
|
|
128
|
+
discoveryMeasurement.add({
|
|
129
|
+
platformAuthProviderType:
|
|
130
|
+
PlatformAuthConstants.PLATFORM_EXTENSION_PROVIDER,
|
|
131
|
+
});
|
|
83
132
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
* If DOM APIs are not available, check if browser extension is available.
|
|
91
|
-
* Platform authentication via DOM APIs is preferred over extension APIs.
|
|
92
|
-
*/
|
|
93
|
-
platformAuthProvider =
|
|
94
|
-
await PlatformAuthExtensionHandler.createProvider(
|
|
95
|
-
logger,
|
|
96
|
-
nativeBrokerHandshakeTimeout ||
|
|
97
|
-
DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
|
|
98
|
-
performanceClient,
|
|
99
|
-
correlationId
|
|
100
|
-
);
|
|
101
|
-
}
|
|
133
|
+
discoveryMeasurement.end({
|
|
134
|
+
success: !!platformAuthProvider,
|
|
135
|
+
platformAuthProviderType: platformAuthProvider
|
|
136
|
+
? PlatformAuthConstants.PLATFORM_EXTENSION_PROVIDER
|
|
137
|
+
: undefined,
|
|
138
|
+
});
|
|
102
139
|
} catch (e) {
|
|
103
140
|
logger.trace("Platform auth not available", e as string);
|
|
141
|
+
discoveryMeasurement.end(
|
|
142
|
+
{
|
|
143
|
+
success: false,
|
|
144
|
+
},
|
|
145
|
+
e
|
|
146
|
+
);
|
|
104
147
|
}
|
|
105
148
|
return platformAuthProvider;
|
|
106
149
|
}
|
|
@@ -118,9 +161,26 @@ export function isPlatformAuthAllowed(
|
|
|
118
161
|
logger: Logger,
|
|
119
162
|
correlationId: string,
|
|
120
163
|
platformAuthProvider?: IPlatformAuthHandler,
|
|
121
|
-
authenticationScheme?: Constants.AuthenticationScheme
|
|
164
|
+
authenticationScheme?: Constants.AuthenticationScheme,
|
|
165
|
+
performanceClient?: IPerformanceClient
|
|
122
166
|
): boolean {
|
|
123
167
|
logger.trace("isPlatformAuthAllowed called", correlationId);
|
|
168
|
+
const schemeSupported =
|
|
169
|
+
!authenticationScheme ||
|
|
170
|
+
authenticationScheme === Constants.AuthenticationScheme.BEARER ||
|
|
171
|
+
authenticationScheme === Constants.AuthenticationScheme.POP;
|
|
172
|
+
const fields = {
|
|
173
|
+
allowPlatformBroker: config.system.allowPlatformBroker,
|
|
174
|
+
...(config.system.allowPlatformBroker && {
|
|
175
|
+
platformAuthProviderType:
|
|
176
|
+
platformAuthProvider instanceof PlatformAuthDOMHandler
|
|
177
|
+
? PlatformAuthConstants.PLATFORM_DOM_PROVIDER
|
|
178
|
+
: platformAuthProvider
|
|
179
|
+
? PlatformAuthConstants.PLATFORM_EXTENSION_PROVIDER
|
|
180
|
+
: undefined,
|
|
181
|
+
}),
|
|
182
|
+
};
|
|
183
|
+
performanceClient?.addFields(fields, correlationId);
|
|
124
184
|
|
|
125
185
|
// throw an error if allowPlatformBroker is not enabled and allowPlatformBrokerWithDOM is enabled
|
|
126
186
|
if (
|
|
@@ -151,22 +211,17 @@ export function isPlatformAuthAllowed(
|
|
|
151
211
|
return false;
|
|
152
212
|
}
|
|
153
213
|
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
correlationId
|
|
161
|
-
);
|
|
162
|
-
return true;
|
|
163
|
-
default:
|
|
164
|
-
logger.trace(
|
|
165
|
-
"isPlatformAuthAllowed: authenticationScheme is not supported, returning false",
|
|
166
|
-
correlationId
|
|
167
|
-
);
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
214
|
+
if (!schemeSupported) {
|
|
215
|
+
logger.trace(
|
|
216
|
+
"isPlatformAuthAllowed: authenticationScheme is not supported, returning false",
|
|
217
|
+
correlationId
|
|
218
|
+
);
|
|
219
|
+
return false;
|
|
170
220
|
}
|
|
221
|
+
|
|
222
|
+
logger.trace(
|
|
223
|
+
"isPlatformAuthAllowed: authenticationScheme is supported, returning true",
|
|
224
|
+
correlationId
|
|
225
|
+
);
|
|
171
226
|
return true;
|
|
172
227
|
}
|
|
@@ -4,7 +4,87 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { NativeExtensionMethod } from "../../utils/BrowserConstants.js";
|
|
7
|
-
import { StringDict } from "@azure/msal-common/browser";
|
|
7
|
+
import { Constants, StringDict } from "@azure/msal-common/browser";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Key storage enclaves supported by the platform broker.
|
|
11
|
+
*/
|
|
12
|
+
export const PlatformAuthEnclave = {
|
|
13
|
+
/**
|
|
14
|
+
* Persisted software key using MS_KEY_STORAGE_PROVIDER.
|
|
15
|
+
*/
|
|
16
|
+
SOFTWARE: "sw",
|
|
17
|
+
/**
|
|
18
|
+
* TPM-backed key using MS_PLATFORM_KEY_STORAGE_PROVIDER.
|
|
19
|
+
*/
|
|
20
|
+
HARDWARE: "hw",
|
|
21
|
+
/**
|
|
22
|
+
* KeyGuard-protected key using MS_KEY_STORAGE_PROVIDER.
|
|
23
|
+
*/
|
|
24
|
+
KEY_GUARD: "kg",
|
|
25
|
+
} as const;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Supported platform broker key storage enclave.
|
|
29
|
+
*/
|
|
30
|
+
export type PlatformAuthEnclave =
|
|
31
|
+
(typeof PlatformAuthEnclave)[keyof typeof PlatformAuthEnclave];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Token types supported by the platform broker request contract.
|
|
35
|
+
*/
|
|
36
|
+
export const PlatformAuthTokenType = {
|
|
37
|
+
DPOP_WITH_PROOF: "dpop+proof",
|
|
38
|
+
} as const;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Supported platform broker request token type. Authentication schemes are
|
|
42
|
+
* internal request intent; the additional values are WAM DPoP wire contracts.
|
|
43
|
+
*/
|
|
44
|
+
export type PlatformAuthTokenType =
|
|
45
|
+
| Constants.AuthenticationScheme
|
|
46
|
+
| (typeof PlatformAuthTokenType)[keyof typeof PlatformAuthTokenType];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Token binding preferences supported by the platform broker.
|
|
50
|
+
*/
|
|
51
|
+
export const PlatformAuthBindingPreference = {
|
|
52
|
+
ATTESTED: "attested",
|
|
53
|
+
} as const;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Supported platform broker token binding preference.
|
|
57
|
+
*/
|
|
58
|
+
export type PlatformAuthBindingPreference =
|
|
59
|
+
(typeof PlatformAuthBindingPreference)[keyof typeof PlatformAuthBindingPreference];
|
|
60
|
+
|
|
61
|
+
const PROOF_OF_POSSESSION_TOKEN_TYPES: readonly PlatformAuthTokenType[] = [
|
|
62
|
+
Constants.AuthenticationScheme.POP,
|
|
63
|
+
Constants.AuthenticationScheme.DPOP,
|
|
64
|
+
PlatformAuthTokenType.DPOP_WITH_PROOF,
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Returns whether a platform broker token type requires proof request metadata.
|
|
69
|
+
*/
|
|
70
|
+
export function isProofOfPossessionTokenType(
|
|
71
|
+
tokenType: PlatformAuthTokenType | undefined
|
|
72
|
+
): boolean {
|
|
73
|
+
return (
|
|
74
|
+
tokenType !== undefined &&
|
|
75
|
+
PROOF_OF_POSSESSION_TOKEN_TYPES.includes(tokenType)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* No-cache parameters sent to the platform broker. This bag is constructed
|
|
81
|
+
* internally and is not inherited from BaseAuthRequest.
|
|
82
|
+
*/
|
|
83
|
+
export type PlatformAuthExtraParametersNoCache = StringDict & {
|
|
84
|
+
pop_method?: string;
|
|
85
|
+
pop_url?: string;
|
|
86
|
+
pop_nonce?: string;
|
|
87
|
+
};
|
|
8
88
|
|
|
9
89
|
/**
|
|
10
90
|
* Token request which native broker will use to acquire tokens
|
|
@@ -23,19 +103,50 @@ export type PlatformAuthRequest = {
|
|
|
23
103
|
claims?: string;
|
|
24
104
|
state?: string;
|
|
25
105
|
loginHint?: string; // UPN of the user
|
|
106
|
+
preferBinding?: PlatformAuthBindingPreference;
|
|
107
|
+
enclave?: PlatformAuthEnclave;
|
|
26
108
|
reqCnf?: string;
|
|
27
109
|
keyId?: string;
|
|
28
|
-
tokenType?:
|
|
110
|
+
tokenType?: PlatformAuthTokenType;
|
|
29
111
|
shrClaims?: string;
|
|
30
112
|
shrNonce?: string;
|
|
31
113
|
resourceRequestMethod?: string;
|
|
32
114
|
resourceRequestUri?: string;
|
|
33
115
|
extendedExpiryToken?: boolean;
|
|
34
116
|
extraParameters?: StringDict;
|
|
117
|
+
extraParametersNoCache?: PlatformAuthExtraParametersNoCache;
|
|
35
118
|
signPopToken?: boolean; // Set to true only if token request does not contain a PoP keyId
|
|
36
119
|
attributeTokens?: string; // Pre-serialized attribute tokens (sorted, space-separated)
|
|
37
120
|
};
|
|
38
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Adds canonical proof request fields to the broker no-cache property bag.
|
|
124
|
+
*/
|
|
125
|
+
export function createPlatformAuthExtraParametersNoCache(
|
|
126
|
+
extraParametersNoCache: PlatformAuthExtraParametersNoCache | undefined,
|
|
127
|
+
isProofOfPossessionRequest: boolean,
|
|
128
|
+
resourceRequestMethod?: string,
|
|
129
|
+
resourceRequestUri?: string,
|
|
130
|
+
dpopNonce?: string
|
|
131
|
+
): PlatformAuthExtraParametersNoCache | undefined {
|
|
132
|
+
if (!isProofOfPossessionRequest) {
|
|
133
|
+
return extraParametersNoCache;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
...extraParametersNoCache,
|
|
138
|
+
...(resourceRequestMethod && {
|
|
139
|
+
pop_method: resourceRequestMethod,
|
|
140
|
+
}),
|
|
141
|
+
...(resourceRequestUri && {
|
|
142
|
+
pop_url: resourceRequestUri,
|
|
143
|
+
}),
|
|
144
|
+
...(dpopNonce && {
|
|
145
|
+
pop_nonce: dpopNonce,
|
|
146
|
+
}),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
39
150
|
/**
|
|
40
151
|
* Request which will be forwarded to native broker by the browser extension
|
|
41
152
|
*/
|
|
@@ -64,11 +175,15 @@ export type PlatformDOMTokenRequest = {
|
|
|
64
175
|
correlationId: string;
|
|
65
176
|
isSecurityTokenService: boolean;
|
|
66
177
|
state?: string;
|
|
178
|
+
preferBinding?: PlatformAuthBindingPreference;
|
|
179
|
+
enclave?: PlatformAuthEnclave;
|
|
180
|
+
requestConfirmation?: string;
|
|
181
|
+
extraParametersNoCache?: PlatformAuthExtraParametersNoCache;
|
|
67
182
|
/*
|
|
68
183
|
* Known optional parameters will go into extraQueryParameters.
|
|
69
184
|
* List of known parameters is:
|
|
70
185
|
* "prompt", "nonce", "claims", "loginHint", "instanceAware", "windowTitleSubstring", "extendedExpiryToken",
|
|
71
|
-
* ProofOfPossessionParams: "
|
|
186
|
+
* ProofOfPossessionParams: "keyId", "tokenType", "shrClaims", "shrNonce", "signPopToken"
|
|
72
187
|
*/
|
|
73
188
|
extraParameters?: DOMExtraParameters;
|
|
74
189
|
};
|
|
@@ -81,12 +196,9 @@ export type DOMExtraParameters = StringDict & {
|
|
|
81
196
|
instanceAware?: string;
|
|
82
197
|
windowTitleSubstring?: string;
|
|
83
198
|
extendedExpiryToken?: string;
|
|
84
|
-
reqCnf?: string;
|
|
85
199
|
keyId?: string;
|
|
86
200
|
tokenType?: string;
|
|
87
201
|
shrClaims?: string;
|
|
88
202
|
shrNonce?: string;
|
|
89
|
-
resourceRequestMethod?: string;
|
|
90
|
-
resourceRequestUri?: string;
|
|
91
203
|
signPopToken?: string; // Set to true only if token request deos not contain a PoP keyId
|
|
92
204
|
};
|
|
@@ -25,6 +25,9 @@ export type PlatformAuthResponse = {
|
|
|
25
25
|
scope: string;
|
|
26
26
|
state: string;
|
|
27
27
|
shr?: string;
|
|
28
|
+
token_type?: string;
|
|
29
|
+
DPoP?: string;
|
|
30
|
+
binding_attested?: boolean;
|
|
28
31
|
extendedLifetimeToken?: boolean;
|
|
29
32
|
};
|
|
30
33
|
|
|
@@ -35,6 +38,16 @@ export type NativeResponseProperties = {
|
|
|
35
38
|
MATS?: string;
|
|
36
39
|
};
|
|
37
40
|
|
|
41
|
+
/**
|
|
42
|
+
* DPoP response values returned through the platform DOM API properties map.
|
|
43
|
+
*/
|
|
44
|
+
export type PlatformDOMResponseProperties = NativeResponseProperties &
|
|
45
|
+
Record<string, string> & {
|
|
46
|
+
token_type?: string;
|
|
47
|
+
dpop_proof?: string;
|
|
48
|
+
binding_attested?: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
38
51
|
/**
|
|
39
52
|
* The native token broker can optionally include additional information about operations it performs. If that data is returned, MSAL.js will include the following properties in the telemetry it collects.
|
|
40
53
|
*/
|
|
@@ -67,7 +80,7 @@ export type PlatformDOMTokenResponse = {
|
|
|
67
80
|
proofOfPossessionPayload?: string;
|
|
68
81
|
extendedLifetimeToken?: boolean;
|
|
69
82
|
error: ErrorResult;
|
|
70
|
-
properties?:
|
|
83
|
+
properties?: PlatformDOMResponseProperties;
|
|
71
84
|
};
|
|
72
85
|
|
|
73
86
|
export type ErrorResult = {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
+
Constants,
|
|
7
8
|
TokenKeys,
|
|
8
9
|
IPerformanceClient,
|
|
9
10
|
invokeAsync,
|
|
@@ -152,7 +153,12 @@ export class LocalStorage implements IWindowStorage<string> {
|
|
|
152
153
|
|
|
153
154
|
// Register listener for cache updates in other tabs
|
|
154
155
|
this.broadcast.addEventListener("message", (event: MessageEvent) => {
|
|
155
|
-
this.updateCache(event, correlationId)
|
|
156
|
+
this.updateCache(event, correlationId).catch(() => {
|
|
157
|
+
this.logger.error(
|
|
158
|
+
"Failed to process cache update broadcast",
|
|
159
|
+
correlationId
|
|
160
|
+
);
|
|
161
|
+
});
|
|
156
162
|
});
|
|
157
163
|
|
|
158
164
|
this.initialized = true;
|
|
@@ -267,20 +273,22 @@ export class LocalStorage implements IWindowStorage<string> {
|
|
|
267
273
|
this.broadcast.postMessage({
|
|
268
274
|
key: key,
|
|
269
275
|
value: value,
|
|
270
|
-
context: this.
|
|
276
|
+
context: this.getBroadcastContext(key),
|
|
271
277
|
});
|
|
272
278
|
}
|
|
273
279
|
|
|
274
280
|
removeItem(key: string): void {
|
|
275
|
-
|
|
276
|
-
this.memoryStorage.
|
|
281
|
+
const itemExists =
|
|
282
|
+
this.containsKey(key) || this.memoryStorage.containsKey(key);
|
|
283
|
+
window.localStorage.removeItem(key);
|
|
284
|
+
this.memoryStorage.removeItem(key);
|
|
285
|
+
if (itemExists) {
|
|
277
286
|
this.broadcast.postMessage({
|
|
278
287
|
key: key,
|
|
279
288
|
value: null,
|
|
280
|
-
context: this.
|
|
289
|
+
context: this.getBroadcastContext(key),
|
|
281
290
|
});
|
|
282
291
|
}
|
|
283
|
-
window.localStorage.removeItem(key);
|
|
284
292
|
}
|
|
285
293
|
|
|
286
294
|
getKeys(): string[] {
|
|
@@ -459,21 +467,78 @@ export class LocalStorage implements IWindowStorage<string> {
|
|
|
459
467
|
return importedArr;
|
|
460
468
|
}
|
|
461
469
|
|
|
462
|
-
/**
|
|
463
|
-
* Gets encryption context for a given cache entry. This is clientId for app specific entries, empty string for shared entries
|
|
464
|
-
* @param key
|
|
465
|
-
* @returns
|
|
466
|
-
*/
|
|
467
470
|
private getContext(key: string): string {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
+
return key.includes(this.clientId) ? this.clientId : "";
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
private getBroadcastContext(key: string): string {
|
|
475
|
+
const normalizedKey = key.toLowerCase();
|
|
476
|
+
const keySegments = normalizedKey.split(CacheKeys.CACHE_KEY_SEPARATOR);
|
|
477
|
+
if (keySegments.length > 1) {
|
|
478
|
+
return keySegments[4] === this.clientId.toLowerCase()
|
|
479
|
+
? this.clientId
|
|
480
|
+
: "";
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const credentialType = this.getCredentialType(normalizedKey);
|
|
484
|
+
if (credentialType) {
|
|
485
|
+
const ownerPrefix = `-${credentialType}-${this.clientId.toLowerCase()}-`;
|
|
486
|
+
return normalizedKey.includes(ownerPrefix) ? this.clientId : "";
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return normalizedKey.includes(this.clientId.toLowerCase())
|
|
490
|
+
? this.clientId
|
|
491
|
+
: "";
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
private getCredentialType(key: string): string | undefined {
|
|
495
|
+
const normalizedKey = key.toLowerCase();
|
|
496
|
+
const keySegments = normalizedKey.split(CacheKeys.CACHE_KEY_SEPARATOR);
|
|
497
|
+
const structuredCredentialType = keySegments[3];
|
|
498
|
+
|
|
499
|
+
return Object.values(Constants.CredentialType)
|
|
500
|
+
.map((type) => type.toLowerCase())
|
|
501
|
+
.find(
|
|
502
|
+
(type) =>
|
|
503
|
+
structuredCredentialType === type ||
|
|
504
|
+
normalizedKey.includes(`-${type}-`)
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
private isFamilyRefreshToken(key: string, credentialType: string): boolean {
|
|
509
|
+
if (
|
|
510
|
+
credentialType !==
|
|
511
|
+
Constants.CredentialType.REFRESH_TOKEN.toLowerCase()
|
|
512
|
+
) {
|
|
513
|
+
return false;
|
|
471
514
|
}
|
|
472
515
|
|
|
473
|
-
|
|
516
|
+
const normalizedKey = key.toLowerCase();
|
|
517
|
+
const keySegments = normalizedKey.split(CacheKeys.CACHE_KEY_SEPARATOR);
|
|
518
|
+
return keySegments.length > 1
|
|
519
|
+
? keySegments[4] === Constants.THE_FAMILY_ID
|
|
520
|
+
: normalizedKey.includes(
|
|
521
|
+
`-${credentialType}-${Constants.THE_FAMILY_ID}-`
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
private isContextValid(key: string, context: string): boolean {
|
|
526
|
+
const credentialType = this.getCredentialType(key);
|
|
527
|
+
const isFamilyRefreshToken =
|
|
528
|
+
credentialType && this.isFamilyRefreshToken(key, credentialType);
|
|
529
|
+
const isClientBoundCredential =
|
|
530
|
+
!!credentialType && !isFamilyRefreshToken;
|
|
531
|
+
|
|
532
|
+
return (
|
|
533
|
+
(!isClientBoundCredential || !!context) &&
|
|
534
|
+
context === this.getBroadcastContext(key)
|
|
535
|
+
);
|
|
474
536
|
}
|
|
475
537
|
|
|
476
|
-
private updateCache(
|
|
538
|
+
private async updateCache(
|
|
539
|
+
event: MessageEvent,
|
|
540
|
+
correlationId: string
|
|
541
|
+
): Promise<void> {
|
|
477
542
|
this.logger.trace(
|
|
478
543
|
"Updating internal cache from broadcast event",
|
|
479
544
|
correlationId
|
|
@@ -483,14 +548,27 @@ export class LocalStorage implements IWindowStorage<string> {
|
|
|
483
548
|
);
|
|
484
549
|
perfMeasurement.add({ isBackground: true });
|
|
485
550
|
|
|
486
|
-
const
|
|
487
|
-
|
|
551
|
+
const key = event.data?.key;
|
|
552
|
+
const context = event.data?.context;
|
|
553
|
+
if (typeof key !== "string" || !key) {
|
|
488
554
|
this.logger.error("Broadcast event missing key", correlationId);
|
|
489
555
|
perfMeasurement.end({ success: false, errorCode: "noKey" });
|
|
490
556
|
return;
|
|
491
557
|
}
|
|
492
558
|
|
|
493
|
-
if (
|
|
559
|
+
if (typeof context !== "string") {
|
|
560
|
+
this.logger.error(
|
|
561
|
+
"Broadcast event missing cache context",
|
|
562
|
+
correlationId
|
|
563
|
+
);
|
|
564
|
+
perfMeasurement.end({
|
|
565
|
+
success: false,
|
|
566
|
+
errorCode: "noContext",
|
|
567
|
+
});
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if (!this.isContextValid(key, context)) {
|
|
494
572
|
this.logger.trace(
|
|
495
573
|
`Ignoring broadcast event from clientId: '${context}'`,
|
|
496
574
|
correlationId
|
|
@@ -512,19 +590,48 @@ export class LocalStorage implements IWindowStorage<string> {
|
|
|
512
590
|
return;
|
|
513
591
|
}
|
|
514
592
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
this.
|
|
518
|
-
|
|
593
|
+
const persistedValue = this.getItem(key);
|
|
594
|
+
try {
|
|
595
|
+
const value = await this.getItemFromEncryptedCache(
|
|
596
|
+
key,
|
|
519
597
|
correlationId
|
|
520
598
|
);
|
|
521
|
-
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
|
|
599
|
+
|
|
600
|
+
// A newer write or removal occurred while this entry was decrypted.
|
|
601
|
+
if (this.getItem(key) !== persistedValue) {
|
|
602
|
+
perfMeasurement.discard();
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
if (!value) {
|
|
607
|
+
this.memoryStorage.removeItem(key);
|
|
608
|
+
this.logger.verbose(
|
|
609
|
+
"Removed item from internal cache",
|
|
610
|
+
correlationId
|
|
611
|
+
);
|
|
612
|
+
} else {
|
|
613
|
+
this.memoryStorage.setItem(key, value);
|
|
614
|
+
this.logger.verbose(
|
|
615
|
+
"Updated item in internal cache",
|
|
616
|
+
correlationId
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
perfMeasurement.end({ success: true });
|
|
620
|
+
} catch {
|
|
621
|
+
if (this.getItem(key) !== persistedValue) {
|
|
622
|
+
perfMeasurement.discard();
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
this.memoryStorage.removeItem(key);
|
|
627
|
+
this.logger.error(
|
|
628
|
+
"Failed to update internal cache from persistent storage",
|
|
525
629
|
correlationId
|
|
526
630
|
);
|
|
631
|
+
perfMeasurement.end({
|
|
632
|
+
success: false,
|
|
633
|
+
errorCode: "cacheUpdateFailed",
|
|
634
|
+
});
|
|
527
635
|
}
|
|
528
|
-
perfMeasurement.end({ success: true });
|
|
529
636
|
}
|
|
530
637
|
}
|
|
@@ -227,6 +227,9 @@ export class StandardController implements IController {
|
|
|
227
227
|
|
|
228
228
|
// Initialize performance client
|
|
229
229
|
this.performanceClient = this.config.telemetry.client;
|
|
230
|
+
this.performanceClient.addGlobalFields({
|
|
231
|
+
allowPlatformBroker: this.config.system.allowPlatformBroker,
|
|
232
|
+
});
|
|
230
233
|
|
|
231
234
|
// Initialize environment-specific crypto and token-binding services.
|
|
232
235
|
if (this.isBrowserEnvironment) {
|
|
@@ -723,11 +726,9 @@ export class StandardController implements IController {
|
|
|
723
726
|
);
|
|
724
727
|
|
|
725
728
|
let result: Promise<void>;
|
|
729
|
+
const platformAuthProvider = this.platformAuthProvider;
|
|
726
730
|
|
|
727
|
-
if (
|
|
728
|
-
this.platformAuthProvider &&
|
|
729
|
-
this.canUsePlatformBroker(request)
|
|
730
|
-
) {
|
|
731
|
+
if (this.canUsePlatformBroker(request) && platformAuthProvider) {
|
|
731
732
|
const nativeClient = new PlatformAuthInteractionClient(
|
|
732
733
|
this.config,
|
|
733
734
|
this.browserStorage,
|
|
@@ -737,7 +738,7 @@ export class StandardController implements IController {
|
|
|
737
738
|
this.navigationClient,
|
|
738
739
|
ApiId.acquireTokenRedirect,
|
|
739
740
|
this.performanceClient,
|
|
740
|
-
|
|
741
|
+
platformAuthProvider,
|
|
741
742
|
this.getNativeAccountId(request),
|
|
742
743
|
this.nativeInternalStorage,
|
|
743
744
|
correlationId,
|
|
@@ -1872,23 +1873,15 @@ export class StandardController implements IController {
|
|
|
1872
1873
|
): boolean {
|
|
1873
1874
|
const correlationId = this.getRequestCorrelationId(request);
|
|
1874
1875
|
this.logger.trace("canUsePlatformBroker called", correlationId);
|
|
1875
|
-
|
|
1876
|
-
this.
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
if (
|
|
1884
|
-
!isPlatformAuthAllowed(
|
|
1885
|
-
this.config,
|
|
1886
|
-
this.logger,
|
|
1887
|
-
correlationId,
|
|
1888
|
-
this.platformAuthProvider,
|
|
1889
|
-
request.authenticationScheme
|
|
1890
|
-
)
|
|
1891
|
-
) {
|
|
1876
|
+
const platformAuthAllowed = isPlatformAuthAllowed(
|
|
1877
|
+
this.config,
|
|
1878
|
+
this.logger,
|
|
1879
|
+
correlationId,
|
|
1880
|
+
this.platformAuthProvider,
|
|
1881
|
+
request.authenticationScheme,
|
|
1882
|
+
this.performanceClient
|
|
1883
|
+
);
|
|
1884
|
+
if (!platformAuthAllowed) {
|
|
1892
1885
|
this.logger.trace(
|
|
1893
1886
|
"canUsePlatformBroker: isPlatformAuthAllowed returned false, returning false",
|
|
1894
1887
|
correlationId
|
|
@@ -2554,7 +2547,8 @@ export class StandardController implements IController {
|
|
|
2554
2547
|
this.logger,
|
|
2555
2548
|
silentRequest.correlationId,
|
|
2556
2549
|
this.platformAuthProvider,
|
|
2557
|
-
silentRequest.authenticationScheme
|
|
2550
|
+
silentRequest.authenticationScheme,
|
|
2551
|
+
this.performanceClient
|
|
2558
2552
|
) &&
|
|
2559
2553
|
silentRequest.account.nativeAccountId
|
|
2560
2554
|
) {
|
|
@@ -38,3 +38,14 @@ export type SignInWithContinuationTokenInputs = {
|
|
|
38
38
|
scopes?: Array<string>;
|
|
39
39
|
claims?: string;
|
|
40
40
|
};
|
|
41
|
+
|
|
42
|
+
export type SignInInputsV2 = SignInInputs;
|
|
43
|
+
|
|
44
|
+
export type ResetPasswordInputsV2 = ResetPasswordInputs;
|
|
45
|
+
|
|
46
|
+
export type SignUpInputsV2 = SignUpInputs & {
|
|
47
|
+
scopes?: Array<string>;
|
|
48
|
+
claims?: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type SignInContinuationInputsV2 = SignInWithContinuationTokenInputs;
|