final class TotpVerification (View source)

Reports whether a code matched and, only on success, which counter step a host may consume for replay protection.

Methods

valid(int $matchedTimeStep)

Creates a successful result for framework-internal verification flow only.

Creates a failed result for framework-internal verification flow only.

bool

Indicates whether the submitted code matched one of the permitted counter steps.

bool
int|null

Returns the matched RFC 6238 counter, or null when verification failed.

int|null

Details

valid

static TotpVerification valid(int $matchedTimeStep)
internal  
 

Creates a successful result for framework-internal verification flow only.

Parameters

int $matchedTimeStep

Return Value

TotpVerification

invalid

static TotpVerification invalid()
internal  
 

Creates a failed result for framework-internal verification flow only.

Return Value

TotpVerification

isValid

bool isValid()

Indicates whether the submitted code matched one of the permitted counter steps.

Return Value

bool

matchedTimeStep

int|null matchedTimeStep()

Returns the matched RFC 6238 counter, or null when verification failed.

Return Value

int|null