Tyler Gill
f93f9dcc5a
Add new utility class, OAuthHttpClient.
...
This class extends HttpClient and uses an OAuthHttpMessageHandler under the covers to automatically authenticate requests.
Additionally, it automatically respects the global HttpContextSettings for overall timeout, read/write timeout, and SSL certificate validation.
(BufferRequests isn't currently handled, as HttpClient doesn't seem to easily expose that flag, and as of .NET 4.5, seems to not buffer by default.)
2018-03-23 15:07:51 -06:00
Tyler Gill
407bead9f9
Change some fragment settings.
...
Default retry delay is now 1000ms, and fragment sizes must be at least the multiple size (320 KiB)
2018-03-23 15:04:23 -06:00
Tyler Gill
5a4d170165
Update strings for Microsoft Group backend.
2018-03-23 15:03:04 -06:00
Tyler Gill
448577f5ff
Handle cases where the SharePoint path is given with an 'https' prefix in the UI.
2018-03-22 16:15:09 -06:00
Tyler Gill
7491da2add
Add entry for --group-email so it isn't treated as an unknown property.
2018-03-22 16:14:42 -06:00
Tyler Gill
5bec41b665
Update both SharePoint and Office 365 group backends to support more human-discernable methods of specifying the backend destination.
...
For SharePoint, this means instead of giving the site ID as a parameter (and a relative path as the backup URL), the full URL to the folder in SharePoint (e.g., 'sharepoint://{tenant}.sharepoint.com/{PathToSite}/{DocumentBase}/{subfolder}') can be given, and the site ID will be looked up.
(This should match the existing SharePoint backend, including the convention of using '//' to indicate the document root, though I can't explicitly test that since the SharePoint sites I have access to require 2FA, which the old backend doesn't support.)
I've tested both explicit ID and site path methods of specifying the destination, and they appear to be working.
For Office 365 groups, it now supports looking up a group by its email address.
2018-03-22 15:20:17 -06:00
Tyler Gill
987cda7e1d
When uploading large files, MS graph backends need to parse the response inside the try block for retries to work (since that is where errors are thrown)
2018-03-22 14:41:19 -06:00
Tyler Gill
258799266e
SharePoint and Group drives appear to report quota info that is all zeros.
...
In that case, pretend that no quota info was reported instead of causing incorrect quota warnings and errors.
2018-03-22 14:40:37 -06:00
Tyler Gill
438c84f824
Ensure custom fragment sizes fit the recommended sizes (under 60 MiB and multiple of 320 KiB)
2018-03-21 11:32:41 -06:00
Tyler Gill
97a93a071f
Make m_oauth readonly in OAuthHttpMessageHandler.
2018-03-21 11:23:50 -06:00
Tyler Gill
55c182b946
Strip authorization header and access token out of Microsoft Graph exception messages.
2018-03-21 11:16:27 -06:00
Tyler Gill
6c05da925e
Explicitly request the 'replace' conflict resolution behavior when uploading large files.
2018-03-20 15:28:57 -06:00
Tyler Gill
dbb28c5f62
Make sure DNS names reported by Microsoft Graph backends are unique.
2018-03-20 15:26:52 -06:00
Tyler Gill
c57d7e75cd
Add helpId parameter to UserInformationExceptions in MicrosoftGraphBackends.
2018-03-20 15:09:06 -06:00
Tyler Gill
94341a640d
Implement DNSName method in MicrosoftGraphBackend base class.
2018-03-20 15:08:30 -06:00
Tyler Gill
f4c6100873
Add Duplicati + version as the user agent in the MS Graph backends.
2018-03-20 15:07:46 -06:00
Tyler Gill
4578a5bd91
Merge branch 'master' of https://github.com/duplicati/duplicati into feature/ms-graph-backends
2018-03-20 14:24:48 -06:00
Tyler Gill
a98c967f70
Add new backends for OneDrive+OneDrive for Business, SharePoint, and Microsoft Groups based on the Microsoft Graph API.
...
These backends are implemented via the common base class, MicrosoftGraphBackend, with only a few minor tweaks (different id parameters, protocol keys, descriptions, etc.)
All three backends support streaming, quota retrieval, and rename.
2018-03-20 14:18:49 -06:00
Tyler Gill
c542d65997
Update service agreement and privacy policy link for OneDrive backend.
2018-03-20 14:01:28 -06:00
Tyler Gill
20fc793dee
Add OAuthHttpMessageHandler helper class to OAuthHelper library.
...
This class implements the abstract HttpMessageHandler class (mostly via the default HttpClientHandler implementation).
This abstract class is used by System.Net.Http.HttpClient as the underlying HTTP mechanism, and in this particular case is used to automatically add an authorization header to each request.
It also provides a method for marking a request as one that should not be authenticated.
2018-03-20 14:00:52 -06:00
Tyler Gill
f9a8b30b2f
Update JSONWebHelper.PostAndGetJSONData to remove parameters that aren't actually being used (setup and setupreq).
...
These parameters weren't being used in the method body, or being passed in by any callers (it looks like a copy / paste error when a previous method was converted into this one)
These are replaced with a new optional parameter (method) which allows the caller to request a custom HTTP method to be used.
2018-03-20 13:56:05 -06:00
Kenneth Skovhede
e124329f1e
Merge branch 'feature/improved-logging'
2018-03-16 08:38:14 +01:00
Kenneth Skovhede
842fd96543
Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
...
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Hsu
1f8b542604
Use nameof operator when constructing ArgumentNullException.
...
This will make rename refactorings easier in the future.
2018-03-07 17:53:08 -08:00
Kenneth Skovhede
bd863016fa
Added support for returning multiple DNS names for cache invalidation.
...
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +01:00
Rune Henriksen
fc77b476fc
changed from NYI to null returns. Added check to skip DNS check if no DNSName is provided
2018-02-21 22:38:01 +01:00
Rune Henriksen
ecc586c0f8
added code to attempt to resolve DNS issues on connection failure and implemented DNSName method in WebDav backend handler
2018-02-18 01:30:05 +01:00
Rune Henriksen and GitHub
7a58851224
Added DNSName method to comply with interface
...
Fixed weird linebreak issues and added DNSName method to comply with Ibackend interface
2018-02-18 00:21:48 +01:00
Rune Henriksen
00292953c3
added DNSName getter on Backend interface and added NotImplementedException methods on each backend class
2018-02-18 00:18:44 +01:00
Kenneth Skovhede
d8bd9abe15
Fixed a problem with the box.com backend not being able to find files it already uploaded.
...
This fixes #2557
This might also fix #2349
2018-02-08 21:45:36 +01:00
osmogar
8f1f972f09
A malfunction OneDrive account can retrieve a inconsistent list of files when we fetches a partial list of objects through the onedrive rest api. Retries the download of the file list until all files are listed
2018-01-26 14:22:32 +01:00
Kenneth Skovhede
9aa2310025
Merge branch 'master' of github.com:duplicati/duplicati
2018-01-20 15:03:25 +01:00
Kenneth Skovhede and GitHub
b417bfbc52
Merge pull request #2957 from wjansenw/rclone
...
Adding Rclone as backend
2018-01-20 13:06:26 +01:00
Kenneth Skovhede
03b51b77af
Updated the Google Drive backend to support TeamDrives.
2018-01-20 11:04:54 +01:00
wjan
e46f412bef
corrects Newtonsoft reference
2018-01-19 16:15:57 +01:00
wjan
687a6b8887
Merge branch 'master' of https://github.com/duplicati/duplicati into rclone
2018-01-19 08:21:05 +01:00
wjan
cd43e4890e
adds exception in case of other errors from rclone backend
2018-01-18 21:40:05 +01:00
wjan
90c67ddb0b
removes oauth helper from the references
2018-01-18 21:27:09 +01:00
wjan
4b076d9e0e
read output from rclone command async + corrects parameters in gui
2018-01-18 20:42:50 +01:00
inat3k and GitHub
9e632a71b7
Fix for #2970
...
Fix for Test Connection to WebDAV Server
2018-01-18 17:55:06 +01:00
Kenneth Skovhede
c54ef9c376
Adds a UserAgent header to OD4B as suggested in #2475 may also work for #2474
2018-01-18 11:44:04 +01:00
wjan
20d42549e3
adds option to provide location of rclone-executable and provides long descriptions for the options
2018-01-11 12:50:23 +01:00
wjan
7ecf6ed89f
adds exception handling and moves duplicate code to helper function
2018-01-10 17:13:45 +01:00
wjan
8500988d7c
adds rclone UI and backend improvements
2018-01-10 15:33:28 +01:00
wjan
65866f13d3
Corrects the folder of Rclone contributions
2018-01-09 09:41:40 +01:00
wjan
63061d533c
provides rclone backend
2018-01-09 09:12:06 +01:00
vnau
9b9d9b1297
Fixed compiler warnings.
2017-12-17 01:34:21 +07:00
Kenneth Hsu
1c7391399d
Remove XML documentation for unmatched parameters.
2017-12-09 18:30:01 -08:00
Kenneth Skovhede and GitHub
36aadc4ad1
Merge pull request #2910 from warwickmm/refactor/remove_redundant_tostring
...
Remove redundant calls to ToString
2017-11-27 08:50:00 +01:00
Kenneth Hsu
5fb1958ceb
Remove redundant calls to ToString.
2017-11-26 15:44:34 -08:00