fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 16:04:16 +02:00
64f50074bd chore: setup design references
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 15:54:47 +02:00
2a64991916 refac: GET /v1/auth/registration
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 15:40:25 +02:00
61828783a1 refac: GET /static/uploadedImages/{filename}
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 15:17:44 +02:00
8d17a12e92 refac: GET /v1/auth/me
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 06:49:58 +02:00
0e050c36ff fix: rate limiting X-Real-IP from the real peer
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 06:14:56 +02:00
9b47685002 refac: split the auth handler into registration and login, account verification, and password reset handlers, each with its own dependencies
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 05:58:40 +02:00
3282b0580c fix: remove the unused user use cases, fix the specs that no longer match the code, include api/middleware and api/pkg/claims in mutation testing, log failures that password reset requests currently ignore, and reject user_id claims that don't fit a user id
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 05:33:05 +02:00
cbb403011a fix: login and password reset requests are rate-limited per client (not in the README; there is currently no brute-force protection on the public auth routes)
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-25 05:03:37 +02:00
f3ec3d2fa2 fix: resetting the password or cancelling a registration ends existing sessions: a token issued before the change is refused
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 16:32:43 +02:00
81c4b62175 fix: reading a single article follows the same rule as the list: anyone can read an online article, a verified user can also read an offline one, and an unknown or hidden id returns 404
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 15:39:55 +02:00
2ee28203ab fix: API responses never include a user's password, verification code or reset code hashes, or their expiry dates; verifying an account returns only the public user fields
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 05:11:52 +02:00
aa865af2e9 refac: reamaining auth surface rewrite, T0
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 03:36:39 +02:00
6d510d2805 refac: register only open while no verified acc exists, enforced by a use case rather than handler & sends verification email whose link uses the conf pub URL whose code expires after 2h
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 01:59:26 +02:00
6e9e108033 refac: several unverified users can exist at once: an empty reset or verification code is stored as no value so it doesn't break the unique constraint, and deleting a user removes the row so the same username and email can register again
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 01:30:03 +02:00
0b4e614ec9 refac: runtime settings are read once at startup and passed in through the composition root; no handler, router or repository reads environment variables
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 00:33:28 +02:00
e474f03d91 refac: authenticated user can upload an image to an existing article and receives its public location; an unknown article returns 404 and a disallowed type returns 400
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-24 00:03:32 +02:00
5992c8598b refac: allowed image types and the size limit are a domain rule checked by the use case, not by the persistence layer
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-23 23:42:21 +02:00
8a8a24434a refac: deleting an article also deletes its images, and deleting a missing article returns 404
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-23 23:24:05 +02:00
c16fdbd26d refac: authenticated user can edit an article's body; an unknown id returns 404
fsylvain pushed to refac/domain-driven at fsylvain/RenewCMS 2026-09-23 22:54:46 +02:00
8822bdddd0 refac: authenticated user can publish and unpublish an article; an unknown id returns 404