upaas/internal/database
clawbot 730a46c9ca feat: add API token authentication (closes #87)
- Add api_tokens table migration (007)
- Add APIToken model with CRUD operations
- Generate tokens with upaas_ prefix + 32 hex chars
- Store SHA-256 hash of tokens (not plaintext)
- Update APISessionAuth middleware to check Bearer tokens
- Add POST/GET/DELETE /api/v1/tokens endpoints
- Token creation returns plaintext once; list never exposes it
- Expired and revoked tokens are rejected
- Tests for creation, listing, deletion, bearer auth, revocation
2026-02-19 20:15:19 -08:00
..
migrations feat: add API token authentication (closes #87) 2026-02-19 20:15:19 -08:00
database.go feat: add API token authentication (closes #87) 2026-02-19 20:15:19 -08:00
hash_test.go fix: use hashed webhook secrets for constant-time comparison 2026-02-15 14:06:53 -08:00
migrations.go Initial commit with server startup infrastructure 2025-12-29 15:46:03 +07:00