fixed login link,request params,add json response

1. fix login link
2. added personal access token to request message
3. added a sample json response
This commit is contained in:
Raja Nadar 2016-01-22 17:38:32 -08:00
parent cd4811e630
commit 9b82736b9a

View file

@ -26,7 +26,38 @@ $ vault auth -method=github token=<api token>
#### Via the API
The endpoint for the GitHub login is `/login`.
The endpoint for the GitHub login is `auth/github/login`.
The `token` should be sent in the POST body encoded as JSON.
```shell
$ curl $VAULT_ADDR/v1/auth/github/login \
-d '{ "token": "your_github_personal_access_token" }'
```
The response will be in JSON. For example:
```javascript
{
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": null,
"warnings": null,
"auth": {
"client_token": "c4f280f6-fdb2-18eb-89d3-589e2e834cdb",
"policies": [
"root"
],
"metadata": {
"org": "test_org",
"username": "rajanadar",
},
"lease_duration": 0,
"renewable": false
}
}
```
## Configuration