How many codes are currently tracked. Exposed for tests and diagnostics; the codes themselves are never enumerated.
Count of pending and recently redeemed codes.
Mints a code bound to the PKCE challenge, redirect URI and factors in force at authorize time.
Everything known about the authorization at mint time.
Current epoch milliseconds, injectable for tests.
The stored record, including its freshly generated code.
Redeems a code exactly once.
A code that was already redeemed stays in the map so this call can report the reuse; the caller reacts by revoking the token family that the first redemption created.
The code presented at the token endpoint.
Current epoch milliseconds, injectable for tests.
Procedure with the record, or a failure naming the reason.
Drops every code that can no longer be redeemed. Used codes are kept until their expiry so reuse remains detectable for the rest of the window.
Current epoch milliseconds, injectable for tests.
Nothing.
Remembers the token family a redemption created so a later reuse of the same code can revoke everything that redemption handed out.
The code that was just redeemed.
Family id of the refresh token issued for it.
Nothing.
Looks up the token family a code created.
The code presented at the token endpoint.
Procedure with the family id, or a failure when none was bound.
In-process registry of pending authorization codes. Deliberately not persisted: a code outlives neither a restart nor its 60-second window, and writing one to disk would put a bearer-equivalent secret at rest.