Ticket #3504: 3504-authentication.patch
File 3504-authentication.patch, 810 bytes (added by , 18 years ago) |
---|
-
docs/authentication.txt
813 813 the time, it'll just look like this:: 814 814 815 815 class MyBackend: 816 def authenticate( username=None, password=None):816 def authenticate(self, username=None, password=None): 817 817 # Check the username/password and return a User. 818 818 819 819 But it could also authenticate a token, like so:: … … 819 819 But it could also authenticate a token, like so:: 820 820 821 821 class MyBackend: 822 def authenticate( token=None):822 def authenticate(self, token=None): 823 823 # Check the token and return a User. 824 824 825 825 Either way, ``authenticate`` should check the credentials it gets, and it