From 707a6016a3023fe423ede53db707c55273b0f6d0 Mon Sep 17 00:00:00 2001 From: Peith Vergil Date: Fri, 28 Oct 2016 07:24:38 +0800 Subject: [PATCH] Use the OAuthLibCore object defined at the module level. --- oauth2_provider/backends.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oauth2_provider/backends.py b/oauth2_provider/backends.py index b2e706b54..25c0fed9c 100644 --- a/oauth2_provider/backends.py +++ b/oauth2_provider/backends.py @@ -15,8 +15,7 @@ class OAuth2Backend(object): def authenticate(self, **credentials): request = credentials.get('request') if request is not None: - oauthlib_core = get_oauthlib_core() - valid, r = oauthlib_core.verify_request(request, scopes=[]) + valid, r = OAuthLibCore.verify_request(request, scopes=[]) if valid: return r.user return None