diff options
| author | Tom Christie | 2013-12-13 21:57:07 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-12-13 21:57:07 +0000 | 
| commit | a87c55a93a7ca380bc49425cc6df00f4eba99aa2 (patch) | |
| tree | b0ee7be1bac55e9971214aa7849e5addf7454369 /rest_framework/authentication.py | |
| parent | fac6d1a36e39f2fccae77ca49e16c1eb838a51ed (diff) | |
| download | django-rest-framework-a87c55a93a7ca380bc49425cc6df00f4eba99aa2.tar.bz2 | |
Compat fixes for django-oauth-plus versions 2.0-2.2.1
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index bca542eb..e491ce5f 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -9,7 +9,7 @@ from django.core.exceptions import ImproperlyConfigured  from rest_framework import exceptions, HTTP_HEADER_ENCODING  from rest_framework.compat import CsrfViewMiddleware  from rest_framework.compat import oauth, oauth_provider, oauth_provider_store -from rest_framework.compat import oauth2_provider, provider_now +from rest_framework.compat import oauth2_provider, provider_now, check_nonce  from rest_framework.authtoken.models import Token @@ -281,8 +281,9 @@ class OAuthAuthentication(BaseAuthentication):          """          Checks nonce of request, and return True if valid.          """ -        return oauth_provider_store.check_nonce(request, oauth_request, -            oauth_request['oauth_nonce'], oauth_request['oauth_timestamp']) +        oauth_nonce = oauth_request['oauth_nonce'] +        oauth_timestamp = oauth_request['oauth_timestamp'] +        return check_nonce(request, oauth_request, oauth_nonce, oauth_timestamp)  class OAuth2Authentication(BaseAuthentication): | 
