Closed sunil-zalavadiya closed 9 years ago
Strange, what authentication methods does the server support?
They should be returned by the server, so they would be visible in the console.
I don't know what to do? Should I have to make any settings on openfire?
I guess so,
Do you see any mechanisms returned by the server in a <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
tag
Can you please explain where I can find mechanisms returned by server?
In Xcode's Console, by default the entire XML Exchange with the server is outputted to the console.
I have traced and received following response :
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ws.test.my" id="85c8844a" stream1:lang="en" version="1.0"><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>EXTERNAL</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></stream:stream>
So currently it is only advertising support for EXTERNAL
, which isn't a supported Authentication Mechanism by the XMPPFramework (and is a bit of a strange one, first time I have seen it TBH).
I am guessing there is a setting on Openfire (as lots of people use it) to allow different authentication mechanisms.
Delete this sasl.mechs
from System Properties in openfire
Yeh, It's done. Now it's working. :)
Glad you got it working :)
Hi, how do I trace the response for the entire XML Exchange with the server? I have the same problem "No suitable authentication method found'. Thanks a lot.
My program shows socket connected in "socketDidConnect" method. Thanks.
One more thing, xmppStream method "connectWithTimeout:error:" always return YES even server address is set to wrong, and I have to use the method "isConnected" to check if it is connected.
That's expected, connectWithTimeout:error: returns YES if the stream will attempt to connect i.e. It's is correctly configured. You need to implement the various XMPPStream delegate methods to be informed about when the stream authenticates.
If as you said, there is no need to check "if(![self.xmppStream connectWithTimeout:XMPPStreamTimeoutNone error:&error]), and the UIAlertView will never be shown, in the "connect" method in the github standard example, how to explain this, the example is wrong?
Thanks a lot.
Hi, would you please also tell me how do I trace the response for the entire XML Exchange with the server? I have the same problem "No suitable authentication method found'. Thanks a lot.
Hey I just wanted to add that I had the same problem: "No suitable authentication method found" using Prosody as the XMPP server.
What solved the problem for me was forcing TLS to use the server's certificate:
self.xmppStream.startTLSPolicy = .required
I have tried to authenticate on secured openfire server from iOS using XMPP. It's connected successfully, but it did not get authenticate and i have received following error :
Error Domain=XMPPStreamErrorDomain Code=4 "No suitable authentication method found" UserInfo=0x79726370 {NSLocalizedDescription=No suitable authentication method found}
Is there any solution for it?