Commits

Anonymous committed 2aa5f8f Draft

Left all authntication messages as debug

  • Participants
  • Parent commits c736a42

Comments (0)

Files changed (1)

api_auth/authentication.py

             computed = Signature.compute_from_request(request)
             if not incoming == computed:
                 msg = "Signatures don't match. Expecting %s." % computed
-                return self.handle_error_debug(msg, request)
+                return self.handle_error(msg, request)
             consumer_key = search_key(request.META, request.GET, 'consumer_key')
             # Check the nonce last so we minimize the db hit.
             self.check_nonce(request.META, request.GET, consumer_key)
         except (_AuthException, KeyNotFound), e:
-            return self.handle_error_warning(e, request)
+            return self.handle_error(e, request)
 
         api_auth_success.send(sender=self.__class__,
                               request=request,
                               consumer_key=consumer_key)
         return True
 
-    def handle_error_debug(self, error, request):
+    def handle_error(self, error, request):
         log.debug(str(error))
         return self.fail(request)
 
-    def handle_error_warning(self, error, request):
-        log.warning(str(error))
-        return self.fail(request)
-
     def challenge(self):
         """
         This method is called if the authentication is unsuccessful.