python - how to authenticate users with django ejabberd bridge -


i trying integrate ejabberd django authentication. following instructions on: https://github.com/ffalcinelli/django-ejabberd-bridge

i have followed every step.

i have defined path of script authentication

{auth_method, external}. {extauth_program, "script.sh"}. ( have defined full path here ) 

script file's content :

#!/bin/bash source <path>/env/bin/activate python <path>/manage.py ejabberd_auth $@ 

my problem want ejjaberd maintain state of every user ( online , offline , away etc ). think whenever user login ( or logout ), data needs sent ejjaberd server. tried login , logout, these users not registering @ ejabberd ( localhost:5280/admin )

i have tried command console :

python manage.py ejabberd_auth $@ 

it should ask me username , password. in log file there 1 log :

2015-08-03 08:11:05,791 [debug] ejabberd_bridge.management.commands.ejabberd_auth: starting serving authentication requests ejabberd 

how can send user data ejabberd?

you expecting feature authentication module.

django-ejabberd-bridge purpose let ejabberd check authentication against django authentication middleware, described in project readme:

right allows ejabberd service perform authentication against django's authentication middleware.

this has nothing changing presence example. bridge use in worklow:

  1. a user want log in ejabberd using xmpp client
  2. ejabberd use external auth, script django bridge check if user , credentials valid.
  3. ejabberd use result of script either accept or reject user authentication request.

that's it. presence , user state still managed usual xmpp. while xmpp session open, user seen online. when xmpp client disconnect, user seen offline ejabberd, etc.

the user database not duplicated. kept in backend service. that's reason why user cannot listed web interface: ejabberd not handle them.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -