ejabberd authentication script written in python using a JSON API