robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

XMPPFramework can't authentication with openfire #92

Open fackweb opened 12 years ago

fackweb commented 12 years ago

I use XMPPFramework can authenticated with the gtalk, and other IM (iChat, Adium) also can authenticated wtih the openfire server .

When I use XMPPFramework to authentication with the openfire server, the log show connected ok , and authenticate success.

But next the delegate method "xmppStreamDidAuthenticate" did nothing.

Then I use wrong password to authenticate, the delegate method "didNotAuthenticate" was called.

Logs:

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
fackweb commented 12 years ago

I run Xcode/DesktopXMPP/XMPPStream.xcodeproj , and above the same problem!

client logs:

2012-08-02 16:52:57:531 XMPPStream[22455:403] RosterController: awakeFromNib

2012-08-02 16:52:57:633 XMPPStream[22455:403] AppDelegate: applicationDidFinishLaunching:

2012-08-02 16:53:07:422 XMPPStream[22455:1b03] SEND: <?xml version='1.0'?>

2012-08-02 16:53:07:423 XMPPStream[22455:1b03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='lives.im'>

2012-08-02 16:53:07:427 XMPPStream[22455:1b03] RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="lives.im" id="fbed4496" stream:lang="en" version="1.0"/>

2012-08-02 16:53:07:428 XMPPStream[22455:2303] RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</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"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>

2012-08-02 16:53:07:428 XMPPStream[22455:403] RosterController: xmppStreamDidConnect:

2012-08-02 16:53:07:428 XMPPStream[22455:403] SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"/>

2012-08-02 16:53:07:431 XMPPStream[22455:1b03] RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImxpdmVzLmltIixub25jZT0ieUdYbWxjNlhhSklpWS9qcTZML2RMK2dWZVZkbWtDa0R2Vy9KbVZEbSIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>

2012-08-02 16:53:07:432 XMPPStream[22455:1b03] SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9InNoaXRpdmVuIixyZWFsbT0ibGl2ZXMuaW0iLG5vbmNlPSJ5R1htbGM2WGFKSWlZL2pxNkwvZEwrZ1ZlVmRta0NrRHZXL0ptVkRtIixjbm9uY2U9IjRFMjYyOURCLTA5RDUtNDhDNy04QzY2LTY4QThFQkFCQzVDNSIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9saXZlcy5pbSIscmVzcG9uc2U9ZDk0ZmZjODQ4NDgwZWU1NWU0N2RmOGE5MjE2M2IwYmYsY2hhcnNldD11dGYtOA==</response>

2012-08-02 16:53:07:447 XMPPStream[22455:1b03] RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD03ODFhNTJkYzgxYTI4YTkyYWQwNzA1ZjE2NmJlZTMyYg==</success>

2012-08-02 16:53:07:447 XMPPStream[22455:1b03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='lives.im'>
fackweb commented 12 years ago

I found this project "https://github.com/huangzongwu/mChat" to test my server , and It's ok.....

kunjanshah commented 10 years ago

@fackweb Did you have any luck solving this issue?

borrull commented 9 years ago

I am facing the same problem. MD5-DIGEST is wrongly implemented on XMPPFramework. I will open a pull request to fix it.

xiaofange commented 7 years ago

If you change the password, you must update the salt field of the ofUser table to the latest password for SCRAM-SHA-1 encryption.