Search + K

Command Palette

Search for a command to run...

Sign In

Authenticate a user

GET /_security/_authenticate
Copy endpoint

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.

Responses

200 application/json
{
api_key?: SecurityAuthenticateAuthenticateApiKey
interface SecurityAuthenticateAuthenticateApiKey {
id: TypesId;
name?: TypesName;
managed_by: SecurityTypesApiKeyManagedBy;
internal?: boolean;
}
;
authentication_realm: SecurityTypesRealmInfo
interface SecurityTypesRealmInfo {
name: TypesName;
type: string;
}
;
email?: string | null;
full_name?: TypesName
type TypesName = string
| string | null
;
lookup_realm: SecurityTypesRealmInfo
interface SecurityTypesRealmInfo {
name: TypesName;
type: string;
}
;
metadata: TypesMetadata
interface TypesMetadata {
[key: string]: {};
}
;
roles: string[];
username: TypesUsername
type TypesUsername = string
;
enabled: boolean;
authentication_type: string;
token?: SecurityAuthenticateToken
interface SecurityAuthenticateToken {
name: TypesName;
type?: string;
}
;
}