【问题标题】:XMPPFramework and Openfire sever, authentication successful ,but not call backXMPPFramework 和 Openfire 服务器,认证成功,但没有回调
【发布时间】:2012-07-30 06:51:40
【问题描述】:

连接opefire服务器ok,然后进行认证:

- (void)xmppStreamDidConnect:(XMPPStream *)sender{
    NSLog(@"connected --->YES");
    isOpen = YES;
    NSError *error = nil;
    [xmppStream authenticateWithPassword:@"password" error:&error];
}

Openfire 日志显示:

2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Launching thread for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Launching thread for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Launching thread for /121.0.29.220:60789
2012.08.01 19:13:35 org.jivesoftware.util.log.util.CommonsLogFactory - 000065 (01/05/00) - Connection #5 tested: OK
2012.08.01 19:13:35 org.jivesoftware.util.log.util.CommonsLogFactory - 000066 (01/05/00) - Connection #5 tested: OK
2012.08.01 19:13:35 org.jivesoftware.openfire.auth.AuthorizationManager - AuthorizationManager: Trying Default Mapping.map(shitiven)
2012.08.01 19:13:35 org.jivesoftware.openfire.auth.DefaultAuthorizationMapping - DefaultAuthorizationMapping: No realm found
2012.08.01 19:13:35 org.jivesoftware.openfire.auth.AuthorizationManager - AuthorizationManager: Trying Default Policy.authorize(shitiven , shitiven)
2012.08.01 19:13:35 org.jivesoftware.openfire.auth.DefaultAuthorizationPolicy - DefaultAuthorizationPolicy: Checking authenID realm
2012.08.01 19:13:35 org.jivesoftware.util.log.util.CommonsLogFactory - 000066 (01/05/00) - Connection #2 tested: OK
2012.08.01 19:13:35 org.jivesoftware.util.log.util.CommonsLogFactory - 000067 (01/05/00) - Connection #2 tested: OK
2012.08.01 19:13:35 org.jivesoftware.util.log.util.CommonsLogFactory - 000067 (01/05/00) - Connection #1 tested: OK
2012.08.01 19:13:35 org.jivesoftware.util.log.util.CommonsLogFactory - 000068 (01/05/00) - Connection #1 tested: OK
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Launching thread for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Launching thread for /121.0.29.220:60789
2012.08.01 19:13:35 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /121.0.29.220:60789

但是委托方法“xmppStreamDidAuthenticate”没有调用:

- (void)xmppStreamDidAuthenticate:(XMPPStream *)sender{
     NSLog(@"login success!!"); 
     [self goOnline];
}

当我输入错误的用户名或密码时,委托方法“didNotAuthenticate”调用:

- (void)xmppStream:(XMPPStream *)sender didNotAuthenticate:(NSXMLElement *)error{
    NSLog(@"authenticate fail %@",error); //console to the debug pannel
}

谁能帮帮我?

【问题讨论】:

    标签: objective-c openfire xmppframework


    【解决方案1】:

    我怀疑您被此处描述的问题困扰:https://github.com/robbiehanson/XMPPFramework/issues/81

    您必须更新 xmppframework 才能解决此问题。

    【讨论】:

      猜你喜欢
      • 2011-12-31
      • 1970-01-01
      • 2012-04-24
      • 1970-01-01
      • 2012-01-01
      • 2011-11-03
      • 2012-07-08
      • 2015-01-01
      相关资源
      最近更新 更多