简体   繁体   中英

node.js and juggernaut pub/sub

I'm using express framework and juggernaut. I looked at 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);
  });

Is it secure? I don't think so, everybody can subscribe to a channel from javascript console. Is there a way to subscribe a channel from server side?

通过默默无闻使用安全性,使用随机通道名称(HMAC)。

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

It would be worth checking whether Juggernaut supports a similar extension/intercept model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM