shield: add rest API spec for authenticate api
Original commit: elastic/x-pack-elasticsearch@3dcfd5549b
This commit is contained in:
parent
7c0641afdb
commit
471ee7d867
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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" }
|
Loading…
Reference in New Issue