brewlog/src/server
copilot-swe-agent[bot] b46295d0cf
fix(auth): support session cookie authentication in API endpoints
- Update AuthenticatedUser extractor to check session cookies first
- Add authenticate_via_session() helper function
- Session cookies now work for all API write operations
- Change SameSite to Strict for better CSRF protection
- Add BREWLOG_SECURE_COOKIES env var to enable secure flag in production

This fixes the bug where authenticated frontend users got 401 errors
when submitting forms. API endpoints now accept both Bearer tokens
and session cookies for authentication.

All 65 tests pass (8 unit + 42 server + 15 CLI) 

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:49 +00:00
..
routes fix(auth): support session cookie authentication in API endpoints 2025-11-25 16:28:49 +00:00
auth.rs fix(auth): support session cookie authentication in API endpoints 2025-11-25 16:28:49 +00:00
errors.rs feat: bootstrap brewlog platform 2025-11-24 11:44:12 +00:00
mod.rs feat(api): add authentication middleware and token management routes 2025-11-25 16:28:10 +00:00
server.rs fix(security): validate session tokens against database 2025-11-25 16:28:48 +00:00