Session management: list active sessions, force logout, token revocation #85
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
JWTs are stateless — once issued, they cannot be revoked until expiry. There is no way for an admin to:
Requirements
Token revocation
revoked_tokenstable or Redis set)JwtAuthenticationFilterchecks revocation list on each requestAdmin API
GET /api/v1/admin/sessions— list active sessions (users with non-expired tokens)DELETE /api/v1/admin/sessions/{userId}— revoke all tokens for a user (force logout)DELETE /api/v1/admin/sessions— revoke all sessions (emergency)Automatic revocation triggers
UI
Notes
token_invalidated_attimestamp per user; reject tokens issued before that timestamp