On 3 July 2012 18:15, Barnettech <
barne...@gmail.com> wrote:
> ok so regarding prosody authentication:
>
> To get my stuff working with the metajack server I did this:
>
> (this is PHP code)
> $thepw = base64_encode($jid . chr(0) . $username . chr(0) . $password);
> and then sent the xml stanza as:
> $xmlposts[] = '<body rid="' . $_jabber_rid_ . '"
> xmlns="
http://jabber.org/protocol/httpbind" sid="' . $_jabber_sid_ .
> '"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">' .
> $thepw . '</auth></body>';
In general you should leave the authzid empty, so the base64_encode
line should be:
$thepw = base64_encode(chr(0) . $username . chr(0) . $password);
I don't know if this is your problem, however.
That page lists the authentication backends that Prosody supports, and
is largely unrelated to the protocol you use to authenticate (all of
them support PLAIN, which you are using).
> Do I need to change the authentication from the default of internal_plain?
No, as long as you have created the user account (
http://prosody.im/doc/creating_accounts ) then it doesn't matter what
authentication backend you use.
> And will Prosody accept the base64_encode?
Yes, though try the change to it that I suggested above.
> Maybe I'm just not authenticating then?
I can't tell - there was no authentication in the logs you pasted in
your previous email.
One further possibility is that Prosody is denying your use of PLAIN
because your connection is unencrypted. This is a sensible security
measure recommended by the XMPP specifications. Make sure your
connection is encrypted, or disable this check with *either* of these
config options:
allow_unencrypted_plain_auth = true -- Allow PLAIN on all
unencrypted connections
-- Or...
consider_bosh_secure = true -- Pretend that BOSH sessions are
encrypted (useful behind an SSL-terminating reverse proxy)
Regards,
Matthew