This API provides an User system and JWT Authentication The file http.http contain a example with REST Client VSCODE Extension
GET http://localhost:3000/api/v1/ HTTP/1.1
Returns a hello message (JSON).
POST http://localhost:3000/api/v1/register HTTP/1.1
content-type: application/json
{
"email": "user@user.com",
"password": "password",
"name": "user",
"lastName": "user"
}
Generates a token and stores it in a cookie, then returns user information (JSON).
POST http://localhost:3000/api/v1/login HTTP/1.1
content-type: application/json
{
"email": "user@user.com",
"password": "password"
}
This route allows a user to log in to the application. You must send a JSON object with the email and password fields.
POST http://localhost:3000/api/v1/logout HTTP/1.1
content-type: application/json
This route logout a user from the application.
GET http://localhost:3000/api/v1/profile
Content-Type: application/json
This route returns the information of the authenticated user(JSON).