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.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTU2ODkwNTM3MCwiaWF0IjoxNTY4OTAxNzQwLCJuYmYiOjE1Njg5MDE3NDB9.07my1r33iKhfUuR3XK87YomK00Fcio_Ve7ZXlaq0Jb0"
}
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.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTU2ODkwNTM3MCwiaWF0IjoxNTY4OTAxNzQwLCJuYmYiOjE1Njg5MDE3NDB9.07my1r33iKhfUuR3XK87YomK00Fcio_Ve7ZXlaq0Jb0' \
-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.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTU2ODkwNTM3MCwiaWF0IjoxNTY4OTAxNzQwLCJuYmYiOjE1Njg5MDE3NDB9.07my1r33iKhfUuR3XK87YomK00Fcio_Ve7ZXlaq0Jb0' \
-d $'{
"talk_name": "Go e Microserviços",
"score": "10"
}'