Global

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
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

# 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

# onMessageCallbackClient(data)

Callback where to receive message specific to a channel
Parameters:
Name Type Description
data * Data sent by server

# 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
Name Type Description
authenticationToken * The authenticationToken set on client side
data * Data sent by client
ws WebSocket Websocket client instance, useful if you want to add the user to a group