Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/FusionAuthClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ClientResponse<TwoFactorStatusResponse>>}
*/
retrieveTwoFactorStatusUsing(request: TwoFactorStatusRequest): Promise<ClientResponse<TwoFactorStatusResponse>> {
return this.start<TwoFactorStatusResponse, Errors>()
.withUri('/api/two-factor/status')
.withJSONBody(request)
.withMethod("POST")
.go();
}

/**
* Retrieves the user for the given Id.
*
Expand Down Expand Up @@ -9281,6 +9299,7 @@ export interface IdentityProviderDetails {
export interface MFAContext {
authenticationThreats?: Array<AuthenticationThreats>;
eventInfo?: EventInfo;
jwt?: Record<string, any>;
mfaTrust?: MFATrust;
registration?: UserRegistration;
}
Expand All @@ -9299,6 +9318,7 @@ export interface MFAPolicies {
*/
export interface MFARequiredLambdaResult {
required?: boolean;
sendSuspiciousLoginEvent?: boolean;
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down