diff options
| author | Tom Christie | 2013-12-13 20:40:11 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-12-13 20:40:11 +0000 |
| commit | fac6d1a36e39f2fccae77ca49e16c1eb838a51ed (patch) | |
| tree | 7841a407edb41719e3abcf7af74a6848ce3df142 | |
| parent | 39dbea4da43f829863d395d5f2ee158837f2afe2 (diff) | |
| parent | b86765d9c02388f6bb82dbb5824a005e8fe73dec (diff) | |
| download | django-rest-framework-fac6d1a36e39f2fccae77ca49e16c1eb838a51ed.tar.bz2 | |
Merge branch 'master' of git://github.com/philipforget/django-rest-framework into philipforget-master
| -rw-r--r-- | .travis.yml | 2 | ||||
| -rw-r--r-- | rest_framework/authentication.py | 3 | ||||
| -rw-r--r-- | rest_framework/tests/test_authentication.py | 6 | ||||
| -rw-r--r-- | tox.ini | 16 |
4 files changed, 15 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index bcf1bae0..18fe66ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ install: - pip install $DJANGO - pip install defusedxml==0.3 - "if [[ ${TRAVIS_PYTHON_VERSION::1} != '3' ]]; then pip install oauth2==1.5.211; fi" - - "if [[ ${TRAVIS_PYTHON_VERSION::1} != '3' ]]; then pip install django-oauth-plus==2.0; fi" + - "if [[ ${TRAVIS_PYTHON_VERSION::1} != '3' ]]; then pip install django-oauth-plus==2.2.1; fi" - "if [[ ${TRAVIS_PYTHON_VERSION::1} != '3' ]]; then pip install django-oauth2-provider==0.2.4; fi" - "if [[ ${TRAVIS_PYTHON_VERSION::1} != '3' ]]; then pip install django-guardian==1.1.1; fi" - "if [[ ${DJANGO::11} == 'django==1.3' ]]; then pip install django-filter==0.5.4; fi" diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index cf001a24..bca542eb 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -281,7 +281,8 @@ 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']) + return oauth_provider_store.check_nonce(request, oauth_request, + oauth_request['oauth_nonce'], oauth_request['oauth_timestamp']) class OAuth2Authentication(BaseAuthentication): diff --git a/rest_framework/tests/test_authentication.py b/rest_framework/tests/test_authentication.py index a44813b6..fe11423d 100644 --- a/rest_framework/tests/test_authentication.py +++ b/rest_framework/tests/test_authentication.py @@ -362,7 +362,8 @@ class OAuthTests(TestCase): def test_post_form_with_urlencoded_parameters(self): """Ensure POSTing with x-www-form-urlencoded auth parameters passes""" params = self._create_authorization_url_parameters() - response = self.csrf_client.post('/oauth/', params) + auth = self._create_authorization_header() + response = self.csrf_client.post('/oauth/', params, HTTP_AUTHORIZATION=auth) self.assertEqual(response.status_code, 200) @unittest.skipUnless(oauth_provider, 'django-oauth-plus not installed') @@ -424,7 +425,8 @@ class OAuthTests(TestCase): read_write_access_token.resource.is_readonly = False read_write_access_token.resource.save() params = self._create_authorization_url_parameters() - response = self.csrf_client.post('/oauth-with-scope/', params) + auth = self._create_authorization_header() + response = self.csrf_client.post('/oauth-with-scope/', params, HTTP_AUTHORIZATION=auth) self.assertEqual(response.status_code, 200) @unittest.skipUnless(oauth_provider, 'django-oauth-plus not installed') @@ -22,7 +22,7 @@ basepython = python2.7 deps = Django==1.6 django-filter==0.6a1 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.4 django-guardian==1.1.1 @@ -32,7 +32,7 @@ basepython = python2.6 deps = Django==1.6 django-filter==0.6a1 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.4 django-guardian==1.1.1 @@ -54,7 +54,7 @@ basepython = python2.7 deps = django==1.5.5 django-filter==0.6a1 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.3 django-guardian==1.1.1 @@ -64,7 +64,7 @@ basepython = python2.6 deps = django==1.5.5 django-filter==0.6a1 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.3 django-guardian==1.1.1 @@ -74,7 +74,7 @@ basepython = python2.7 deps = django==1.4.10 django-filter==0.6a1 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.3 django-guardian==1.1.1 @@ -84,7 +84,7 @@ basepython = python2.6 deps = django==1.4.10 django-filter==0.6a1 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.3 django-guardian==1.1.1 @@ -94,7 +94,7 @@ basepython = python2.7 deps = django==1.3.5 django-filter==0.5.4 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.3 django-guardian==1.1.1 @@ -104,7 +104,7 @@ basepython = python2.6 deps = django==1.3.5 django-filter==0.5.4 defusedxml==0.3 - django-oauth-plus==2.0 + django-oauth-plus==2.2.1 oauth2==1.5.211 django-oauth2-provider==0.2.3 django-guardian==1.1.1 |
