From 054f7aaa8315c25de9d0617000654c965bf880a5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 29 Jun 2016 11:53:56 +0200 Subject: [PATCH] If authentication is recieved, it's now also correctly validated CURA-49 --- NetworkPrinterOutputDevice.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index 9987fcda36..15f33aedde 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -335,15 +335,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): data = json.loads(bytes(reply.readAll()).decode("utf-8")) print("auth check response") if data.get("message", "") == "authorized": - Logger.log("i", "Authentication completed.") - self.setAuthenticationState(AuthState.Authenticated) + Logger.log("i", "Authentication was approved") + self._verifyAuthentication() # Ensure that the verification is really used and correct. elif data.get("message", "") == "unauthorized": Logger.log("i", "Authentication was denied.") self.setAuthenticationState(AuthState.AuthenticationDenied) else: pass - #Logger.log("i", "Authentication was denied.") - #self.setAuthenticationState(AuthState.AuthenticationDenied) elif reply.operation() == QNetworkAccessManager.PostOperation: if "/auth/request" in reply.url().toString():