Type Definitions
# checkAuthenticationCallback(token) → {boolean|Promise.<boolean>}
Function where you can validate the authenticationToken
Parameters:
Name | Type | Description |
---|---|---|
token |
* | User authenticationToken set on client side |
- Source:
Returns:
true means the token is valid
- Type
- boolean | Promise.<boolean>
# onClientClosedCallback(userIdentifier, groups)
Callback where to be notified when user close the connection
Parameters:
Name | Type | Description |
---|---|---|
userIdentifier |
string | Identifier of the user |
groups |
Array.<String> | List of groups in which the user was present |
- Source:
# onConnectionCallback(ws, token)
Callback where to receive new user connection
Parameters:
Name | Type | Description |
---|---|---|
ws |
WebSocket | Websocket client instance, useful if you want to add the user to a group |
token |
* | User authenticationToken set on client side |
- Source:
# onMessageCallbackClient(data)
Callback where to receive message specific to a channel
Parameters:
Name | Type | Description |
---|---|---|
data |
* | Data sent by server |
- Source:
# onMessageCallbackServer(message, ws)
Callback where to receive message specific to a channel
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
message |
Object |
Json object containing the message and the
authenticationToken
Properties
|
|||||||||
ws |
WebSocket | Websocket client instance, useful if you want to add the user to a group |
- Source: