diff options
| author | Tom Christie | 2013-12-23 09:48:59 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-12-23 09:48:59 +0000 | 
| commit | 52686420f4bf866064ee88a15903665f14289394 (patch) | |
| tree | 41ea7b0d4863092f996f63de14e678a1c74a7a3a /rest_framework/authentication.py | |
| parent | 9c41c007afc71c899306bcb02e40bdfc36b09146 (diff) | |
| parent | 83b31e7ea298a8948e9a76c9b971845ea0052b3c (diff) | |
| download | django-rest-framework-52686420f4bf866064ee88a15903665f14289394.tar.bz2 | |
Merge branch 'bennbollay-patch-1' into 2.4.0
Conflicts:
	.travis.yml
	docs/api-guide/routers.md
	rest_framework/compat.py
	tox.ini
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index db5cce40..1f8d37fa 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -9,7 +9,7 @@ from django.core.exceptions import ImproperlyConfigured  from django.middleware.csrf import CsrfViewMiddleware  from rest_framework import exceptions, HTTP_HEADER_ENCODING  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,7 +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_nonce = oauth_request['oauth_nonce'] +        oauth_timestamp = oauth_request['oauth_timestamp'] +        return check_nonce(request, oauth_request, oauth_nonce, oauth_timestamp)  class OAuth2Authentication(BaseAuthentication): | 
