Login: return an UNAUTHORIZED (401) error on bad username/password, not 400.

master
Tom Hacohen 4 years ago
parent 5af2aeda7e
commit 693a5ec778

@ -683,7 +683,7 @@ class AuthenticationViewSet(viewsets.ViewSet):
try: try:
verify_key.verify(response_raw, signature) verify_key.verify(response_raw, signature)
except nacl.exceptions.BadSignatureError: except nacl.exceptions.BadSignatureError:
return Response({'code': 'login_bad_signature'}, status=status.HTTP_400_BAD_REQUEST) return Response({'code': 'login_bad_signature'}, status=status.HTTP_401_UNAUTHORIZED)
return None return None

Loading…
Cancel
Save