User service provides authentication functionalities using JsonWebToken
Run cd user-services
from the root of the project.
Run npm install
to install dependencies
Ensure that environment variables are set.
- After installing dependencies, run
npm run dev
to start the application. - The service should be started on http://localhost:8000.
Run npm run test
to execute tests. Tests depend on the deployment URL in the environment variables.
POST request to /api/user
Example request body:
{ "username": String, "password": String }
PUT request to /api/user
Example request body:
{ "oldPassword": String, "newPassword": String, }
DELETE request to /api/user
POST request to /api/user/login
Example request body:
{ "username": String, "password": String, "currToken": String }
GET request to /api/user/session