Re: Fw: OneDrive backend



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





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="">. 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="">
> [2]
https://eur04.safelinks.protection.outlook.com/?url="">
> [3]
https://eur04.safelinks.protection.outlook.com/?url="">
> _______________________________________________
> gvfs-list mailing list
> gvfs-list gnome org
>
https://eur04.safelinks.protection.outlook.com/?url="">
>
>
> 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="">



--
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]