You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a `token_generation` column to `torrust_users` and embed a `gen`
claim in every session JWT. Password changes, admin-role grants, and
bans increment the counter, instantly invalidating all outstanding
tokens for that user.
Revocation is checked at three entry points (defence in depth):
- `Authentication::get_user_id_from_bearer_token`
- `verify_token_handler`
- `authentication::Service::renew_token`
Rework the `BearerToken` extractor to reject missing or malformed
`Authorization` headers at the extraction boundary instead of deferring
the check downstream. Remove the `bearer_token::Extract` wrapper and
`get_optional_logged_in_user` free function; the logic now lives
directly in the extractors.
Add `AuthError::TokenRevoked` for revoked-token responses.
Add crate tests for the JWT module (sign/verify round-trips, audience
cross-contamination, tampered tokens) and for `parse_token` (whitespace
trimming, empty bearer, non-ASCII rejection).
0 commit comments