cURL
curl --request GET \ --url https://api.example.com/secured/getUsers
{ "status": 123, "usuarios": [ { "id": 123, "tipoUsuario": "<string>", "correo": "<string>", "nombre": "<string>", "apellido": "<string>", "password": "<string>" } ], "401 Unauthorized": {} }
Retrieve all users from the system
Authorization
Show User Object
curl --location 'http://localhost:8080/secured/getUsers' \ --header 'Authorization: YOUR_JWT_TOKEN'
{ "status": 200, "usuarios": [ { "id": 1, "tipoUsuario": "admin", "correo": "[email protected]", "nombre": "Juan", "apellido": "Pérez", "password": "$2b$10$..." }, { "id": 2, "tipoUsuario": "user", "correo": "[email protected]", "nombre": "María", "apellido": "González", "password": "$2b$10$..." } ] }
{ "msg": "Token_invalido" }
{ "msg": "Sin autorización" }