From: Mohamed Larabi Date: Tue, 5 Mar 2013 13:26:28 +0000 (+0100) Subject: fix haedwired users login X-Git-Tag: myslice-django-0.1-1~72^2 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=8e75238a1113421aa3aedbac7aee315ed52fb92e fix haedwired users login --- diff --git a/auth/backend.py b/auth/backend.py index 25114e73..0eb1f2d6 100644 --- a/auth/backend.py +++ b/auth/backend.py @@ -18,7 +18,9 @@ class MyCustomBackend: # Create an authentication method # This is called by the standard Django login procedure - def authenticate(self, username=None, password=None): + def authenticate(self, token=None): + username=token['username'] + password=token['password'] users=MyCustomBackend.hard_wired_users if username not in users: return None if password != users[username]: return None