curl --request POST \
--url https://api.example.com/api/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'{
"200": {},
"400": {},
"401": {},
"token": "<string>",
"tipo": "<string>"
}Authenticate a user and receive a JWT token
curl --request POST \
--url https://api.example.com/api/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'{
"200": {},
"400": {},
"401": {},
"token": "<string>",
"tipo": "<string>"
}curl -X POST http://localhost:8080/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securePassword123"
}'
{
"email": "[email protected]",
"password": "securePassword123"
}
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tipo": "Bearer"
}
curl -X GET http://localhost:8080/api/resource \
-H "Authorization: Bearer YOUR_TOKEN_HERE"