Node.js and juggernaut pub / sub

I am using express framework and juggernaut. I looked through many examples about juggernaut, all examples using this method (client side):

var jug = new Juggernaut; jug.subscribe("channel_name", function(data){ console.log("Got data: " + data); }); 

It is safe? I don’t think that anyone can subscribe to a channel from the javascript console. Is there a way to subscribe to the channel from the server side?

+4
source share
2 answers

Use protection through the unknown, use an arbitrary channel name (HMAC).

+1
source

I don't know how Juggernaut works, but I know that Faye supports extensions that can include authentication, so a valid token is required for subscription operations. See: http://faye.jcoglan.com/node.html

It would be worth checking if Juggernaut supports a similar extension / interception model.

0
source

Source: https://habr.com/ru/post/1334835/


All Articles