This is a protected endpoint used to verify that a JWT token is valid and correctly parsed by the server. 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.
authMiddleware extracts the token from the Authorization header, verifies its signature against JWT_SECRET, and — if valid — injects the decoded payload into the request. The route handler then returns that decoded payload (containing the admin email, issued-at timestamp iat, and expiry timestamp exp) so you can confirm the token is being accepted as expected.
Method and path
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/auth/private |
| Auth | Bearer token required |
Request headers
A valid JWT token obtained from
POST /api/auth/login. Must follow the format Bearer <token> — the middleware checks that the header begins with "Bearer " and will reject requests that omit this prefix.Responses
200 OK — The token is valid. Returns a confirmation message and the decoded JWT payload.Confirmation string. Value:
"Private content available only for authenticated users".The decoded JWT payload injected by the auth middleware.
401 Unauthorized — No
Authorization header was provided, or the header does not start with "Bearer ".