Files

9 lines
759 B
Markdown
Raw Permalink Normal View History

# Authentication Engine Manifest
2026-10-23 11:43:49 -05:00
## Purpose
Provides authentication and session security for both Administrator Console users and Client SDK connections (`core/auth/*`).
2026-10-23 11:43:49 -05:00
## Modules
- `jwt.ts`: Signs and verifies Client SDK JWT tokens (`clientId`, `name`, `rateLimit`) using `DATASTACK_JWT_SECRET` or the active `admin_settings.jwt_secret`.
- `adminSession.ts`: WebCrypto HMAC-SHA256 administrator session token signer/verifier (`datastack_admin_session` HTTP-only cookie) compatible with both Next.js Edge Middleware and Node.js route handlers.
- `adminUsers.ts`: PostgreSQL-backed administrator account store (`admin_users`) using `crypto.scrypt` password hashing, timing-safe verification, and brute-force login lockout tracking (`admin_login_attempts`).