Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Luisanchez0/modulo_Horario/llms.txt

Use this file to discover all available pages before exploring further.

The login endpoint verifies a teacher or administrator’s credentials and returns a short-lived JWT. Include the token in subsequent requests as Authorization: Bearer <token>. The endpoint is rate-limited to 5 requests per minute per IP in production (enforced by Nginx); a 429 response means you have been throttled. Base URL: http://localhost:8001

Request

correo
string
required
The account’s email address.
password
string
required
The account’s plain-text password. It is compared against the stored bcrypt hash server-side.

Response

token
string
Signed JWT. Decode it to inspect the payload: id, correo, and rol (DOCENTE or ADMIN).

Examples

curl -s -X POST http://localhost:8001/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "correo": "[email protected]",
    "password": "s3cr3t0!"
  }'
The JWT payload contains id, correo, and rol. Store the token in memory rather than localStorage to reduce XSS exposure.
After 5 failed attempts in one minute the endpoint returns 429. Wait 60 seconds before retrying.

Build docs developers (and LLMs) love