URL=http://localhost:8080 TOKEN=$(curl -s -X POST --user 'api:secret' -d 'grant_type=password&username=netkiller@msn.com&password=123456' ${URL}/oauth/token | sed 's/.*"access_token":"\([^"]*\)".*/\1/g') curl -s -k -H "Accept: application/json" -H "Content-Type: ...