Re: Fw: OneDrive backend
- From: Ondrej Holy <oholy redhat com>
- To: Vilém Hořínek <vilem horinek hotmail com>
- Cc: "gvfs-list gnome org" <gvfs-list gnome org>, "rishi is lostca se" <rishi is lostca se>
- Subject: Re: Fw: OneDrive backend
- Date: Fri, 12 Jul 2019 16:19:30 +0200
Hi Vilém,
If this is expected to be merged to libzapojit, then I suppose that
you have to keep the old API for existing applications. This is a
rather question for Debrashi Ray, the libzapojit author, but it seems
that he doesn't have time for it currently...
Regards
O.
út 25. 6. 2019 v 19:24 odesílatel Vilém Hořínek
<vilem horinek hotmail com> napsal:
Hi,
another update here. The WebDAV solution would not be ideal but should be fine for normal usage. The main
issue is in the initial login process. It doesn't support two-factor authentication, meaning that if you
want to login you have to create a special 'App password' to be able to log in. The secondary issue would
be getting the WebDAV URL which you have to do manualy according to this [1].
However I finally managed to strip Skydrive API from libzapojit and create a very basic wrapper[2] around
the drive object[3] from the Microsoft Graph API. That involved creating new backend in GOA[4] because
according to everything I read the login mechanism is not backwards compatible with the currently used
Windows Live API. The code is not completly done it still misses some points like loading all results when
the response is split due to its size, reading all the properties, etc, but it proves the point that all
the infrastructure is there, the only part to code is a wrapper around the REST API.
I was just wondering if rewriting the libzapojit like this is fine or if I should include the old Skydrive
API (probably a wrapper around the new one) as fallback for projects already using it.
Regards,
Vilém
[1]
https://blogs.msdn.microsoft.com/robert_mcmurray/2014/09/30/using-the-webdav-redirector-with-onedrive-part-2-two-step-verification
[2] https://gitlab.gnome.org/vhorinek/libzapojit
[3] https://docs.microsoft.com/en-us/graph/api/resources/drive?view=graph-rest-1.0
[4] https://gitlab.gnome.org/vhorinek/gnome-online-accounts
________________________________
Od: Ondrej Holy <oholy redhat com>
Odesláno: středa 12. června 2019 12:20
Komu: Vilém Hořínek
Kopie: gvfs-list gnome org; rishi is lostca se
Předmět: Re: Fw: OneDrive backend
Hi Vilem,
thanks for your update. It is appreciated that somebody is working on
this. It would be definitely nice to merge your fork back to the
original project. Though I would still prefer the WebDAV-based
solution as it would be definitely easier for maintenance, see
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.gnome.org%2FGNOME%2Fgvfs%2Fissues%2F273&data=02%7C01%7C%7Cfb0dc48946dc4bd493b408d6ef1faedd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636959316740286513&sdata=nv%2F2uEz1zMaGtL5AZw%2Flf7AHe5hl%2BRjyl7GqswjkfhI%3D&reserved=0.
Rishi should be the
right person for your questions, so I am adding him in CC.
Regards
Ondrej
po 3. 6. 2019 v 9:08 odesílatel Vilém Hořínek via gvfs-list
<gvfs-list gnome org> napsal:
Hello all,
It was a year since I wrote the last email but from that time fully absorbed by school wchich I finished
last week so I will return to the work on libzapojit.
I got together all of the stuff I created then and created a fork of libzapojit [1] wchich I ported to
Meson. Since Microsoft rolled the new Microsoft Graph API I will probabbly also need to rewrite part of
GNOME Online Accounts but I don't think that would be a problem since the OpenAuth2 tokens should be
backwards compatible but I will have to check that. The only problem I see is the need to register an
application in the AzureAD [2]. For now I registered a test application on my account so that I could
work on the libzapojit migration but I would like to know how this should be handled. Judging by the
source code and documentation it is the same with Google accounts.
Anyway I created dummy account backend in the GNOME Online Accounts so I would be able to port libzapojit
and found out that the code in GOA needs very little change. It's mostly about changing URLs.
Vilém
________________________________
Od: Vilém Hořínek <vilem horinek hotmail com>
Odesláno: čtvrtek 31. května 2018 20:03
Komu: Spork Schivago; Debarshi Ray
Kopie: gvfs-list gnome org
Předmět: Re: OneDrive backend
On Mon, May 28, 2018, 12:59 PM Debarshi Ray <rishi is lostca se> wrote:
Hey,
Yes, using libzapojit [1] for the over-the-wire communication is a
good idea. The OneDrive integration in GNOME Documents uses it; it's
quite similar to the libgdata [2] API and is easy to integrate with
GNOME Online Accounts.
That said, I wrote libzapojit six years ago in just about a week and
haven't touched it since (no idea if that's a good or bad thing :/),
and it has managed to keep working as far as GNOME Documents is
concerned. Since then Microsoft seems to have rolled out a newer
version of the API. So you might want to check up on that. I'd
suggest migrating libzapojit to the newer API version before working
on the GVfs backend. Otherwise you might be surprised by Microsoft
killing off the old API - this actually happened while we were working
on the Google Drive backend! Oh, and we really need to add a test
suite!
Other than that, as Ondrej mentioned, the Google Drive backend exposes
some limitations of the GIO abstraction; and we need to rethink the
caching to improve performance but that's a bit tied to the way we
handle multiple files with the same title in the same location. If
OneDrive doesn't allow duplicate titles, then it might have a
significant positive effect on your life. :)
Feel free to ask if you need any help. Good luck!
Happy hacking,
Rishi
[1]
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.gnome.org%2Flibzapojit%2F0.0%2F&data=02%7C01%7C%7Cfb0dc48946dc4bd493b408d6ef1faedd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636959316740286513&sdata=FSkigji6PVImpjdQlYGQQ%2FuUd9%2FKwxKZz%2BI36zWu8X0%3D&reserved=0
[2]
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.gnome.org%2Fgdata%2F0.17%2F&data=02%7C01%7C%7Cfb0dc48946dc4bd493b408d6ef1faedd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636959316740286513&sdata=5MTmWlMWiku3WDcuTuIJxonOo0ul04cmfqdLlGKuFYU%3D&reserved=0
[3]
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpwithnall%2Fuhttpmock&data=02%7C01%7C%7Cfb0dc48946dc4bd493b408d6ef1faedd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636959316740286513&sdata=cn2NQ52dldFEisEpV%2BHFk9zx0ByJJ35655K%2BFccsG64%3D&reserved=0
_______________________________________________
gvfs-list mailing list
gvfs-list gnome org
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.gnome.org%2Fmailman%2Flistinfo%2Fgvfs-list&data=02%7C01%7C%7Cfb0dc48946dc4bd493b408d6ef1faedd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636959316740286513&sdata=5OqhV343s4%2FFkE2PcfnCfLEqKciAH7IEkT5NT4wwgEo%3D&reserved=0
Hello,
I was looking at the source code of libzapojit and I will slowly start migrating it to the new API in the
next couple of days.
Vilém
_______________________________________________
gvfs-list mailing list
gvfs-list gnome org
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.gnome.org%2Fmailman%2Flistinfo%2Fgvfs-list&data=02%7C01%7C%7Cfb0dc48946dc4bd493b408d6ef1faedd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636959316740286513&sdata=5OqhV343s4%2FFkE2PcfnCfLEqKciAH7IEkT5NT4wwgEo%3D&reserved=0
--
Ondrej Holy
Software Engineer, Core Desktop Development
Red Hat Czech s.r.o
--
Ondrej Holy
Software Engineer, Core Desktop Development
Red Hat Czech s.r.o
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]