TotpVerifier
final class TotpVerifier (View source)
Verifies a fixed-width TOTP code at the framework clock without retaining replay or identity state.
Methods
__construct(ClockInterface $clock)
Uses the framework clock so callers and tests share one explicit time boundary.
verify(TotpSecret $secret, string $code, TotpConfiguration $configuration, VerificationWindow $window = new VerificationWindow())
Verifies the current time-step before alternating nearest past and future steps deterministically.
Details
__construct
__construct(ClockInterface $clock)
Uses the framework clock so callers and tests share one explicit time boundary.
verify
TotpVerification
verify(TotpSecret $secret, string $code, TotpConfiguration $configuration, VerificationWindow $window = new VerificationWindow())
Verifies the current time-step before alternating nearest past and future steps deterministically.