diff options
| author | Tom Christie | 2014-03-06 20:33:27 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-03-06 20:33:27 +0000 |
| commit | 2090f452b224e60853b40e73d1d0e9aad58cd24a (patch) | |
| tree | 9550083d51dce99acf2e744e85d891dd803d645c /rest_framework/authentication.py | |
| parent | ef94861c2d31592c3760a0c0758beb084f452c03 (diff) | |
| parent | 34887ed75625a58d00c986b3ea5526877f4724b2 (diff) | |
| download | django-rest-framework-2090f452b224e60853b40e73d1d0e9aad58cd24a.tar.bz2 | |
Merge pull request #1455 from ericbuehl/master
don't implicitly import provider.oauth2
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index e491ce5f..b0e88d88 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -326,11 +326,11 @@ class OAuth2Authentication(BaseAuthentication): """ try: - token = oauth2_provider.models.AccessToken.objects.select_related('user') + token = oauth2_provider.oauth2.models.AccessToken.objects.select_related('user') # provider_now switches to timezone aware datetime when # the oauth2_provider version supports to it. token = token.get(token=access_token, expires__gt=provider_now()) - except oauth2_provider.models.AccessToken.DoesNotExist: + except oauth2_provider.oauth2.models.AccessToken.DoesNotExist: raise exceptions.AuthenticationFailed('Invalid token') user = token.user |
