1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #25187 -- Made request available in authentication backends.

This commit is contained in:
Aleksej Manaev
2016-07-11 16:40:39 +02:00
committed by Tim Graham
parent 32c0d823e5
commit 4b9330ccc0
12 changed files with 106 additions and 24 deletions

View File

@@ -475,7 +475,7 @@ class PermissionDeniedBackend(object):
Always raises PermissionDenied in `authenticate`, `has_perm` and `has_module_perms`.
"""
def authenticate(self, username=None, password=None):
def authenticate(self, request, username=None, password=None):
raise PermissionDenied
def has_perm(self, user_obj, perm, obj=None):
@@ -585,7 +585,7 @@ class TypeErrorBackend(object):
Always raises TypeError.
"""
def authenticate(self, username=None, password=None):
def authenticate(self, request, username=None, password=None):
raise TypeError