brewlog/tests/server
copilot-swe-agent[bot] 4c040f2c58
fix(security): validate session tokens against database
- Add sessions table to store session tokens with expiration
- Create Session domain model and SessionRepository trait
- Implement SqlSessionRepository for session persistence
- Update is_authenticated() to validate tokens against database
- Sessions expire after 30 days
- Session tokens hashed with SHA-256 before storage
- Delete sessions from database on logout
- Update all page handlers to properly validate sessions

This prevents session hijacking by ensuring only valid, unexpired
tokens stored in the database can authenticate requests.

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:48 +00:00
..
auth_api.rs test(server): fix broken tests by adding authentication support 2025-11-25 16:28:13 +00:00
helpers.rs fix(security): validate session tokens against database 2025-11-25 16:28:48 +00:00
main.rs fix(api): use TokenResponse DTO to exclude sensitive token_hash field 2025-11-25 16:28:12 +00:00
roasters_api.rs test(server): fix broken tests by adding authentication support 2025-11-25 16:28:13 +00:00
roasts_api.rs test(server): fix broken tests by adding authentication support 2025-11-25 16:28:13 +00:00
timeline.rs test(server): fix broken tests by adding authentication support 2025-11-25 16:28:13 +00:00