TotpVerification
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
Creates a successful result for framework-internal verification flow only.
Creates a failed result for framework-internal verification flow only.
Indicates whether the submitted code matched one of the permitted counter steps.
Returns the matched RFC 6238 counter, or null when verification failed.
Details
valid
static TotpVerification
valid(int $matchedTimeStep)
| internal |
Creates a successful result for framework-internal verification flow only.
invalid
static TotpVerification
invalid()
| internal |
Creates a failed result for framework-internal verification flow only.
isValid
bool
isValid()
Indicates whether the submitted code matched one of the permitted counter steps.
matchedTimeStep
int|null
matchedTimeStep()
Returns the matched RFC 6238 counter, or null when verification failed.