PlatformTotpChallengeService
in package
FinalYes
Consume each TOTP moving factor once across login, recovery and sensitive actions.
Table of Contents
Properties
- $connection : Connection
- $verifier : PlatformTotpVerifierInterface
Methods
- __construct() : mixed
- Bind the challenge verifier and shared platform database.
- consume() : bool
- Reserve an attempt and atomically consume the matched TOTP counter.
Properties
$connection read-only
private
Connection
$connection
$verifier read-only
private
PlatformTotpVerifierInterface
$verifier
Methods
__construct()
Bind the challenge verifier and shared platform database.
public
__construct(Connection $connection, PlatformTotpVerifierInterface $verifier) : mixed
Parameters
- $connection : Connection
- $verifier : PlatformTotpVerifierInterface
consume()
Reserve an attempt and atomically consume the matched TOTP counter.
public
consume(string $userId, string|null $secretRef, string $code) : bool
Parameters
- $userId : string
- $secretRef : string|null
- $code : string