Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Commit

Permalink
Don’t raise AuthenticationFailed if user didn’t try to authenticate.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysiekJ committed Aug 19, 2013
1 parent 2ed5575 commit f22b4ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doac/contrib/rest_framework/authentication.py
Expand Up @@ -17,7 +17,7 @@ def authenticate(self, request):
raise exceptions.AuthenticationFailed("Invalid handler")

if not hasattr(request._request, "user") or not request._request.user.is_authenticated():
raise exceptions.AuthenticationFailed("Could not authenticate")
return None

if not hasattr(request._request, "access_token"):
raise exceptions.AuthenticationFailed("Access token was not valid")
Expand Down

0 comments on commit f22b4ea

Please sign in to comment.