README

January 15, 2012 ยท View on GitHub

mod_http_pre_bind for ejabberd.

When using anonymous users the authentication process through BOSH can take a second or two. These seconds can be saved by doing all of the authentication and bosh session setup on one call. mod_http_pre_bind does this and returns a jid, sid, and rid of a valid BOSH session.

It requires mod_http_bind. Modifications are needed to src/web/ejabberd_http_bind.erl. The start, http_get, http_put, handle_session_start, and prepare_response functions need to be made public in the module code. This prebind module simply calls those functions to initiate and handle a session.

To build run the build.sh script and install the resulting beam files in your ejabberd ebin directory.

Install both in ejabberd.cfg.

{5288, ejabberd_http, [ http_bind, web_admin, {request_handlers, [{["http-pre-bind"], mod_http_pre_bind}]} ]}

%% %% Modules enabled in all ejabberd virtual hosts. %% {modules, [ {mod_http_bind, []}, {mod_http_pre_bind, []},

Example post and response:

POST

Response:

22720631691260831658412599@example.com/37436661951260831658614586