X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=auth%2Fbackend.py;h=4c93676a084ae69a3f85730c6915348541cb2acd;hb=9606921b662a85bf5d68db06f68deb4045dcdd57;hp=25114e733b5143e4814b3588a2971b89b9cb3a87;hpb=f72be702471054ae1469c293458b0adb1605418d;p=myslice.git diff --git a/auth/backend.py b/auth/backend.py index 25114e73..4c93676a 100644 --- a/auth/backend.py +++ b/auth/backend.py @@ -1,10 +1,6 @@ # import the User object from django.contrib.auth.models import User -# import the IMAP library -#from imaplib import IMAP4 - -# import time - this is used to create Django's internal username import time # Name my backend 'MyCustomBackend' @@ -18,7 +14,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