aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)