make
curl -X "POST" "http://localhost:8081/v1/auth" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d $'{
"email": "[email protected]",
"password": "1234567"
}'
The result should be a token, like:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTYyOTU3NDcyOCwiaWF0IjoxNjI5NTcxMDk4LCJuYmYiOjE2Mjk1NzEwOTh9.utv_dd0oplgKG-NSwzUN6iOq4p4JDCHrwjNl1k-Yq9w"
}
You need to use the token generated by the Auth
service:
curl -X "POST" "http://localhost:8082/v1/feedback" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTYyOTU3NDcyOCwiaWF0IjoxNjI5NTcxMDk4LCJuYmYiOjE2Mjk1NzEwOTh9.utv_dd0oplgKG-NSwzUN6iOq4p4JDCHrwjNl1k-Yq9w' \
-d $'{
"title": "Feedback test",
"body": "Feedback body"
}'
You need to use the token generated by the Auth
service:
curl -X "POST" "http://localhost:8083/v1/vote" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTYyOTU3NDcyOCwiaWF0IjoxNjI5NTcxMDk4LCJuYmYiOjE2Mjk1NzEwOTh9.utv_dd0oplgKG-NSwzUN6iOq4p4JDCHrwjNl1k-Yq9w' \
-d $'{
"talk_name": "Go e Microserviços",
"score": "10"
}'