Thx Guys,

But I made this and did not work:

auth_info := StrTobase64(chr(0)+'[EMAIL PROTECTED]'+chr(0)+'mypassword');

send('<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN"/>'+auth_info+'</auth>');

Well, the server continues answering with:

<failure  xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<incorrect-encoding/>
</failure>
</stream:stream>


Alexandre
Brazil


----- Original Message ----- From: "Norman Rasmussen" <[EMAIL PROTECTED]>
To: "Jabber software development list" <jdev@jabber.org>
Sent: Wednesday, November 15, 2006 4:27 PM
Subject: Re: [jdev] Incorrect Encoding


On 11/15/06, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
My guess this is a bug on Google's end.  I wonder if any of the google
guys would be able to confirm this.

woops, my bad.  I thought Google's servers were totally wrong, turns
out they just _require_ the SASL auth data when the auth mech is
picked.

On 11/15/06, Matthias Wimmer <[EMAIL PROTECTED]> wrote:
It means that the <auth/> element should contain a zero byte, followed
by your username, followed by a zero byte, and your password. This data
should be BASE64-encoded.

How this works is not part of the XMPP standard, but part of the
definition of the SASL PLAIN mechanism.

eg: try:

<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl"
mechanism="PLAIN">AHJvYgBzZWNyZXQ=</auth>

where AHJvYgBzZWNyZXQ= is base64 (\0rob\0secret\)

i.e. use base64(\0<username>\0<password>)  The first \0 is important!

--
- Norman Rasmussen
- Email: [EMAIL PROTECTED]
- Home page: http://norman.rasmussen.co.za/


        

        
                
_______________________________________________________ VocĂȘ quer respostas para suas perguntas? Ou vocĂȘ sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/

Reply via email to