This pull request fixes a bug in authentication.

If the service does not have any api keys, there would be an error but it was not formed well.
This commit is contained in:
Rebecca Law
2016-04-29 09:54:40 +01:00
parent 87a02cba14
commit 8c14b5a8ab
2 changed files with 23 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ def requires_auth():
except TokenDecodeError:
errors_resp = authentication_response("Invalid token: signature", 403)
if not api_client['secret']:
errors_resp = authentication_response("Invalid token: signature", 403)
return errors_resp