• Stefy Lanza (nextime / spora )'s avatar
    Implement comprehensive JWT token management system · 50cae6c1
    Stefy Lanza (nextime / spora ) authored
    Features implemented:
    - APIToken model with secure SHA256 hashing and expiration tracking
    - JWT utilities for token generation, validation, and API authentication
    - Database migration (Migration_003_CreateAPITokensTable) for APIToken table
    - Token management routes for CRUD operations (create, list, delete, revoke, extend)
    - Professional web interface for token management with real-time functionality
    - API authentication middleware with @require_api_token decorator
    - Protected REST API endpoints (/api/fixtures, /api/matches, /api/match/<id>)
    - Multiple authentication methods (Bearer token, X-API-Token header, query parameter)
    - Token lifecycle management with usage tracking and IP monitoring
    - Updated navigation integration across all templates
    - Comprehensive README documentation with API examples and security best practices
    
    Security features:
    - Cryptographically secure token generation using secrets.token_urlsafe(32)
    - SHA256 token hashing for secure database storage
    - One-time token display with copy-to-clipboard functionality
    - Token expiration management with configurable periods
    - Usage tracking with last_used_at and last_used_ip fields
    - Proper database indexing and foreign key constraints
    
    Version bump: 1.0.0 → 1.1.0
    50cae6c1
README.md 18.8 KB