Skip to content

Commit 68dea0c

Browse files
author
Jim Simon
committed
Pass Request from JSONWebTokenSerializer to django.contrib.auth.authenticate
Closes jpadilla#387
1 parent 0a0bd40 commit 68dea0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_jwt/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def validate(self, attrs):
4747
}
4848

4949
if all(credentials.values()):
50-
user = authenticate(**credentials)
50+
user = authenticate(self.context.get('request', None), **credentials)
5151

5252
if user:
5353
if not user.is_active:

0 commit comments

Comments
 (0)