FileChallengeStore
A challenge ledger on disk: each issued challenge kept until it is consumed once or expires. The shape mirrors the framework's other file stores — an exclusive lock around every mutation, JSON on disk. Consuming a challenge DELETES it, so a second attempt with the same one finds nothing: single-use is enforced by removal, not by a flag someone could forget to check.
FileChallengeStore::__construct()
public function __construct(string $path, int $ttlSeconds = 300, ?callable $clock = null):Parameters
| Name | Type | Description |
|---|---|---|
| $path | string | where the ledger lives on disk |
| $ttlSeconds | int | how long an issued challenge stays acceptable |
| $clock | (callable(): int | null) | the current unix time, injectable for tests |
FileChallengeStore::issue()
public function issue(): stringMint a fresh random challenge, keep it until it expires, and return its raw bytes.
FileChallengeStore::consume()
public function consume(string $challenge): boolAccept a challenge once — true if issued and unexpired, then deleted so it can never be true again.
Parameters
| Name | Type | Description |
|---|---|---|
| $challenge | string |