diff --git a/src/FusionAuthClient.ts b/src/FusionAuthClient.ts index 5f21c63..eb8aee4 100644 --- a/src/FusionAuthClient.ts +++ b/src/FusionAuthClient.ts @@ -3839,6 +3839,24 @@ export class FusionAuthClient { .go(); } + /** + * Retrieve a user's two-factor status. + * + * This can be used to see if a user will need to complete a two-factor challenge to complete a login, + * and optionally identify the state of the two-factor trust across various applications. This operation + * provides more payload options than retrieveTwoFactorStatus. + * + * @param {TwoFactorStatusRequest} request The request object that contains all the information used to check the status. + * @returns {Promise>} + */ + retrieveTwoFactorStatusUsing(request: TwoFactorStatusRequest): Promise> { + return this.start() + .withUri('/api/two-factor/status') + .withJSONBody(request) + .withMethod("POST") + .go(); + } + /** * Retrieves the user for the given Id. * @@ -9281,6 +9299,7 @@ export interface IdentityProviderDetails { export interface MFAContext { authenticationThreats?: Array; eventInfo?: EventInfo; + jwt?: Record; mfaTrust?: MFATrust; registration?: UserRegistration; } @@ -9299,6 +9318,7 @@ export interface MFAPolicies { */ export interface MFARequiredLambdaResult { required?: boolean; + sendSuspiciousLoginEvent?: boolean; } /** @@ -11476,6 +11496,17 @@ export interface TwoFactorStartResponse { twoFactorId?: string; } +/** + * Check the status of two-factor authentication for a user, with more options than on a GET request. + */ +export interface TwoFactorStatusRequest extends BaseEventRequest { + action?: MultiFactorAction; + applicationId?: UUID; + token?: string; + twoFactorTrustId?: string; + userId?: UUID; +} + /** * @author Daniel DeGroff */