Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, 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/' 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

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.