websocket-rails/websocket-rails — pull request #140 by moaa (2013-09-26 18:44:16+00:00)
Title: Channel tokens

Each channel will have a unique token to verify the authenticity of the events dispatched on the channel. This should help prevent unwanted events from being sent to the channel.

Upon successfully subscribing to the channel, an internal event `websocket_rails.channel_token` is sent to the client. This is saved in the metadata of the channel on the client side and sent along with every event triggered on the channel. If the tokens do not match, WebsocketRails will silently ignore the event.

References #111 due to the token being handled inside the metadata of the channel.