Files
openrouter-watcher/tests/unit
Luca Sacchi Ricciardi 649ff76d6c feat(security): T15 implement API token generation
- Add generate_api_token with format 'or_api_' + 48 bytes random
- Implement hash_token with SHA-256
- Add verify_api_token with timing-safe comparison (secrets.compare_digest)
- Only hash stored in DB, plaintext shown once
- 20 comprehensive tests with 100% coverage
- Handle TypeError for non-string inputs
2026-04-07 12:12:39 +02:00
..