This endpoint issues a signed JWT token to authenticated administrators. On a successful request, credentials supplied in the request body are compared against theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Manuelfg1985/Proyecto_Final_26/llms.txt
Use this file to discover all available pages before exploring further.
ADMIN_EMAIL and ADMIN_PASSWORD environment variables configured on the server. If both values match, a token signed with JWT_SECRET is returned and must be included as a Bearer token in the Authorization header of every subsequent call to protected endpoints.
Method and path
| Field | Value |
|---|---|
| Method | POST |
| Path | /api/auth/login |
| Auth | None required |
| Content-Type | application/json |
Request body
Admin email address. Must match the value stored in the
ADMIN_EMAIL environment variable on the server.Admin password. Must match the value stored in the
ADMIN_PASSWORD environment variable on the server. Compared with a strict equality check against the stored credential.Responses
200 OK — Credentials are valid. Returns a success message and the signed JWT token.Confirmation string. Value:
"Login exitoso".Signed JWT token. Include this value in the
Authorization: Bearer <token> header for all protected requests.400 Bad Request — One or both fields are missing from the request body.
Example
The returned token expires 1 hour after it is issued. Once it expires you must call this endpoint again to obtain a fresh token before accessing any protected route.