Login
Authentication
No authentication required (public endpoint).Request Body
Username
User password
Response
Success indicator
HTTP status code (200)
“Usuario autenticado.”
User authentication data
Example Request
Example Response
Error Responses
401 Unauthorized
Invalid username or password
500 Internal Server Error
Server error during authentication
Logout
Authentication
Required: JWT token via cookieRequest Body
No request body required.Response
Success indicator
HTTP status code (200)
“Logout exitoso.”
No data returned
Example Request
Example Response
Error Responses
401 Unauthorized
Missing or invalid authentication token
500 Internal Server Error
Server error during logout
Password Recovery
Authentication
No authentication required (public endpoint).Request Body
User’s registered email address
Response
Success indicator
HTTP status code (200)
“Se ha enviado la nueva contraseña.”
No data returned
Example Request
Example Response
Error Responses
400 Bad Request
Email address not registered
500 Internal Server Error
Server or email sending error
Notes
- The JWT token is stored in an HTTP-only cookie and automatically included in subsequent requests
- Token expiration is set to 1 hour (3600000ms)
- Password recovery generates a random password and emails it to the user
- Passwords are hashed using bcrypt with 10 salt rounds before storage
