A working service for editing, querying, login and authentication of users. publishes events to kafka
This commit is contained in:
26
READMES/curl_commands.help
Normal file
26
READMES/curl_commands.help
Normal file
@@ -0,0 +1,26 @@
|
||||
# DEMO USERS
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"pino\", \"email\": \"pino@gmail.com\", \"password\": \"aaa\", \"type\": \"CUSTOMER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"babi\", \"email\": \"babi@gmail.com\", \"password\": \"bbb\", \"type\": \"CUSTOMER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"chris\", \"email\": \"chris@gmail.com\", \"password\": \"ccc\", \"type\": \"CUSTOMER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"dani\", \"email\": \"dani@gmail.com\", \"password\": \"ddd\", \"type\": \"CUSTOMER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"eric\", \"email\": \"eric@gmail.com\", \"password\": \"eee\", \"type\": \"CUSTOMER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"alberto\", \"email\": \"alberto@gmail.com\", \"password\": \"ffff6\", \"type\": \"SELLER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"escoshop\", \"email\": \"escoshop@legalmail.com\", \"password\": \"gggg7\", \"type\": \"SELLER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"SoundGarden\", \"email\": \"commercial@soundgarden.com\", \"password\": \"hhhh8\", \"type\": \"SELLER\" }" http://localhost:8101/users
|
||||
curl -X POST -H "Content-Type:application/json" -d "{ \"username\": \"tombolino\", \"email\": \"tombolino@administration.com\", \"password\": \"iiii9\", \"type\": \"ADMINISTRATOR\" }" http://localhost:8101/users
|
||||
|
||||
|
||||
# AUTH DEMO
|
||||
|
||||
# autentication part 1 ( login-like, get token )
|
||||
curl -X PUT -H "Authorization: Basic $( printf 'alberto@gmail.com:ffff6' | base64 )" http://localhost:8101/users
|
||||
|
||||
# autentication part 1 ( login-like, get token )
|
||||
curl -X PUT -H "Authorization: Basic $( printf 'tombolino@administration.com:iiii9' | base64 )" http://localhost:8101/users
|
||||
|
||||
# the returned token
|
||||
eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDT01FIERJQU1JTkUgQ0hJQU1PIEJVRlVTIElERU5USVRJRVM_Iiwic3ViIjoibnVsbCIsInR5cGUiOiJBRE1JTklTVFJBVE9SIiwiZW1haWwiOiJ0b21ib2xpbm9AYWRtaW5pc3RyYXRpb24uY29tIiwiaWF0IjoxNzY0MDg3NzMwLCJuYmYiOjE3NjQwODc3MzAsImV4cCI6MTc2NDA5MTMzMH0.Z6MB8YNNaBtWTYnqbOFcVNErOjJFyRun7r1efpkDBg0
|
||||
|
||||
|
||||
# autentication part 2 ( use token )
|
||||
curl -X GET -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDT01FIERJQU1JTkUgQ0hJQU1PIEJVRlVTIElERU5USVRJRVM_Iiwic3ViIjoibnVsbCIsInR5cGUiOiJBRE1JTklTVFJBVE9SIiwiZW1haWwiOiJ0b21ib2xpbm9AYWRtaW5pc3RyYXRpb24uY29tIiwiaWF0IjoxNzY0MDg3NzMwLCJuYmYiOjE3NjQwODc3MzAsImV4cCI6MTc2NDA5MTMzMH0.Z6MB8YNNaBtWTYnqbOFcVNErOjJFyRun7r1efpkDBg0" http://localhost:8101/users
|
||||
Reference in New Issue
Block a user