5

I'm trying to get the prebind of BOSH sessions to work.

I want to be able to authenticate a user in my CMS and then log him in when he accesses the chat, for this I found https://github.com/smokeclouds/http_prebind, it all works find and I was able to compile it with the following steps:

rake configure
sed -i 's/AUTH_USER/a_user/g' src/http_prebind.erl
sed -i 's/AUTH_PASSWORD/a_password/g' src/http_prebind.erl
sed -i 's/EJABBERD_DOMAIN/jabber.my.tld/g' src/http_prebind.erl
rake build
rake install

And then adding the http request bindings to the configuration:

  {5280, ejabberd_http, [
                         {request_handlers,
                          [
                           {["http-prebind"], http_prebind}
                          ]},
                         %%captcha,
                         http_bind,
                         http_poll,
                         http_prebind,
                         web_admin
                        ]}

 ]}.

As far as I understand it I should now be able to simply request a new session like this:

curl -u a_user:a_password http://jabber.my.tld:5280/http-prebind/some_user

But no matter what I always get Unauthorized as response.

Any idea about this one?

PS: I also tried Mod-Http-Pre-Bind, but as it does not require a password I would prefer to use http_prebind.

PPS: Does the user with username AUTH_USER and password AUTH_PASSWORD actually have to exist? I'm currently using an admin account.

womble
  • 95,029
  • 29
  • 173
  • 228
cdecker
  • 431
  • 2
  • 5
  • 17

0 Answers0