eff7c5c281
wire auth api
2026-05-23 23:21:07 +03:00
9e70fae38d
test auth controller login, logout, and me methods
2026-05-20 10:22:52 +03:00
613180d459
copy user entity and auth from ysv
2026-05-18 21:32:55 +03:00
9d5bfc33a6
laravel init
2026-05-18 21:24:18 +03:00
f6a33cf620
delete backend, starting over
2026-05-18 21:18:20 +03:00
89b63cb9e9
wire postgres session repo, migrations, seed, and dev serve
2026-05-17 22:01:27 +03:00
d99d893394
add postgres user repository
2026-05-17 21:50:47 +03:00
e8e7cf9ea9
add admin login page at /login
2026-05-17 10:40:03 +03:00
097ce118dd
refactor: drop unused domain property from email address
2026-05-17 10:11:33 +03:00
e2b69632f6
refactor: remove redundant guard from logout controller
...
The guard is now in the Logout use case. Controller just passes the raw cookie value through.
2026-05-17 10:09:42 +03:00
c6306af73b
implement: move null/empty token guard into logout use case
...
Green phase: execute() accepts ?string, returns early for null or empty string, otherwise delegates to repository.
2026-05-17 10:09:31 +03:00
722c5303df
refactor: remove unused response param from controller methods
2026-05-17 10:04:15 +03:00
9661452c75
refactor: extract error response helper and slim json response
...
Replace multiple catch blocks with single catch(Throwable) funneled through errorResponse() matching the CompanyController pattern. Also clean jsonResponse to accept data+status only, instantiating Response internally.
2026-05-17 09:59:32 +03:00
56ddba707d
format: fix psr12 style issues
...
phpcbf auto-fixes: string concatenation spacing, single-line class braces, closing brace placement.
2026-05-17 09:45:26 +03:00
9703f82788
add domain layer, config, and entry point
...
Domain: User, Session, EmailAddress, DTOs, repositories, services (PasswordHasher, TokenGenerator, Clock). Config: PHP-DI container definitions and Slim routes. Entry point: public/index.php with slim-bridge.
2026-05-17 09:45:26 +03:00
e54197f8a5
implement auth controller
...
Green phase: AuthController handles login (authenticate + create session + set cookie), logout (delete session + clear cookie), and me (return user from request attribute).
2026-05-17 09:45:25 +03:00
b581e80413
implement auth middleware
...
Green phase: PSR-15 AuthMiddleware checks auth_token cookie, looks up session, validates expiry, sets user attribute on request or returns 401.
2026-05-17 09:45:25 +03:00
58772d66c1
implement logout use case
...
Green phase: Logout calls deleteByToken on SessionRepository. No-op for non-existent tokens.
2026-05-17 09:45:24 +03:00
d490260807
implement create session use case
...
Green phase: CreateSession generates a token, creates a session with 7-day expiry, and persists it via SessionRepository.
2026-05-17 09:45:23 +03:00
b14cd565bb
implement authenticate user use case
...
Green phase: AuthenticateUser validates credentials, throws BadRequestException for empty fields, UnauthorizedException for unknown email or wrong password.
2026-05-17 09:45:23 +03:00