mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 19c25583fa
into 99382f3ccb
This commit is contained in:
commit
cda21696b6
|
@ -197,6 +197,8 @@ class TokenAuthentication(BaseAuthentication):
|
|||
if not token.user.is_active:
|
||||
raise exceptions.AuthenticationFailed(_('User inactive or deleted.'))
|
||||
|
||||
token.user.backend = "{0}.{1}".format(self.__class__.__module__, self.__class__.__name__)
|
||||
|
||||
return (token.user, token)
|
||||
|
||||
def authenticate_header(self, request):
|
||||
|
|
Loading…
Reference in New Issue
Block a user