求助:
使用asmack4.06+openfire3.93开发移动IM,遇到一个问题:登录的时候,如果正确输入用户名和密码,则可以正常登录到openfire服务;如果输入的用户名或密码错误,则会报错如下:
org.jivesoftware.smack.sasl.SASLErrorException: SASLError using PLAIN: not-authorized
//连接服务器的代码片段 config = new ConnectionConfiguration(Constants.HOST, Constants.PORT); config.setSecurityMode(SecurityMode.disabled); config.setDebuggerEnabled(true); SASLAuthentication.supportSASLMechanism("PLAIN",0); connection = new XMPPTCPConnection(config); connection.connect(); //登录的代码片段 ConServer.getConnection().login(username, password); ConServer.getConnection().sendPacket(new Presence(Presence.Type.available));
是否需要在openfire服务器上配置某些参数?
都告诉你了: 用户名或密码错误导致的认证失败######
2015.01.20 20:20:18 org.jivesoftware.openfire.net.SASLAuthentication - User Login Failed. PLAIN authentication failed for: ***
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。