使用strophe的http-bind方式连接openfire时,会将bosh-service暴露在js文件中,同时用户登录的操作也是在前台页面完成的,用户名和密码也是暴露在js文件中的,这样子别人一看网站的源码就很容易连接到我们的openfire服务器。
openfire strophe有什么机制可以避免这种问题吗?或者是否有另外的做法?
使用bosh-service创建连接:
connection = new Strophe.Connection(BOSH_SERVICE);
用户登录:
connection.connect(username,pwd,onConnect);