You are on page 1of 1

FSC-WebSocket-Chat

URL Websockets FSC service: ws://{fsc-server}:{fsc-port}/cable


Channel: TicketChannel
Param to join room: id (ticket's id)
jwt(user's jwt)

Query structure from client to connect to channel and join the room:

const msg = {
command: 'subscribe',
identifier: JSON.stringify({
id: {ticket_id},
jwt:{jwt}
channel: 'TicketChannel'
}),
};

Describe:

command "subcribe" : Determine client side wants to connect or disconnect


to channel.
id : Used to create channel's room corresponding to the
ticket's id. Also using for authentication when client
wants to join to the room.
jwt : That is a security measure, used to determine whether
the user of the system or not.

Authentication for connect to channel and join the room:

No login information => Reject


Ticket's ID does not exist => Reject
Ticket did not create by current user => Reject
Satisfy the above 3 conditions => Accept

You might also like