alualuew / TheArcWebShop

0 stars 0 forks source link

JWT handling #9

Open FloatG opened 12 months ago

FloatG commented 12 months ago

Description: As a developer, I want to implement JWT handling in the application to secure API endpoints and authenticate users.

Acceptance Criteria:

  1. Implement JWT-based authentication for user login and registration.
  2. Ensure that upon successful authentication, the server issues a JWT token containing user information.
  3. JWT tokens should have a configurable expiration time and be refreshed automatically when nearing expiration.
  4. Create middleware to secure API endpoints by validating JWT tokens.
  5. Unauthorized access to protected API endpoints should return a proper error response.
  6. Implement a mechanism for users to log out, which invalidates their JWT token.
  7. Develop unit tests to ensure the correctness of JWT handling functionality.

Definition of Done: