From a68e7c7dd03051c24e873c170eab1bf7cc663559 Mon Sep 17 00:00:00 2001 From: Wing Sun Date: Sun, 9 Sep 2018 18:14:23 +0800 Subject: [PATCH] Fix issue 636, pass request object to authenticate function. --- oauth2_provider/oauth2_validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth2_provider/oauth2_validators.py b/oauth2_provider/oauth2_validators.py index 2385be055..b207bd8f2 100644 --- a/oauth2_provider/oauth2_validators.py +++ b/oauth2_provider/oauth2_validators.py @@ -572,7 +572,7 @@ def validate_user(self, username, password, client, request, *args, **kwargs): """ Check username and password correspond to a valid and active User """ - u = authenticate(username=username, password=password) + u = authenticate(request, username=username, password=password) if u is not None and u.is_active: request.user = u return True