getCurrentUser #
Returns information about the currently logged in user.
Query Syntax #
HTTP #
Available since 2.4.0
URL: http://kuzzle:7512/_me
Method: GET
Headers: Authorization: "Bearer <authentication token>"
Deprecated since 2.4.0
URL: http://kuzzle:7512/users/_me
Method: GET
Headers: Authorization: "Bearer <authentication token>"
Other protocols #
{
"controller": "auth",
"action": "getCurrentUser",
"jwt": "<authentication token>"
}
Arguments #
jwt
: valid authentication token (for the HTTP protocol, the token is to be passed to theAuthorization
header instead)
Response #
The result contains the following properties:
_id
: current user's kuid_source
: user informationprofileIds
: list of profile names associated to the user- any other properties: additional (and optional) user information
strategies
: available authentication strategies for that user
{
"status": 200,
"error": null,
"controller": "auth",
"action": "getCurrentUser",
"requestId": "<unique request identifier>",
"result": {
"_id": "<kuid>",
"_source": {
"profileIds": ["customProfile1", "customProfile2"],
"name": {
"first": "Steve",
"last": "Wozniak"
}
},
"strategies": ["local"]
}
}
Edit this page on Github(opens new window)