2015-01-20 09:38
浏览 1623

asmack4.06:SASLError using PLAIN: not-authorized

SASLError using PLAIN: not-authorized

求助:
使用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服务器上配置某些参数?

图片说明

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 用PLC设计纸袋糊底机送料系统
    • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
    • ¥15 用C语言输入方程怎么
    • ¥15 网站显示不安全连接问题
    • ¥15 github训练的模型参数无法下载
    • ¥15 51单片机显示器问题
    • ¥20 关于#qt#的问题:Qt代码的移植问题
    • ¥50 求图像处理的matlab方案
    • ¥50 winform中使用edge的Kiosk模式
    • ¥15 关于#python#的问题:功能监听网页