aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authentication.py
diff options
context:
space:
mode:
authorTom Christie2013-03-22 21:57:37 +0000
committerTom Christie2013-03-22 21:57:37 +0000
commit9bf7c9b714713f7b2fe84074cfd05a8bc3ef4022 (patch)
tree932d97342b9adc7a25b6620fde35d07184ed3c58 /rest_framework/authentication.py
parentdeb5e653e441bf31f3b183b575f72e6b4cf537ea (diff)
parent870d5c7d7810ecd7f187e13b5fe3a3bcba6b18c3 (diff)
downloaddjango-rest-framework-9bf7c9b714713f7b2fe84074cfd05a8bc3ef4022.tar.bz2
Merge master
Diffstat (limited to 'rest_framework/authentication.py')
-rw-r--r--rest_framework/authentication.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py
index b4b73699..8f4ec536 100644
--- a/rest_framework/authentication.py
+++ b/rest_framework/authentication.py
@@ -204,6 +204,9 @@ class OAuthAuthentication(BaseAuthentication):
except oauth.Error as err:
raise exceptions.AuthenticationFailed(err.message)
+ if not oauth_request:
+ return None
+
oauth_params = oauth_provider.consts.OAUTH_PARAMETERS_NAMES
found = any(param for param in oauth_params if param in oauth_request)