Interface ServerChallenge<State>

Server side of a challenge.

interface ServerChallenge<State = any> {
    challengeId: string;
    process: (
        request: ChallengeRequest,
        context: ServerChallengeContext<State>,
    ) => Promise<ServerChallengeResponse>;
    retryLimit: number;
    timeLimit: number;
}

Type Parameters

  • State = any

Implemented by

Properties

challengeId: string

Challenge module identifier.

process: (
    request: ChallengeRequest,
    context: ServerChallengeContext<State>,
) => Promise<ServerChallengeResponse>

Process selection or continuation of the challenge.

retryLimit: number

Retry limit, including the initial attempt.

timeLimit: number

Time limit, in milliseconds.