diff options
Diffstat (limited to 'postgresqleu/auth.py')
-rw-r--r-- | postgresqleu/auth.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/postgresqleu/auth.py b/postgresqleu/auth.py index 776562d5..a84214c7 100644 --- a/postgresqleu/auth.py +++ b/postgresqleu/auth.py @@ -35,6 +35,7 @@ from Crypto.Hash import SHA from Crypto import Random import time + class AuthBackend(ModelBackend): # We declare a fake backend that always fails direct authentication - # since we should never be using direct authentication in the first place! @@ -67,6 +68,7 @@ def login(request): else: return HttpResponseRedirect(settings.PGAUTH_REDIRECT) + # Handle logout requests by logging out of this site and then # redirecting to log out from the main site as well. def logout(request): @@ -74,6 +76,7 @@ def logout(request): django_logout(request) return HttpResponseRedirect("%slogout/" % settings.PGAUTH_REDIRECT) + # Receive an authentication response from the main website and try # to log the user in. def auth_receive(request): @@ -204,6 +207,7 @@ def user_search(searchterm=None, userid=None): return j + # Import a user into the local authentication system. Will initially # make a search for it, and if anything other than one entry is returned # the import will fail. |