Store the information of the single-use tokens
Data model

Fields
| Field |
Type |
Description |
| creation_date* |
DATETIME2 |
Token creation date |
| expiration_date* |
DATETIME2 |
Token expiration date |
| failed_attempts* |
INT |
Number of failed attempts when providing the secret value; when the allowed ones are exhausted, the token is deleted |
| format* |
INT |
Format of the token’s secret value; determines how the value that the user brings when consuming it is normalized |
| hash* |
NVARCHAR (128) |
Token secret value verifier, derived using row fields as salt; clear value is never stored |
| id* |
INT |
Unique token identifier |
| metadata |
NVARCHAR (MAX) |
Additional information associated with the token |
| purpose* |
NVARCHAR (200) |
Purpose for which the token was issued |
| selector* |
NVARCHAR (128) |
The token’s public lookup identifier, used in links sent to the user |
| user_id* |
INT |
Identifier of the user to whom the token is associated |
Primary Key
References
| Column |
Referenced Table |
Referenced column |
Name |
| user_id* |
dbo.AFW_USERS |
user_id |
FK01_AFW_ONE_TIME_TOKEN |