mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
If authentication is recieved, it's now also correctly validated
CURA-49
This commit is contained in:
parent
3a767c72f0
commit
054f7aaa83
1 changed files with 2 additions and 4 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue