XMPPFramework和OpenFire服务器,身份验证工作,连接挂起

时间:2012-07-26 11:11:22

标签: ios xmpp openfire xmppframework

我正在尝试使用适用于iOS的XMPPFramework连接到OpenFire服务器。 建立连接,完成身份验证(强制为普通),但在身份验证之后,会发送一个未响应的重新协商程序包。 我试图在StackOverflow,google和OpenFire支持上搜索,但找不到任何有用的东西。

我的XML转储(来自应用程序):

2012-07-26 13:07:26:745 iPhoneXMPP[1777:707] iPhoneXMPPAppDelegate: xmppStream:socketDidConnect:
2012-07-26 13:07:26:749 iPhoneXMPP[1777:1c03] SEND: <?xml version='1.0'?>
2012-07-26 13:07:26:750 iPhoneXMPP[1777:1c03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='xmpp.mobile-engineering.nl'>
2012-07-26 13:07:26:981 iPhoneXMPP[1777:1b03] RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="xmpp.mobile-engineering.nl" id="153cc75d" stream1:lang="en" version="1.0"/>
2012-07-26 13:07:27:107 iPhoneXMPP[1777:1c03] RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
2012-07-26 13:07:27:113 iPhoneXMPP[1777:707] iPhoneXMPPAppDelegate: xmppStreamDidConnect:
2012-07-26 13:07:27:116 iPhoneXMPP[1777:707] SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AGhvcHNhAGhvcHNh</auth>
2012-07-26 13:07:27:219 iPhoneXMPP[1777:1b03] RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
2012-07-26 13:07:27:220 iPhoneXMPP[1777:1b03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='xmpp.mobile-engineering.nl'>

最后一条消息是服务器的SEND,它有结束的位置。 当我问XMPPFramework状态是什么时,我得到:STATE_XMPP_OPENING

上面我得到的XML转储是验证成功。但下一步不是......

我在这里做错了什么?

1 个答案:

答案 0 :(得分:1)

您好我也看到同样的问题,我只是想连接到Jabber.org。我的didAuthenticate和我的didNotAuthenticate方法没有被调用。是否有我们没有设置的通知?

我的转储:

2012-07-27 00:24:22:013 cloud9learning[41017:1c03] RECV: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="jabber.org" id="d528010a9f1f6e27" version="1.0"/>
2012-07-27 00:24:22:014 cloud9learning[41017:1c03] RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>LOGIN</mechanism><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><ver xmlns="urn:xmpp:features:rosterver"><optional/></ver></stream:features>
2012-07-27 00:24:22:014 cloud9learning[41017:c07] JabberManager: xmppStreamDidConnect:
2012-07-27 00:24:24:750 cloud9learning[41017:c07] SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"/>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">bm9uY2U9IlBsRlh4eGVFa1hZdnRNYVdBdVdQT1F3a0VURjVDVnl6ZWxzODZZbkxmcFE9IixyZWFsbT0iamFiYmVyLm9yZyIscW9wPSJhdXRoIixtYXhidWY9MTYzODQsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
2012-07-27 00:24:24:841 cloud9learning[41017:4603] SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9ImNsb3VkOXRlc3QiLHJlYWxtPSJqYWJiZXIub3JnIixub25jZT0iUGxGWHh4ZUVrWFl2dE1hV0F1V1BPUXdrRVRGNUNWeXplbHM4NlluTGZwUT0iLGNub25jZT0iNzc1N0M5RUQtNjJGQy00M0VCLUIxOUYtNjlBREYzRkFBMTlFIixuYz0wMDAwMDAwMSxxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwL2phYmJlci5vcmciLHJlc3BvbnNlPTUxZmY3YTFhYzI1NzM5ZTIxOGQ2MmI0Njk1NjE0ZjcwLGNoYXJzZXQ9dXRmLTg=</response>
2012-07-27 00:24:24:932 cloud9learning[41017:6e03] RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD1lYzE4OTI1YTY0NTZlMzMwMDg3ZTZjZmE1ZmQzMjMzZQ==</success>
2012-07-27 00:24:24:932 cloud9learning[41017:6e03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='jabber.org'>