The >
character that you see suggests a copy/paste error. You are probably pasting a newline in the middle of your curl command.
The token request you are passing to keystone is fine, however in most cases keystone will be running on port 5000, which you will need to specify in the URL (e.g. http://localhost:5000/v2.0/tokens
).
Here is an example of what you should get:
# curl -sd '{"auth":{"passwordCredentials":{"username": "admin", "password": "password"}}}' -H "Content-type: application/json" http://192.168.113.57:5000/v2.0/tokens | python -m json.tool
{
"access": {
"metadata": {
"is_admin": 0,
"roles": []
},
"serviceCatalog": [],
"token": {
"audit_ids": [
"Yk4h80jJTe6jiGKzXFge9Q"
],
"expires": "2016-08-08T03:06:40Z",
"id": "gAAAAABXp06AlKkt_fxEuDbjW19h4nvwC-7rgEr9Mw4abtc_uUGTm4HSGukUzRf5JYS8Q6J-fexDVLTtA7doaUzkvnLlLSFEfjW0e4IVq3V0rccvU9fLErNcNcWWJNx3pPM1fjBHEvGOlYvwEFmUUXhxl9VHKqO_DQ",
"issued_at": "2016-08-07T15:06:40.000000Z"
},
"user": {
"id": "732a8637a18b4e91ac9d8a95a8477e05",
"name": "admin",
"roles": [],
"roles_links": [],
"username": "admin"
}
}
}