curl -X POST http://localhost:8080/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "adminsystem@ums.com",
"password": "Admin1234"
}'
{
"id": 1,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbi11c2VyIiwicm9sZSI6IlJPTEVfQURNSU4iLCJpYXQiOjE3MDk0NzIwMDAsImV4cCI6MTcwOTQ3NTYwMH0.abc123def456",
"username": "admin-user",
"email": "adminsystem@ums.com"
}
Authentication
Login
Authenticate a user and receive a JWT token
POST
/
auth
/
login
curl -X POST http://localhost:8080/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "adminsystem@ums.com",
"password": "Admin1234"
}'
{
"id": 1,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbi11c2VyIiwicm9sZSI6IlJPTEVfQURNSU4iLCJpYXQiOjE3MDk0NzIwMDAsImV4cCI6MTcwOTQ3NTYwMH0.abc123def456",
"username": "admin-user",
"email": "adminsystem@ums.com"
}
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSotoSegovia/apiREST-userManagementSystem/llms.txt
Use this file to discover all available pages before exploring further.
Request Body
Email address of the user account
Password for the user account
Response
Unique identifier of the authenticated user
JWT authentication token to be used for subsequent authenticated requests
Username of the authenticated user
Email address of the authenticated user
curl -X POST http://localhost:8080/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "adminsystem@ums.com",
"password": "Admin1234"
}'
{
"id": 1,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbi11c2VyIiwicm9sZSI6IlJPTEVfQURNSU4iLCJpYXQiOjE3MDk0NzIwMDAsImV4cCI6MTcwOTQ3NTYwMH0.abc123def456",
"username": "admin-user",
"email": "adminsystem@ums.com"
}
Error Responses
Authentication Failed (400 Bad Request)
Returned when the email or password is incorrect:{
"timestamp": "2026-03-03T10:30:00.000+00:00",
"status": 400,
"error": "Bad Request",
"message": "Email o ContraseƱa incorrecto",
"path": "/auth/login"
}
- The email address is not found in the system
- The password does not match the stored password for the given email
Using the JWT Token
After successful authentication, include the returned JWT token in theAuthorization header for subsequent requests:
curl -X GET http://localhost:8080/api/protected-endpoint \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
āI