[英]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):
我看了很多关于juggernaut的例子,所有使用这种方法的例子(客户端):
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.
我不这么认为,每个人都可以从javascript控制台订阅一个频道。 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. 我不知道Juggernaut是如何工作的,但我知道Faye支持可以包含身份验证的扩展,因此订阅操作需要有效的令牌。 See: http://faye.jcoglan.com/node.html
请参阅: http : //faye.jcoglan.com/node.html
It would be worth checking whether Juggernaut supports a similar extension/intercept model. 值得一提的是,Juggernaut是否支持类似的扩展/拦截模型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.