在tutorial的帮助下,我使用Openfire和xmpp4r连接到服务器。这个教程对每个人都很好,除了我,它在网上抛出了错误
@client.auth(@password)错误是
Jabber::ClientAuthenticationFailure: not-authorized
from /home/haider/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/client.rb:120:in `rescue in auth'
from /home/haider/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/client.rb:109:in `auth'
from (irb):32
from /home/haider/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
from /home/haider/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
from /home/haider/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
from /home/haider/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!我在谷歌上发现了一个solution,它解决了类似的问题,在资源名称后附加了JID,但这也不适用于Openfire
任何帮助都将受到高度的感谢。谢谢
发布于 2016-01-20 02:18:20
请看我的回答:
https://github.com/xmpp4r/xmpp4r/issues/42
基本上,调用这个而不是普通的auth方法:
client.auth_sasl SASL.new(client, 'PLAIN'), password
至于为什么SASL + digest不适用于新版本的Openfire,我不太确定。
https://stackoverflow.com/questions/31562412
复制相似问题