vikunja/pkg/db
kolaente b3d0b2f697 feat: add Session model with CRUD, permissions, and cleanup cron
- Session struct with UUID primary key, hashed refresh token, device
  info, IP address, and last-active tracking
- Token generation via generateHashedToken (SHA-256, 128 random bytes)
- CreateSession, GetSessionByRefreshToken, GetSessionByID
- Atomic RotateRefreshToken with WHERE on old hash to prevent replays
- ReadAll scoped to authenticated user (link shares rejected)
- Delete scoped to owning user (link shares rejected)
- Hourly cleanup cron for expired sessions based on is_long_session
- ErrSessionNotFound error type with HTTP 404 mapping
2026-02-25 10:30:25 +01:00
..
fixtures feat: add Session model with CRUD, permissions, and cleanup cron 2026-02-25 10:30:25 +01:00
db.go refactor(db): extract testable ResolveDatabasePath function (#2193) 2026-02-08 10:47:57 +00:00
db_path_test.go refactor(db): extract testable ResolveDatabasePath function (#2193) 2026-02-08 10:47:57 +00:00
dump.go fix: correct license header references (#882) 2025-06-10 12:18:38 +02:00
helpers.go fix: MySQL constraint violations returning HTTP 500 instead of 400 for task bucket duplicates (#1154) 2025-07-22 08:59:12 +00:00
helpers_test.go fix: MySQL constraint violations returning HTTP 500 instead of 400 for task bucket duplicates (#1154) 2025-07-22 08:59:12 +00:00
test.go refactor: remove environment variable requirements for go test 2026-02-17 18:01:05 +01:00
test_fixtures.go refactor: remove environment variable requirements for go test 2026-02-17 18:01:05 +01:00