76 Commits

Author SHA1 Message Date
Nino van Hooff
ea00ff3c47 Update wording for authorization server error message
CURA-7346
2020-04-09 16:59:43 +02:00
Jaime van Kessel
849e012756
Gracefully handle binding erorr for local OAUTH2 Server
CURA-7346
2020-04-08 13:08:12 +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
c167481e60
Add missing ignore 2020-01-31 16:24:46 +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
ca25ec3dbc
Increase size of the verificationCode
It's mostly a theoretical problem, but 16 could theoretically be brute
forced. Bumping it up to 32 won't break anything, but it does make it
exteremely unlikely that it gets broken
2020-01-31 15:00:03 +01:00
Jaime van Kessel
81b33b8649
Add some missing typing 2020-01-10 14:58:53 +01:00
Jaime van Kessel
4613b62120
Merge branch '4.4' of github.com:Ultimaker/Cura 2019-11-11 16:01:19 +01:00
Jaime van Kessel
e2414ed5c9
Also log the exception when the connection failed to connect 2019-11-11 15:58:39 +01:00
Jaime van Kessel
00078fd659
Remove a bunch of unused imports 2019-11-08 13:38:42 +01:00
Jaime van Kessel
1e130637ee
Remove retry action from login
It doesn't work anyway and there is another way that does work (eg; login via the top right)
2019-09-13 10:38:52 +02:00
Lipu Fei
9f110368de Add do_HEAD() for auth req handler
CURA-6609
2019-08-27 14:48:02 +02:00
Lipu Fei
4762711c33 chdir to ~ on Linux if frozen 2019-08-20 11:18:54 +02:00
Lipu Fei
f4dc9cc6a2 Fix QDesktopServices.openUrl() for AppImage on Linux 2019-08-20 09:57:13 +02:00
Lipu Fei
4c792419e3 Use QDesktopServices.openUrl() instead of webbrowser 2019-08-15 08:57:19 +02:00
Jaime van Kessel
ce2b1adc82 Prevent crash on sign in if the socket was already closed 2019-08-12 10:50:46 +02:00
Jaime van Kessel
5f76070f05 Fix situation where authtoken wasnt updated for the toolbox request headers 2019-04-25 16:16:44 +02:00
Jaime van Kessel
b2e2f088c4 Add even more logging to the auth service 2019-04-24 16:44:13 +02:00
Jaime van Kessel
d69eb89f17 Fix refresh token not being stored in the bootup refresh case 2019-04-24 16:03:12 +02:00
Jaime van Kessel
48f37d03a4 Add debug log for when we are refreshing the access token 2019-04-18 09:29:04 +02:00
Jaime van Kessel
d8f193870f Added more logging to the authorization service 2019-04-17 16:11:39 +02:00
Jaime van Kessel
e9d4eb741a Merge branch '4.0' of github.com:Ultimaker/Cura 2019-03-11 10:52:14 +01:00
Jaime van Kessel
50999a075e Fix stupid mistake (signals need an emit, not a direct call)
CURA-6278
2019-03-11 10:46:41 +01:00
Jaime van Kessel
38a9206898 Merge branch '4.0' of github.com:Ultimaker/Cura 2019-02-28 16:01:40 +01:00
Jaime van Kessel
a8128556f3 Don't drop refresh token if request failed 2019-02-28 14:54:59 +01:00
Jaime van Kessel
62f913802f Prevent crash if the connection was lost for auth token 2019-02-28 12:58:41 +01:00
Ghostkeeper
1c6cce316a
Merge branch '4.0' 2019-02-27 11:47:47 +01:00
ChrisTerBeke
9ba342c541 Fix codestyle failure on float conversion 2019-02-27 10:43:15 +01:00
ChrisTerBeke
365f67cbf8 Have some overlap in token expiry to prevent unauthorized issues 2019-02-27 10:32:30 +01:00
Ghostkeeper
650204dae7
Merge branch '4.0' 2019-02-21 09:09:19 +01:00
Ghostkeeper
3040fde9eb
Merge branch '4.0'
Conflicts:
	cura/OAuth2/AuthorizationService.py -> Code style change vs. fixing logging in while no internet connection.
2019-02-21 08:25:21 +01:00
Ian Paschal
cb8804b86a Revert "Add some kaizen changes from #5328"
This reverts commit 09fe06b8bf463fd0805fa767bbe34087adc0c700.
2019-02-20 10:46:15 +01:00
Ian Paschal
09fe06b8bf Add some kaizen changes from #5328
Contributes to CL-1245
2019-02-20 10:45:36 +01:00
Ian Paschal
a11878b199 Log warning instead of exception if no connection
Contributes to CL-1245
2019-02-20 10:40:23 +01:00
Ghostkeeper
6143906fa4
Add type for message saying it's unable to connect
Contributes to issue CURA-6231.
2019-02-19 15:57:09 +01:00
Jaime van Kessel
c35aabd2c4 Add message to indicate that Cura was unable to connect with account server
This happens when you were logged previously, but currently don't have internet acces.

CURA-6231
2019-02-19 13:34:04 +01:00
Jaime van Kessel
a8f66a558c Merge branch '4.0' of github.com:Ultimaker/Cura 2019-02-14 10:53:01 +01:00
ChrisTerBeke
14c361a297 Add comment to clarify usage of fallback date 2019-02-11 09:45:50 +01:00
ChrisTerBeke
62c7ba5659
remove unused argument 2019-02-08 22:31:36 +01:00
ChrisTerBeke
4192c9e764
Fix typing issue 2019-02-08 22:30:31 +01:00
ChrisTerBeke
48c756b01d
Fixes for storing timestamp 2019-02-08 22:24:14 +01:00
ChrisTerBeke
05c4b6012e
Calculate expiry date to determine if token refresh is needed 2019-02-08 21:39:45 +01:00
ChrisTerBeke
9d6bd4b29a
Check access token before using it 2019-02-08 21:03:59 +01:00
Ghostkeeper
473633de2c
Merge branch '4.0' 2019-02-08 11:28:06 +01:00
Ghostkeeper
1b29ff2b8a
Make authorisation error messages translatable
Because they weren't. Foreigners might not understand them.
2019-02-08 11:19:22 +01:00
Ghostkeeper
12b2154a96
Fix code style and documentation formatting 2019-02-08 11:10:43 +01:00
Ghostkeeper
eb3129815d
Fix some code style
Please, people, adhere to our code style.
2019-02-08 11:01:09 +01:00
Jaime van Kessel
91f0d76c8a Fix crash when user was logged in but there was no internet connection on boot 2019-02-08 10:50:17 +01:00
ChrisTerBeke
0edeb11a78 Merge branch '4.0' into STAR-322_cloud-connection 2018-12-20 13:14:24 +01:00
Jaime van Kessel
36efa171c6 Add a bit more logging to the authorization service 2018-12-20 11:31:01 +01:00