user_auth_tokens


Description

{“what”:“Authentication tokens issued to users for API access.”,“why”:“Without it, there is no way to validate user sessions or revoke access.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:46.916576657+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 null

{“what”:“Unique UUID for each token record.”,“why”:“Needed to reference a specific token for revocation or updates.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.053388221+00:00”}

user_id uuid 2147483647 null
users.id user_auth_tokens_user_id_fkey C

{“what”:“UUID of the user account that owns the token.”,“why”:“Associates tokens with users to enforce per-user access and listing.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.065851629+00:00”}

name varchar 255 null

{“what”:“Label for the token, e.g., ‘mobile’ or ‘web’.”,“why”:“Distinguishes multiple tokens belonging to the same user.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.467572581+00:00”}

nb_access int4 10 null

{“what”:“Number of times the token has been used.”,“why”:“Tracks usage for rate limiting or detecting abnormal activity.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.492654085+00:00”}

last_access timestamp 29,6 √ null

{“what”:“Timestamp of the most recent token use.”,“why”:“Allows detection of inactive tokens for cleanup or expiry.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.645331495+00:00”}

expire_at timestamp 29,6 √ null

{“what”:“Timestamp when the token becomes invalid.”,“why”:“Enforces token lifetime and forces re-authentication after expiry.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.697020751+00:00”}

created_at timestamp 29,6 null

{“what”:“Timestamp when the token was issued.”,“why”:“Provides token age for audit and comparison with expiry.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.723580140+00:00”}

deleted_at timestamp 29,6 √ null

{“what”:“Timestamp when the token was soft-deleted.”,“why”:“Allows revocation while preserving history for audit.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:47.735153061+00:00”}

Indexes

Constraint Name Type Sort Column(s)
user_auth_tokens_pkey Primary key Asc id

Relationships