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



commit 984113b4ced9504a3889e0ed7e9b90ba4dd958f3
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 9b2b4ea..ab2294b 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]