I'm trying to implement zerok authentication for my client.  I use the method described in the document (http://docs.jabber.org/draft-proto/html/zerok.html) but it doesn't work. I checked the the XML files in the spool folder on the Jabber server and the hash provided there doesn't match. Can anyone tell me what I'm doing wrong.
 
Here are the streams:
 
SENT ------------------
<stream:stream to='SERVER_NAME' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 
RECEIVED -------------------
<?xml version='1.0'?>
<stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='3C1F24FC' xmlns='jabber:client' from='SERVER_NAME'>
 
SENT ------------------
<iq id='100001' type='get'>
<query xmlns='jabber:iq:auth'>
<username>USER_NAME</username>
</query>
</iq>
 
RECEIVED -------------------
<iq id='100001' type='result'>
<query xmlns='jabber:iq:auth'>
<username>USER_NAME</username>
<digest/>
<sequence>499</sequence>
<token>3C1F1A61</token>
<resource/>
</query>
</iq>
 
SENT ------------------
<iq id='100002' type='set'>
<query xmlns='jabber:iq:auth'>
<username>USER_NAME</username>
<hash>HASH_CODE</hash>
<resource>Work</resource>
</query>
</iq>
 
RECEIVED -------------------
<iq id='100002' type='error'>
<query xmlns='jabber:iq:auth'>
<username>USER_NAME</username>
<hash>HASH_CODE</hash>
<resource>Work</resource>
</query>
<error code='401'>Unauthorized</error>
</iq>

Reply via email to