#46 [Admin Panel] Token Management API - Revoke Token

closed critical Created 2025-11-27 07:12 · Updated 2025-11-27 08:51

Description

Edit
Implement DELETE /api/v1/admin/tokens/<token_id> endpoint to revoke a specific token. **API Specification:** - Endpoint: DELETE /api/v1/admin/tokens/<token_id> - Permission Required: manage_users - Path Parameter: token_id (UUID) - Response: {success: true, token_id, revoked_at} **Requirements:** - Mark token as revoked in database (is_revoked = true) - Add token to revocation list for real-time checking - Log audit event with token details - Return 404 if token not found - Idempotent - revoking already revoked token succeeds **Token Revocation Check:** - Modify JWT verification to check revocation list - Use cache (Redis/memory) for fast lookup - TTL cache entries until token expiry **IMPORTANT:** Implement with ultra attention to details and correctness. **BEFORE CLOSING:** Take screenshot showing token revocation. Add comment summarizing implementation.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...