GNOME Bugzilla – Bug 685289
GOA now uses OAuth 2.0 for Calendar, Contacts and Documents
Last modified: 2012-10-21 11:00:44 UTC
For GNOME 3.8, we have migrated GOA to use OAuth 2.0. GDataGoaAuthorizer should now look for and use the OAuth2 tokens. See bug 661065
Created attachment 225590 [details] [review] Sample patch Something like this is needed. I don't know whether the existing parameters in gdata_goa_authorizer_get_parameters need to be changed or not. Wouldn't claim authorship as this is completely untested.
(In reply to comment #1) > Created an attachment (id=225590) [details] [review] > Sample patch > > Something like this is needed. I don't know whether the existing parameters in > gdata_goa_authorizer_get_parameters need to be changed or not. > > Wouldn't claim authorship as this is completely untested. Would it be possible to check for OAuth 2.0 support in GOA and fall back to OAuth 1 if it’s missing at runtime?
You can check if the GoaObject implements the .OAuth2Based or the .OAuthBased interface and behave accordingly.
Turns out Matthew did all my work for me. Yay! commit 811ccbefe1b711a29763700a2bbb5b54b06384d5 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sun Oct 21 11:54:56 2012 +0100 core: Add support for OAuth 2.0 to the GOA authoriser This is based very heavily on work by Matthew Barnes <mbarnes@redhat.com> for EDS’ EGDataGoaAuthorizer: • http://git.gnome.org/browse/evolution-data-server/commit/addressbook/backends/google/e-gdata-goa-authorizer.c?id=f23f88b2b5e4662730bada1797378fbddfe7ddfa • http://git.gnome.org/browse/evolution-data-server/commit/addressbook/backends/google/e-gdata-goa-authorizer.c?id=870bcc9eced87f74807cfeacb16f995a797eb277 As he mentions, this hasn’t been tested against GOA 3.7 yet, so may well not work. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=685289 gdata/gdata-goa-authorizer.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 12 deletions(-)