Authenticate a user Added in 5.5.0
Authenticates a user and returns information about the authenticated user. Include the user information in a basic auth header. A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. If the user cannot be authenticated, this API returns a 401 status code.
GET /_security/_authenticate
curl \
-X GET http://api.example.com/_security/_authenticate
Response examples (200)
{
"api_key": {
"id": "string",
"name": "string"
},
"authentication_realm": {
"name": "string",
"type": "string"
},
"email": "string",
"full_name": "string",
"lookup_realm": {
"name": "string",
"type": "string"
},
"metadata": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"roles": [
"string"
],
"username": "string",
"enabled": true,
"authentication_type": "string",
"token": {
"name": "string",
"type": "string"
}
}