[gnome-online-accounts] google: Add the OAuth2 scope for CardDAV



commit 2c93558da1e85bbf8c17715820344e7eb708f274
Author: Patrick Ohly <patrick ohly intel com>
Date:   Wed Sep 11 16:40:53 2013 +0200

    google: Add the OAuth2 scope for CardDAV
    
    Turns out that the scope for accessing CardDAV needs to be specified
    in the sources too. Having it only in the APIs Console is not enough.
    Otherwise Google rejects access to the CardDAV resources with a 401
    "AuthSub challenge".
    
    As far as we can make out this is undocumented. For some context see:
    9182fb378614abb2ff0245fe71a753f22eaaa906
    
    Fixes: https://bugzilla.gnome.org/707916

 src/goabackend/goagoogleprovider.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index ff85b24..62d2854 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -123,12 +123,15 @@ get_scope (GoaOAuth2Provider *provider)
   return /* Read-only access to the user's email address */
          "https://www.googleapis.com/auth/userinfo.email "
 
-         /* Google Calendar API */
+         /* Google Calendar API (CalDAV and GData) */
          "https://www.googleapis.com/auth/calendar "
 
-         /* Google Contacts API */
+         /* Google Contacts API (GData) */
          "https://www.google.com/m8/feeds/ "
 
+         /* Google Contacts API (CardDAV) - undocumented */
+         "https://www.googleapis.com/auth/carddav "
+
          /* Google Documents List Data API */
          "https://docs.google.com/feeds/ "
          "https://docs.googleusercontent.com/ "
@@ -144,7 +147,7 @@ get_scope (GoaOAuth2Provider *provider)
 static guint
 get_credentials_generation (GoaProvider *provider)
 {
-  return 4;
+  return 5;
 }
 
 static const gchar *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]