Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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, [
                           {["http-prebind"], http_prebind}


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.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.