shield: add rest API spec for authenticate api

Original commit: elastic/x-pack-elasticsearch@3dcfd5549b
This commit is contained in:
jaymode 2016-01-19 12:26:42 -05:00
parent 7c0641afdb
commit 471ee7d867
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,13 @@
{
"shield.authenticate": {
"documentation": "Retrieve details about the currently authenticated user",
"methods": [ "GET" ],
"url": {
"path": "/_shield/authenticate",
"paths": [ "/_shield/authenticate" ],
"parts": {},
"params": {}
},
"body": null
}
}

View File

@ -0,0 +1,11 @@
---
"Test authenticate api":
- do:
cluster.health:
wait_for_status: yellow
- do:
shield.authenticate: {}
- match: { username: "test_user" }
- match: { roles.0: "admin" }