As a user, I'd like to create an account with a unique email, secure password, and a chosen username.
Description
Implement an endpoint that allows users to register for a single session without storing any data permanently. Upon registration, each user should receive a unique session token that can be used to access protected endpoints within the session's lifetime. User data will be stored temporarily in memory and will be cleared upon application restart.
Acceptance Criteria
[x] POST /api/register endpoint successfully registers a new user for the session and returns a unique session token with a 201 Created response on success.
[x] Returns a 400 Bad Request response if the email is already in use or if validation fails.
[x] Users can log out, which invalidates their session token.
[x] Unit tests cover email uniqueness checks, password hashing, session token generation, and access validation for protected endpoints.
User story
As a user, I'd like to create an account with a unique email, secure password, and a chosen username.
Description
Implement an endpoint that allows users to register for a single session without storing any data permanently. Upon registration, each user should receive a unique session token that can be used to access protected endpoints within the session's lifetime. User data will be stored temporarily in memory and will be cleared upon application restart.
Acceptance Criteria
Story Points: 3