Commit Graph

5 Commits

Author SHA1 Message Date
c6f82090d2 feat: auth hardening + codebase quality sweep
Refresh tokens: RefreshToken entity, PostgresRefreshTokenRepository,
login returns refresh token, POST /auth/refresh (rotation), POST /auth/logout,
JWT expiry 24h→1h, configurable via with_expiry().

Route protection: require_auth middleware on protected routes,
public routes split (register, login, refresh, sharing/access).

Authorization: caller_id added to ReadAssetFileQuery, ReadDerivativeQuery,
GetStackQuery, DeleteStackCommand with ownership checks. Admin-only gates
on processing, storage, sidecar, duplicates handlers.

Quality fixes: visibility filtering bypass in search(), unwrap panics in
date parsing, DRY auth header parsing, centralized parsers module,
email validation via email_address crate, value objects (Username, MimeType,
RelativePath), domain events (UserCreated, UserDeleted, AlbumCreated,
TagCreated, DuplicateDetected), postgres error mapping for constraint
violations, OptionExt::or_not_found helper, in_memory_repo! macro,
GetStackQuery moved to queries, album add_entry 200→201.
2026-05-31 22:26:02 +02:00
6c88ac344c refactor: extract inline tests to separate files in auth + storage adapters 2026-05-31 11:16:18 +02:00
c2ebca0da0 style: cargo fmt --all 2026-05-31 05:31:42 +02:00
3571c94bec domain: add cross-cutting value objects (SystemId, DateTimeStamp, Checksum, StructuredData) 2026-05-31 03:16:28 +02:00
f9cb142c3b init: scaffold from k-template with postgres + worker 2026-05-31 03:08:38 +02:00