docker compose up -d --build
curl -X "POST" "http://localhost:8080/v1/auth" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d $'{
"email": "eminetto@email.com",
"password": "12345"
}'
The result should be a token, like:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGVtYWlsLmNvbSIsImV4cCI6MTcwOTU5NzAzNiwiaWF0IjoxNzA5NTkzNDA2LCJuYmYiOjE3MDk1OTM0MDZ9.q_xpHaAXunTHTTAiSyjh8I0kTqVfRyXA4eskV0fsl28"
}
You need to use the token generated by the Auth
service:
curl -X "POST" "http://localhost:8080/v1/feedback" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGVtYWlsLmNvbSIsImV4cCI6MTcwOTU5NzAzNiwiaWF0IjoxNzA5NTkzNDA2LCJuYmYiOjE3MDk1OTM0MDZ9.q_xpHaAXunTHTTAiSyjh8I0kTqVfRyXA4eskV0fsl28' \
-d $'{
"title": "Feedback test",
"body": "Feedback body"
}'
You need to use the token generated by the Auth
service:
curl -X "POST" "http://localhost:8080/v1/vote" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGVtYWlsLmNvbSIsImV4cCI6MTcwOTU5NzAzNiwiaWF0IjoxNzA5NTkzNDA2LCJuYmYiOjE3MDk1OTM0MDZ9.q_xpHaAXunTHTTAiSyjh8I0kTqVfRyXA4eskV0fsl28' \
-d $'{
"talk_name": "Go e Microserviços",
"score": "10"
}'