RequestContext #

Kuzzle execution context for the request.

Contains informations about identity (token, user) and origin (connection).

connection #

TypeDescriptionget / set
Connection
Information about the connection at the origin of the request.get

Connection properties #

NameTypeDescriptionget / set
id
string
Unique identifier of the user connectionget
protocol
string
Network protocol nameget
ips
string[]
Chain of IP addresses, starting from the clientget
misc
ContextMisc
Additional informations about the connectionget

ContextMisc HTTP informations #

NameTypeDescriptionget / set
path
string
HTTP pathget
verb
string
HTTP verbget
headers
JSONObject
HTTP headersget

token #

TypeDescriptionget / set
KuzzleToken
Authentication token, or null if the request is not authenticatedget / set

Token properties #

NameTypeDescriptionget / set
_id
string
Unique IDget
expiresAt
number
Expiration date, in milliseconds since Epoch (-1 if the token never expires)get
ttl
number
Time-to-live, in milliseconds (-1 if the token never expires)get
userId
string
Associated user IDget
jwt
string
JWT tokenget
refreshed
boolean
True if the token has been refreshed with the current requestget
singleUse
boolean
True if the token can only be used onceget
type
'apiKey' | 'authToken'
apiKey for an API key, authToken otherwiseget

The token does not hold the ID of the connection it is used on: use connection.id instead.

user #

TypeDescriptionget / set
KuzzleUser
Associated user, or nullget / set

User properties #

The User class extends the JSONObject class and can contain other properties.

NameTypeDescriptionget / set
_id
string
Unique IDget
profileIds
string[]
User profilesget