The Authentication API is the entry point for every session in Banco Alimentos. Submit valid credentials and the server returns a signed JSON Web Token (JWT). Include that token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alvarezlautaro/BancoAlimentos/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header of every subsequent request. All other API endpoints validate this token and enforce permission-based access control, so no other endpoint is reachable without first completing this step.
POST /api/auth/login
Validates the supplied credentials against the user store. On success it returns200 OK with a JWT; on failure it responds with 401 Unauthorized.
Request body
The account username registered in the system. Cannot be blank.
The account password. Transmitted over HTTPS only. Cannot be blank.
Response
Returns HTTP200 OK with a JSON body containing a single field.
A signed JWT Bearer token. Pass this value in the
Authorization: Bearer <token> header on every subsequent API request. Tokens are scoped to the authenticated user’s roles and authorities.Example request
Example response
Using the token
Include the token as a Bearer credential in theAuthorization header for every protected request:
EMPRESA_VER, DONACION_CREAR). A missing or expired token returns 401 Unauthorized; a valid token for an account that lacks the required authority returns 403 Forbidden.
Error responses
| HTTP Status | Condition |
|---|---|
401 Unauthorized | Credentials are incorrect or the account does not exist. |
400 Bad Request | Request body is missing or username / password fields are blank (@NotBlank validation failure). |