AlpeNonce
Stores consumed ALPE nonces for replay-attack detection.
Entries are automatically pruned after ``expires_at`` via a scheduled
15-minute maintenance sweep (registered in ``DatabaseNonceAdapter``).
This table uses the standard ``BaseDocType`` UUID PK (``id``) with a
``UNIQUE`` index on ``nonce`` to support ``ON CONFLICT`` deduplication.
The pattern mirrors ``IdempotencyKey`` exactly.
Source: alpe_nonce.py
Fields
| Field | Type | Required | Description | Validators |
|---|---|---|---|---|
| nonce | str | RFC 4122 v4 UUID nonce from the JWE Protected Header. | maxLen: 64 | |
| expires_at | datetime | Expiry timestamp after which this record may be pruned. | - |
Configuration
| Setting | Value |
|---|---|
| Submittable | False |
| Track Changes | True |
Controller
Controller hooks are implemented in *_controller.py files.
Available lifecycle hooks:
validate()- Called before save, raise exceptions for validation errorsbefore_insert()- Called before inserting a new documentafter_insert()- Called after successfully insertingbefore_save()- Called before saving (insert or update)after_save()- Called after savingbefore_delete()- Called before deletingafter_delete()- Called after deleting