ox-it/django-webauth — pull request #9 by alexsdutton (2013-03-23 17:28:55+00:00)
Title: Decouple

Attempt to resolve #8.

I've created a single Webauth auth backend, and the LDAP/CUD specific things are now in `django_webauth.sources`.

Webauth-related settings are in `django_webauth.conf`, and there's a `WEBAUTH_USER_SOURCE` setting pointing at a module with a `provision_user_details` method. This is called whenever a Webauth-linked user logs in (via the `user_logged_in` signal), so details are always syched, regardless of login method.

I've removed the requirement that local usernames must match Webauth usernames, and there's now a model to capture the mapping between users and their Webauth usernames. For backwards compatibility, by default it will adopt `User`s whose usernames match.

CUD stuff probably still won't work, but at least it no longer tries to import requests/kerberos even if you don't want to use it.