authentication - Authenticate against Drupal users database table from Django application -


i'm working with:

a) large drupal 7.23 application running @ https://sitename.com using mysql database thousands of users, around 30 of staff.

b) small django 1.3.7 application running @ http://dj.sitename.com using postgresql database few (only drupal app's staff) users, who need able login django app using existing drupal credentials.

the workflow this:

  1. staff users manually created identical usernames in each of applications.

  2. a staff user goes dj.sitename.com , inputs same username , password of account created @ sitename.com, , clicks submit. django checks username , password against users table in drupal mysql database , compares details in django users table. if match, user logged in.

  3. when staff user logged drupal app , visits django app @ dj.sitename.com, automatically logged in, , vice-versa.

  4. when staff user logs out django app, logged out drupal, too, , vice-versa.

  5. when user changes password in either drupal or django applications, automatically changed in both systems.

what simplest way accomplish this?

you can use services module expose drupal user login http service, can used custom django authentication backend. on successful login, service return drupal user object. object include roles of user, can use validate of user has access application.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -