GNOME Bugzilla – Bug 656976
Merge eds and GNOME Documents GOA authorisers
Last modified: 2012-07-16 20:13:12 UTC
Once the 3.2 cycle is complete, the GOA-powered eds GDataAuthorizer should be fairly stable (and GOA should be API-stable), so we can safely move the authorisers from eds and GNOME Documents (which maintains a copy of it) into libgdata under the --enable-gnome configure flag.
Matthew, Cosimo, I’m looking at moving the GOA authoriser implementation from EDS into libgdata (since the EDS implementation has had some threading fixes compared to the GNOME Documents version). Hopefully it can then appear in the 0.13.1 release for GNOME 3.6. The EDS code is licenced under LGPL v2 or v3, but libgdata is LGPL v2.1+. Matthew, is it OK to relicence the code (e-gdata-goa-authorizer.[ch])? Apart from that, is there anything else I need to know/do before moving the GOA authoriser into libgdata? Any big changes which need making to it?
The only change I had planned for it was to use g_compute_hmac_for_string() instead of oauth_sign_hmac_sha1() as part of dropping our liboauth dependency. HMAC support in GLib is fairly recent -- wasn't there yet when I first wrote the authorizer. I have no problem with relicencing the code, really as long as it stays LGPL it's all the same to me. And I'm happy to hand it off for someone else to maintain. :)
Looking through the code, I notice this may need to be dealt with: /* XXX We would need to generalize this to make the class * reusable for other service types, probably by adding * a "service-type" constructor property. */ service_type = GDATA_TYPE_CONTACTS_SERVICE; domains = gdata_service_get_authorization_domains (service_type); Don't know if the Documents version implements this as suggested or simply changes the hard-coded service type to something else.
Done and pushed to master. I changed it to query the GoaObject's capabilities to find out which services to use, which I think should work. I removed use of the liboauth HMAC function in favour of GLib’s version. commit 56a39743779f63791e27886aaa3a9338602406f3 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Mon Jul 16 21:08:00 2012 +0100 Bug 656976 — Merge eds and GNOME Documents GOA authorisers Copy the GOA authoriser from EDS into libgdata, modifying it a bit to add support for non-Contacts services and remove use of the liboauth HMAC function in favour of GLib’s implementation. This is essentially the same code as used by GNOME Documents. Originally written by Matthew Barnes. He’s given permission for it to be relicenced from LGPL v2 or v3 to LGPL v2.1+. (See the bug report.) This adds the following API: • GDataGoaAuthorizer This is currently untested; waiting to port EDS and GNOME Documents to it to test it. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=656976 Makefile.am | 20 ++- configure.ac | 13 +- docs/reference/gdata-docs.xml | 4 + docs/reference/gdata-sections.txt | 20 ++ gdata/gdata-goa-authorizer.c | 543 +++++++++++++++++++++++++++++++++++++ gdata/gdata-goa-authorizer.h | 70 +++++ gdata/gdata.h | 4 + gdata/gdata.symbols | 3 + gdata/tests/Makefile.am | 6 +- libgdata.pc.in | 2 +- 10 files changed, 678 insertions(+), 7 deletions(-)