Commits

Costin Aniculaesei  committed 24fb1b7 Draft

Changed the warning level of log to debug for Signature

  • Participants
  • Parent commits 2b71d4f

Comments (0)

Files changed (1)

File 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(msg, request)
+                return self.handle_error_debug(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(e, request)
+            return self.handle_error_warning(e, request)
 
         api_auth_success.send(sender=self.__class__,
                               request=request,
                               consumer_key=consumer_key)
         return True
 
-    def handle_error(self, error, request):
+    def handle_error_debug(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)