nextcloud-desktop/src/libsync
Olivier Goffart 35967fc2d6
OAuth2: Refresh the token without aborting the sync
OAuth2 access token typically only has a token valid for 1 hour.
Before this patch, when the token was timing out during the sync, the
sync was aborted, and the ConnectionValidator was then requesting a new
token, so the sync can be started over.
If the discovery takes longer than the oauth2 validity, this means that
the sync can never proceed, as it would be always restarted from scratch.

With this patch, we try to transparently renew the OAuth2 token and restart
the jobs that failed because the access token was invalid.

Note that some changes were required in the GETFile job because it handled
the error itself and so it was erroring the jobs before its too late.

Issue #6814
2020-12-15 10:58:14 +01:00
..
creds OAuth2: Refresh the token without aborting the sync 2020-12-15 10:58:14 +01:00
abstractnetworkjob.cpp OAuth2: Refresh the token without aborting the sync 2020-12-15 10:58:14 +01:00
abstractnetworkjob.h OAuth2: Refresh the token without aborting the sync 2020-12-15 10:58:14 +01:00
accessmanager.cpp Use setHeader instead of setRawHeader for the user agent 2020-10-08 05:55:47 +00:00
accessmanager.h libsync: run clang-tidy modernize-use-nullptr 2018-11-12 18:46:39 +01:00
account.cpp OAuth2: Store 'Account::davUser' in the config, and use that user for connecting 2020-12-15 10:58:11 +01:00
account.h New Propagation algorithm: Fetch, and emit, the root etag 2020-12-15 10:58:07 +01:00
accountfwd.h Enable the modernize-use-using check on clang-tidy 2020-08-12 18:18:57 +02:00
bandwidthmanager.cpp Enable bugprone-narrowing-conversions clang-tidy check 2020-09-01 06:37:03 +00:00
bandwidthmanager.h Adapt code style in addition to #2300 2020-08-27 01:31:06 +02:00
capabilities.cpp Add sharePublicLinkAskOptionalPassword to Capabilities 2020-10-07 09:43:47 +00:00
capabilities.h Add sharePublicLinkAskOptionalPassword to Capabilities 2020-10-07 09:43:47 +00:00
clientproxy.cpp Fix libsync exports for proxy changes in #1886 2020-06-18 21:05:11 +02:00
clientproxy.h Fix libsync exports for proxy changes in #1886 2020-06-18 21:05:11 +02:00
clientsideencryption.cpp Get rid of FindQt5Keychain.cmake 2020-11-02 13:19:48 +01:00
clientsideencryption.h Factor out the logic to start a new e2ee status job 2020-10-21 10:00:58 +02:00
clientsideencryptionjobs.cpp Don't use depth infinity anymore to get the folders e2ee status 2020-10-21 10:00:59 +02:00
clientsideencryptionjobs.h Add a way to know which folder was listed for encrypted status 2020-10-21 10:00:58 +02:00
CMakeLists.txt New discovery algorithm: Initial work. 2020-12-15 10:57:56 +01:00
configfile.cpp Settings migration: Preserve future settings where possible 2020-12-15 10:57:54 +01:00
configfile.h Settings migration: Preserve future settings where possible 2020-12-15 10:57:54 +01:00
cookiejar.cpp Enable the modernize-loop-convert check on clang-tidy 2020-08-13 12:55:14 +00:00
cookiejar.h libsync: run clang-tidy modernize-use-nullptr 2018-11-12 18:46:39 +01:00
discovery.cpp Discovery: Virtual file handling adjustments 2020-12-15 10:58:14 +01:00
discovery.h Discovery: Virtual file handling adjustments 2020-12-15 10:58:14 +01:00
discoveryphase.cpp Discovery phase: refactor some code in DiscoveryPhase::findAndCancelDeletedJob 2020-12-15 10:58:09 +01:00
discoveryphase.h Discovery: Don't rebuild invalidFilname regex each call 2020-12-15 10:58:13 +01:00
encryptfolderjob.cpp Delete a space character 2020-07-01 14:10:49 +02:00
encryptfolderjob.h Move the encrypt folder logic in a reusable job class 2020-06-30 11:29:08 +02:00
filesystem.cpp FileSystem: make removeRecursively() reusable 2020-10-22 16:39:17 +02:00
filesystem.h SocketAPI: Introduce conflict resolution actions #6252 2020-10-22 16:40:10 +02:00
libsync.md Structure developer documentation 2015-06-29 18:43:21 +02:00
localdiscoverytracker.cpp New Discovery Algo: Support the DatabaseAndFilesystem mode for local discovery 2020-12-15 10:57:59 +01:00
localdiscoverytracker.h New Discovery Algo: Support the DatabaseAndFilesystem mode for local discovery 2020-12-15 10:57:59 +01:00
logger.cpp Logger: Guard zlib usage by ZLIB_FOUND 2020-12-15 10:57:51 +01:00
logger.h Expose more of the logger state 2020-10-07 13:33:20 +00:00
networkjobs.cpp New Propagation algorithm: Fetch, and emit, the root etag 2020-12-15 10:58:07 +01:00
networkjobs.h Move Result to its own header 2020-12-15 10:58:08 +01:00
nextcloudtheme.cpp Replace "https://..." hint by "https://host:port" 2020-05-23 18:32:18 +02:00
nextcloudtheme.h Show URL placeholder hint in wizard 2020-05-23 18:32:15 +02:00
owncloudpropagator.cpp New discovery algorithm: Parallel PROPFIND 2020-12-15 10:58:08 +01:00
owncloudpropagator.h Revert "Merge pull request #1454 from nextcloud/syncjournal-del-prio" 2020-12-15 10:57:56 +01:00
owncloudpropagator_p.h Add error category for http file lock error status 423. 2019-06-11 23:32:10 +02:00
progressdispatcher.cpp Enable bugprone-narrowing-conversions clang-tidy check 2020-09-01 06:37:03 +00:00
progressdispatcher.h Use default member init when applicable 2020-06-03 16:10:39 +02:00
propagatedownload.cpp OAuth2: Refresh the token without aborting the sync 2020-12-15 10:58:14 +01:00
propagatedownload.h OAuth2: Refresh the token without aborting the sync 2020-12-15 10:58:14 +01:00
propagatedownloadencrypted.cpp Deal properly with encrypted item updates accross connections 2020-07-01 16:58:29 +00:00
propagatedownloadencrypted.h Take care of mangled paths on download as well 2020-06-30 11:29:08 +02:00
propagateremotedelete.cpp Blacklist: remember the X-Request-ID 2020-12-15 10:57:53 +01:00
propagateremotedelete.h Prevent parallelism when deleting encrypted files 2020-07-09 16:22:54 +02:00
propagateremotedeleteencrypted.cpp Stop unlocking from within PropagateRemoteDeleteEncrypted 2020-07-09 16:22:54 +02:00
propagateremotedeleteencrypted.h Stop unlocking from within PropagateRemoteDeleteEncrypted 2020-07-09 16:22:54 +02:00
propagateremotemkdir.cpp Blacklist: remember the X-Request-ID 2020-12-15 10:57:53 +01:00
propagateremotemkdir.h Allow to override the parallelism 2020-07-15 13:05:11 +02:00
propagateremotemove.cpp Virtual files: Renames propagate #6718 2020-12-15 10:58:07 +01:00
propagateremotemove.h libsync: run clang-tidy modernize-use-nullptr 2018-11-12 18:46:39 +01:00
propagateupload.cpp PropagateUpload: Avoid crash due to cascading aborts 2020-12-15 10:58:11 +01:00
propagateupload.h PropagateUpload: Avoid crash due to cascading aborts 2020-12-15 10:58:11 +01:00
propagateuploadencrypted.cpp Use httpd/unix-directory mimetype for E2EE folders 2020-08-31 10:08:48 +00:00
propagateuploadencrypted.h Fix parenting issues of PropagateUploadEncrypted 2020-06-30 11:29:08 +02:00
propagateuploadng.cpp Blacklist: remember the X-Request-ID 2020-12-15 10:57:53 +01:00
propagateuploadv1.cpp Upload: Do not error out if the server do not send the X-OC-MTime: accepted header 2020-12-15 10:58:11 +01:00
propagatorjobs.cpp Placeholders: Safe migration to older client versions 2020-12-15 10:57:48 +01:00
propagatorjobs.h Take care of mangled paths on download as well 2020-06-30 11:29:08 +02:00
result.h Move Result to its own header 2020-12-15 10:58:08 +01:00
syncengine.cpp Discovery: Don't rebuild invalidFilname regex each call 2020-12-15 10:58:13 +01:00
syncengine.h Remove the backup deteciton code which was used for server < 9.1 2020-12-15 10:58:10 +01:00
syncfileitem.cpp New discovery algorithm: Initial work. 2020-12-15 10:57:56 +01:00
syncfileitem.h Add missing export 2020-12-15 10:58:13 +01:00
syncfilestatus.cpp Enable the modernize-use-equals-default check on clang-tidy 2020-08-13 14:19:42 +02:00
syncfilestatus.h Use default member init when applicable 2020-06-03 16:10:39 +02:00
syncfilestatustracker.cpp More cleanup of csync remains 2020-12-15 10:58:01 +01:00
syncfilestatustracker.h Enable the modernize-use-using check on clang-tidy 2020-08-12 18:18:57 +02:00
syncoptions.h New discovery algorithm: Parallel PROPFIND 2020-12-15 10:58:08 +01:00
syncresult.cpp Enable the modernize-use-equals-default check on clang-tidy 2020-08-13 14:19:42 +02:00
syncresult.h Use default member init when applicable 2020-06-03 16:10:39 +02:00
theme.cpp virtual files: show option only when branding allows it 2020-12-15 10:58:12 +01:00
theme.h virtual files: show option only when branding allows it 2020-12-15 10:58:12 +01:00
wordlist.cpp Enable bugprone-narrowing-conversions clang-tidy check 2020-09-01 06:37:03 +00:00
wordlist.h Export the WordList functions 2020-10-08 15:58:29 +02:00