After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685289 - GOA now uses OAuth 2.0 for Calendar, Contacts and Documents
GOA now uses OAuth 2.0 for Calendar, Contacts and Documents
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: libgdata-maint
libgdata-maint
Depends on: 661065
Blocks:
 
 
Reported: 2012-10-02 13:51 UTC by Debarshi Ray
Modified: 2012-10-21 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample patch (1.72 KB, patch)
2012-10-02 13:55 UTC, Debarshi Ray
none Details | Review

Description Debarshi Ray 2012-10-02 13:51:38 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
Comment 1 Debarshi Ray 2012-10-02 13:55:54 UTC
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.
Comment 2 Philip Withnall 2012-10-04 16:55:10 UTC
(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?
Comment 3 Debarshi Ray 2012-10-06 14:49:45 UTC
You can check if the GoaObject implements the .OAuth2Based or the .OAuthBased interface and behave accordingly.
Comment 4 Philip Withnall 2012-10-21 11:00:44 UTC
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=f23f88b2b5e4662730bada1797378fbddfe7ddfahttp://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(-)