Simple question:
Why does the following code work... (it returns the access token just fine)
curl --data "grant_type=client_credentials&client_id=synchronization_tool&client_secret=8f6a6e73-66ca-4f8f-1234-ab909147f1cf" http://localhost:8080/auth/realms/master/protocol/openid-connect/token
And this one doesn't?
curl -d '{"grant_type":"client_credentials","client_secret":"8f6a6e73-66ca-4f8f-1234-ab909147f1cf","client_id":"synchronization_tool"}' http://localhost:8080/auth/realms/master/protocol/openid-connect/token -H "Content-Type: application/json"
It gives gives me:
"error":"invalid_request","error_description":"Missing form parameter: grant_type"}
Aren't they supposed to be two completely analogous requests?