If oauth is not attempted don't throw an error. Fixes #748.

This commit is contained in:
Tom Christie 2013-03-22 21:31:32 +00:00
parent 6770a5bbaf
commit 4055129662

View File

@ -204,6 +204,9 @@ class OAuthAuthentication(BaseAuthentication):
except oauth.Error as err: except oauth.Error as err:
raise exceptions.AuthenticationFailed(err.message) raise exceptions.AuthenticationFailed(err.message)
if not oauth_request:
return None
oauth_params = oauth_provider.consts.OAUTH_PARAMETERS_NAMES oauth_params = oauth_provider.consts.OAUTH_PARAMETERS_NAMES
found = any(param for param in oauth_params if param in oauth_request) found = any(param for param in oauth_params if param in oauth_request)