- Migration 082: api_keys table (user_id, name, prefix, hashed_key, scopes, last_used_at, expires_at) - APIKey model, APIKeyService (Create, List, Delete, ValidateAPIKey) - APIKeyHandler: GET/POST/DELETE /api/v1/developer/api-keys - AuthMiddleware: X-API-Key and Bearer vza_* accepted as alternative to JWT - CSRF: skip for API key auth (stateless) - Key format: vza_ prefix, SHA-256 hashed storage
7 lines
235 B
SQL
7 lines
235 B
SQL
-- 082_create_api_keys_down.sql
|
|
-- Rollback: drop api_keys table
|
|
|
|
DROP INDEX IF EXISTS idx_api_keys_expires_at;
|
|
DROP INDEX IF EXISTS idx_api_keys_user_id;
|
|
DROP INDEX IF EXISTS idx_api_keys_prefix;
|
|
DROP TABLE IF EXISTS public.api_keys;
|