WARNING: Version 5.4 of the Elastic Stack has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Authenticate API
editAuthenticate API
editThe Authenticate API enables you to submit a request with a basic auth header to authenticate a user and retrieve information about the authenticated user. Returns a 401 status code if the user cannot be authenticated.
To authenticate a user, submit a GET request to the _xpack/security/_authenticate
endpoint:
GET _xpack/security/_authenticate
A successful call returns a JSON structure that shows what roles are assigned to the user as well as any assigned metadata.
{ "username": "rdeniro", "roles": [ "admin", "kibana4" ], "metadata" : { "employee_id": "8675309" } }