TIDE/backend/app/Auth
yisroel 05f935f275
add Session entity, persistence, fake
Session: immutable holder of token, owning User, createdAt,
expiresAt. isExpired(now) compares >= expiresAt. SessionModel
keys on token (string primary, non-incrementing). migration adds
sessions table with foreign user_id (cascade on user delete) and
indexed expires_at for cleanup queries. EloquentSessionRepository
takes UserRepository to rehydrate the owning User on findByToken;
sessions for deleted users return null. FakeSessionRepository
mirrors with an in-memory map keyed by token, defensive copies on
read.
2026-05-06 15:12:07 +03:00
..
BcryptPasswordHasher.php add auth utility interfaces and impls 2026-05-06 15:11:19 +03:00
Clock.php add auth utility interfaces and impls 2026-05-06 15:11:19 +03:00
CreateSessionDto.php add Session entity, persistence, fake 2026-05-06 15:12:07 +03:00
EloquentSessionRepository.php add Session entity, persistence, fake 2026-05-06 15:12:07 +03:00
PasswordHasher.php add auth utility interfaces and impls 2026-05-06 15:11:19 +03:00
RandomTokenGenerator.php add auth utility interfaces and impls 2026-05-06 15:11:19 +03:00
Session.php add Session entity, persistence, fake 2026-05-06 15:12:07 +03:00
SessionModel.php add Session entity, persistence, fake 2026-05-06 15:12:07 +03:00
SessionRepository.php add Session entity, persistence, fake 2026-05-06 15:12:07 +03:00
SystemClock.php add auth utility interfaces and impls 2026-05-06 15:11:19 +03:00
TokenGenerator.php add auth utility interfaces and impls 2026-05-06 15:11:19 +03:00