mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
If oauth is not attempted don't throw an error. Fixes #748.
This commit is contained in:
parent
6770a5bbaf
commit
4055129662
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user