17 Commits

Author SHA1 Message Date
Jaime van Kessel
b7ee3298c2
Add extra logging to auth server 2021-07-23 10:40:30 +02:00
Kostas Karmas
6d7d7bdb95 Fix local authorization server crashing
The thread handling the web_server was crashing. This in turn ended in
the web_server not being able to start again, thus being impossible to
login again if you logged out.
2020-06-11 15:27:29 +02:00
Nino van Hooff
f66e723866 Fix Authorization server not properly stopping after flow completes.
CURA-7490
2020-06-09 15:12:26 +02:00
Kostas Karmas
ea6a73e76d Fix mypy complains 2020-06-05 13:18:48 +02:00
Kostas Karmas
22b9bb77ef Fix reporting the [WinError 10038] exception traceback on sign-in
Surround the serve_forever function of the web server with a try-catch
on Windows, in order to avoid printing the entire (useless) traceback.
Now a warning message is be displayed in the log instead.

The behavior is untouched in other platforms
2020-06-05 12:59:31 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
jelle Spijker
b032101e55
Updated comments in cura/OAuth2
Used DOX_2_RST.py to convert doxygen style comments to sphinx style comments
2020-05-11 13:16:29 +02:00
Ghostkeeper
e52dc56a64
Prevent crashing on PermissionError when importing http.server (#7095)
* Fix PermissionError when importing http.server

Instead of crashing, now it'll just not start the server. This means that you won't be able to receive the response from the log-in so you won't be able to log in. The browser gives an error that it can't find the page on localhost. But at least it doesn't crash.

Fixes crash CURA-3Q.

* Log an error when the HTTP server can't be started

Contributes to crash CURA-3Q.

* Indicate that types are optional

Attempt to fix the typing issue with MyPy. I can't run this locally so the CI server will have to tell me if this fixed it.

Contributes to Sentry issue CURA-3Q.
2020-02-17 17:01:11 +01:00
Jaime van Kessel
1269de744f
Use state in AuthorizationService
It's a paranoid safety precaution, but beter safe than sorry.
Reported by WhiteHats; F-1.1.1
2020-01-31 16:11:59 +01:00
Jaime van Kessel
ce2b1adc82 Prevent crash on sign in if the socket was already closed 2019-08-12 10:50:46 +02:00
Ghostkeeper
12b2154a96
Fix code style and documentation formatting 2019-02-08 11:10:43 +01:00
Jaime van Kessel
1c8804ff2c Changed documentation style to doxygen
CURA-5744
2018-09-27 11:03:17 +02:00
Jaime van Kessel
b48adf5b3e Typing fixes
CURA-5744
2018-09-24 17:37:06 +02:00
Jaime van Kessel
060ea0b762 Fixed up final bit of mypy issues
CURA-5744
2018-09-21 14:12:31 +02:00
Jaime van Kessel
d0fc4878c2 Fix number of mypy mistakes
CURA-5744
2018-09-21 13:54:37 +02:00
Jaime van Kessel
3ae223334f Removed relative imports
Since the oauth module isn't just in a plugin anymore, there is no need for any of the relative imports

CURA-5744
2018-09-21 12:02:11 +02:00
Jaime van Kessel
3830fa0fd9 Initial move of the code of CuraPluginOAuth2Module
CURA-5744
2018-09-21 11:58:30 +02:00