Description
As a new user, I want to register and log in securely using JWT-based authentication, and as a developer, I want to enforce input validation using Pydantic so that only valid data enters the system. This ensures that authentication and task operations are both secure and reliable.
Acceptance Criteria
User Authentication & Security
User can register with email and password.
Passwords are hashed using bcrypt before storing in the database.
User can log in with valid credentials and receive a JWT token.
JWT tokens must be validated for accessing protected endpoints.
Input Validation (Pydantic)
Validate user registration inputs (email format, password strength, etc.).
Validate task creation/update inputs (title required, description optional, due_date format, etc.).
Provide meaningful error messages when validation fails (e.g., "Invalid email format", "Password too short").
Description
As a new user, I want to register and log in securely using JWT-based authentication, and as a developer, I want to enforce input validation using Pydantic so that only valid data enters the system. This ensures that authentication and task operations are both secure and reliable.
Acceptance Criteria
User Authentication & Security
User can register with email and password.
Passwords are hashed using bcrypt before storing in the database.
User can log in with valid credentials and receive a JWT token.
JWT tokens must be validated for accessing protected endpoints.
Input Validation (Pydantic)
Validate user registration inputs (email format, password strength, etc.).
Validate task creation/update inputs (title required, description optional, due_date format, etc.).
Provide meaningful error messages when validation fails (e.g., "Invalid email format", "Password too short").