Code for authenticating XMPP users against a django app database