This pull request is related to #17 and implements essential user authentication features in the backend. The following functionalities have been added:
Generation of JWT:
Added functionality to generate a JSON Web Token (JWT) with parameter username
The JWT contains user-specific information and is set to expire after a predefined duration.
Validation of JWT:
Implemented middleware to validate incoming JWTs.
Ensures that only authenticated requests can access protected endpoints by verifying the token's signature and expiration.
Registration of User:
Added a user registration endpoint to allow new users to create accounts.
Redirecting User After Logging In:
Upon successful login, the user is provided with a JWT and redirected to the appropriate dashboard or homepage.
This pull request is related to #17 and implements essential user authentication features in the backend. The following functionalities have been added:
Generation of JWT: Added functionality to generate a JSON Web Token (JWT) with parameter username The JWT contains user-specific information and is set to expire after a predefined duration.
Validation of JWT: Implemented middleware to validate incoming JWTs. Ensures that only authenticated requests can access protected endpoints by verifying the token's signature and expiration.
Registration of User: Added a user registration endpoint to allow new users to create accounts.
Redirecting User After Logging In: Upon successful login, the user is provided with a JWT and redirected to the appropriate dashboard or homepage.