RequestContext #
Kuzzle execution context for the request.
Contains informations about identity (token, user) and origin (connection).
connection #
| Type | Description | get / set |
|---|---|---|
Connection | Information about the connection at the origin of the request. | get |
Connection properties #
| Name | Type | Description | get / set |
|---|---|---|---|
id | string | Unique identifier of the user connection | get |
protocol | string | Network protocol name | get |
ips | string[] | Chain of IP addresses, starting from the client | get |
misc | ContextMisc | Additional informations about the connection | get |
ContextMisc HTTP informations #
| Name | Type | Description | get / set |
|---|---|---|---|
path | string | HTTP path | get |
verb | string | HTTP verb | get |
headers | JSONObject | HTTP headers | get |
token #
| Type | Description | get / set |
|---|---|---|
KuzzleToken | Authentication token, or null if the request is not authenticated | get / set |
Token properties #
| Name | Type | Description | get / set |
|---|---|---|---|
_id | string | Unique ID | get |
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 ID | get |
jwt | string | JWT token | get |
refreshed | boolean | True if the token has been refreshed with the current request | get |
singleUse | boolean | True if the token can only be used once | get |
type | 'apiKey' | 'authToken' | apiKey for an API key, authToken otherwise | get |
The token does not hold the ID of the connection it is used on: use connection.id instead.
user #
| Type | Description | get / set |
|---|---|---|
KuzzleUser | Associated user, or null | get / set |
User properties #
The User class extends the JSONObject class and can contain other properties.
| Name | Type | Description | get / set |
|---|---|---|---|
_id | string | Unique ID | get |
profileIds | string[] | User profiles | get |