[gnome-online-accounts] oauth, oauth2: Remove unused get_authentication_cookie virtual method



commit caaded2bacb6425a28889d42fa70d5d560e9e767
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jun 12 20:07:40 2017 +0200

    oauth, oauth2: Remove unused get_authentication_cookie virtual method
    
    The get_authentication_cookie virtual methods has been unused since
    commits 308c7f92b373243e53908a1eff9bd02ef2c18abf and commit
    96911fcb72655391f1baa7054ad82325cbc086b8. It's been a while, and it is
    a relief to not have to rely on such undocumented behaviour of the web
    UI.

 doc/goa-sections.txt                    |    2 --
 src/goabackend/goafacebookprovider.c    |    7 -------
 src/goabackend/goaflickrprovider.c      |    7 -------
 src/goabackend/goafoursquareprovider.c  |    7 -------
 src/goabackend/goagoogleprovider.c      |    7 -------
 src/goabackend/goaoauth2provider-priv.h |    2 --
 src/goabackend/goaoauth2provider.c      |   20 --------------------
 src/goabackend/goaoauth2provider.h      |    1 -
 src/goabackend/goaoauthprovider.c       |   20 --------------------
 src/goabackend/goaoauthprovider.h       |    3 ---
 src/goabackend/goapocketprovider.c      |    7 -------
 src/goabackend/goawindowsliveprovider.c |    7 -------
 12 files changed, 0 insertions(+), 90 deletions(-)
---
diff --git a/doc/goa-sections.txt b/doc/goa-sections.txt
index 057e68c..7369aee 100644
--- a/doc/goa-sections.txt
+++ b/doc/goa-sections.txt
@@ -463,7 +463,6 @@ goa_provider_get_type
 <FILE>goaoauth2provider</FILE>
 GoaOAuth2Provider
 GoaOAuth2ProviderClass
-goa_oauth2_provider_get_authentication_cookie
 goa_oauth2_provider_get_authorization_uri
 goa_oauth2_provider_get_token_uri
 goa_oauth2_provider_get_redirect_uri
@@ -494,7 +493,6 @@ goa_oauth2_provider_get_type
 <FILE>goaoauthprovider</FILE>
 GoaOAuthProvider
 GoaOAuthProviderClass
-goa_oauth_provider_get_authentication_cookie
 goa_oauth_provider_get_request_uri
 goa_oauth_provider_get_request_uri_params
 goa_oauth_provider_get_authorization_uri
diff --git a/src/goabackend/goafacebookprovider.c b/src/goabackend/goafacebookprovider.c
index de74817..208d839 100644
--- a/src/goabackend/goafacebookprovider.c
+++ b/src/goabackend/goafacebookprovider.c
@@ -139,12 +139,6 @@ get_client_secret (GoaOAuth2Provider *oauth2_provider)
   return NULL;
 }
 
-static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
-{
-  return "c_user";
-}
-
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
@@ -374,7 +368,6 @@ goa_facebook_provider_class_init (GoaFacebookProviderClass *klass)
   oauth2_class->get_scope                = get_scope;
   oauth2_class->get_client_id            = get_client_id;
   oauth2_class->get_client_secret        = get_client_secret;
-  oauth2_class->get_authentication_cookie = get_authentication_cookie;
   oauth2_class->get_identity_sync        = get_identity_sync;
   oauth2_class->is_identity_node         = is_identity_node;
   oauth2_class->add_account_key_values   = add_account_key_values;
diff --git a/src/goabackend/goaflickrprovider.c b/src/goabackend/goaflickrprovider.c
index a61c0d9..0f2ab53 100644
--- a/src/goabackend/goaflickrprovider.c
+++ b/src/goabackend/goaflickrprovider.c
@@ -103,12 +103,6 @@ get_callback_uri (GoaOAuthProvider *oauth_provider)
   return "https://www.gnome.org/goa-1.0/oauth";;
 }
 
-static const gchar *
-get_authentication_cookie (GoaOAuthProvider *oauth_provider)
-{
-  return "cookie_session";
-}
-
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
@@ -374,7 +368,6 @@ goa_flickr_provider_class_init (GoaFlickrProviderClass *klass)
   oauth_class->get_authorization_uri    = get_authorization_uri;
   oauth_class->get_token_uri            = get_token_uri;
   oauth_class->get_callback_uri         = get_callback_uri;
-  oauth_class->get_authentication_cookie = get_authentication_cookie;
   oauth_class->parse_request_token_error = parse_request_token_error;
   oauth_class->add_account_key_values    = add_account_key_values;
 }
diff --git a/src/goabackend/goafoursquareprovider.c b/src/goabackend/goafoursquareprovider.c
index a4191ce..43f2b24 100644
--- a/src/goabackend/goafoursquareprovider.c
+++ b/src/goabackend/goafoursquareprovider.c
@@ -123,12 +123,6 @@ get_client_secret (GoaOAuth2Provider *oauth2_provider)
   return NULL;
 }
 
-static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
-{
-  return "bbhive";
-}
-
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
@@ -377,7 +371,6 @@ goa_foursquare_provider_class_init (GoaFoursquareProviderClass *klass)
   oauth2_class->get_client_id            = get_client_id;
   oauth2_class->get_client_secret        = get_client_secret;
   oauth2_class->get_use_mobile_browser   = get_use_mobile_browser;
-  oauth2_class->get_authentication_cookie = get_authentication_cookie;
   oauth2_class->get_identity_sync        = get_identity_sync;
   oauth2_class->is_identity_node         = is_identity_node;
   oauth2_class->add_account_key_values   = add_account_key_values;
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 23c7030..0a1b610 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -164,12 +164,6 @@ get_client_secret (GoaOAuth2Provider *oauth2_provider)
   return GOA_GOOGLE_CLIENT_SECRET;
 }
 
-static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
-{
-  return "LSID";
-}
-
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
@@ -478,7 +472,6 @@ goa_google_provider_class_init (GoaGoogleProviderClass *klass)
   provider_class->get_credentials_generation = get_credentials_generation;
 
   oauth2_class = GOA_OAUTH2_PROVIDER_CLASS (klass);
-  oauth2_class->get_authentication_cookie = get_authentication_cookie;
   oauth2_class->get_authorization_uri     = get_authorization_uri;
   oauth2_class->get_client_id             = get_client_id;
   oauth2_class->get_client_secret         = get_client_secret;
diff --git a/src/goabackend/goaoauth2provider-priv.h b/src/goabackend/goaoauth2provider-priv.h
index b69ba14..ba052fb 100644
--- a/src/goabackend/goaoauth2provider-priv.h
+++ b/src/goabackend/goaoauth2provider-priv.h
@@ -47,7 +47,6 @@ G_BEGIN_DECLS
  * @get_scope: Virtual function for goa_oauth2_provider_get_scope().
  * @get_client_id: Virtual function for goa_oauth2_provider_get_client_id().
  * @get_client_secret: Virtual function for goa_oauth2_provider_get_client_secret().
- * @get_authentication_cookie: Virtual function for goa_oauth2_provider_get_authentication_cookie().
  * @get_identity_sync: Virtual function for goa_oauth2_provider_get_identity_sync().
  * @build_authorization_uri: Virtual function for goa_oauth2_provider_build_authorization_uri().
  * @get_use_mobile_browser: Virtual function for goa_oauth2_provider_get_use_mobile_browser().
@@ -69,7 +68,6 @@ struct _GoaOAuth2ProviderClass
   const gchar *(*get_redirect_uri)             (GoaOAuth2Provider            *provider);
   const gchar *(*get_client_id)                (GoaOAuth2Provider            *provider);
   const gchar *(*get_client_secret)            (GoaOAuth2Provider            *provider);
-  const gchar *(*get_authentication_cookie)    (GoaOAuth2Provider            *provider);
   gchar       *(*get_identity_sync)            (GoaOAuth2Provider            *provider,
                                                 const gchar                  *access_token,
                                                 gchar                       **out_presentation_identity,
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index 20adff8..564ba64 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -512,26 +512,6 @@ goa_oauth2_provider_get_client_secret (GoaOAuth2Provider *self)
 }
 
 /**
- * goa_oauth2_provider_get_authentication_cookie:
- * @self: A #GoaOAuth2Provider.
- *
- * Gets the name of a cookie whose presence indicates that the user has been able to
- * log in during the authorization step. This is used to modify the embedded web
- * browser UI that is presented to the user.
- *
- * This is a pure virtual method - a subclass must provide an
- * implementation.
- *
- * Returns: (transfer none): A string owned by @self - do not free.
- */
-const gchar *
-goa_oauth2_provider_get_authentication_cookie (GoaOAuth2Provider *self)
-{
-  g_return_val_if_fail (GOA_IS_OAUTH2_PROVIDER (self), NULL);
-  return GOA_OAUTH2_PROVIDER_GET_CLASS (self)->get_authentication_cookie (self);
-}
-
-/**
  * goa_oauth2_provider_get_identity_sync:
  * @self: A #GoaOAuth2Provider.
  * @access_token: A valid OAuth 2.0 access token.
diff --git a/src/goabackend/goaoauth2provider.h b/src/goabackend/goaoauth2provider.h
index 99ae94d..76bc78f 100644
--- a/src/goabackend/goaoauth2provider.h
+++ b/src/goabackend/goaoauth2provider.h
@@ -41,7 +41,6 @@ const gchar *goa_oauth2_provider_get_redirect_uri             (GoaOAuth2Provider
 const gchar *goa_oauth2_provider_get_scope                    (GoaOAuth2Provider             *provider);
 const gchar *goa_oauth2_provider_get_client_id                (GoaOAuth2Provider             *provider);
 const gchar *goa_oauth2_provider_get_client_secret            (GoaOAuth2Provider             *provider);
-const gchar *goa_oauth2_provider_get_authentication_cookie    (GoaOAuth2Provider             *provider);
 gchar       *goa_oauth2_provider_get_identity_sync            (GoaOAuth2Provider             *provider,
                                                                const gchar              *access_token,
                                                                gchar                   
**out_presentation_identity,
diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c
index 19b2eb6..08b998e 100644
--- a/src/goabackend/goaoauthprovider.c
+++ b/src/goabackend/goaoauthprovider.c
@@ -397,26 +397,6 @@ goa_oauth_provider_get_callback_uri (GoaOAuthProvider *provider)
 }
 
 /**
- * goa_oauth_provider_get_authentication_cookie:
- * @provider: A #GoaOAuthProvider.
- *
- * Gets the name of a cookie whose presence indicates that the user has been able to
- * log in during the authorization step. This is used to modify the embedded web
- * browser UI that is presented to the user.
- *
- * This is a pure virtual method - a subclass must provide an
- * implementation.
- *
- * Returns: (transfer none): A string owned by @provider - do not free.
- */
-const gchar *
-goa_oauth_provider_get_authentication_cookie (GoaOAuthProvider *provider)
-{
-  g_return_val_if_fail (GOA_IS_OAUTH_PROVIDER (provider), NULL);
-  return GOA_OAUTH_PROVIDER_GET_CLASS (provider)->get_authentication_cookie (provider);
-}
-
-/**
  * goa_oauth_provider_get_identity_sync:
  * @provider: A #GoaOAuthProvider.
  * @access_token: A valid OAuth 1.0 access token.
diff --git a/src/goabackend/goaoauthprovider.h b/src/goabackend/goaoauthprovider.h
index ab788ea..e5b4458 100644
--- a/src/goabackend/goaoauthprovider.h
+++ b/src/goabackend/goaoauthprovider.h
@@ -49,7 +49,6 @@ G_DECLARE_DERIVABLE_TYPE (GoaOAuthProvider, goa_oauth_provider, GOA, OAUTH_PROVI
  * @get_authorization_uri: Virtual function for goa_oauth_provider_get_authorization_uri().
  * @get_token_uri: Virtual function for goa_oauth_provider_get_token_uri().
  * @get_callback_uri: Virtual function for goa_oauth_provider_get_callback_uri().
- * @get_authentication_cookie: Virtual function for goa_oauth_provider_get_authentication_cookie().
  * @get_identity_sync: Virtual function for goa_oauth_provider_get_identity_sync().
  * @parse_request_token_error: Virtual function for goa_oauth_provider_parse_request_token_error().
  * @build_authorization_uri: Virtual function for goa_oauth_provider_build_authorization_uri().
@@ -73,7 +72,6 @@ struct _GoaOAuthProviderClass
   const gchar *(*get_authorization_uri)        (GoaOAuthProvider             *provider);
   const gchar *(*get_token_uri)                (GoaOAuthProvider             *provider);
   const gchar *(*get_callback_uri)             (GoaOAuthProvider             *provider);
-  const gchar *(*get_authentication_cookie)    (GoaOAuthProvider             *provider);
 
   gchar       *(*get_identity_sync)            (GoaOAuthProvider             *provider,
                                                 const gchar                  *access_token,
@@ -115,7 +113,6 @@ gchar      **goa_oauth_provider_get_request_uri_params       (GoaOAuthProvider
 const gchar *goa_oauth_provider_get_authorization_uri        (GoaOAuthProvider             *provider);
 const gchar *goa_oauth_provider_get_token_uri                (GoaOAuthProvider             *provider);
 const gchar *goa_oauth_provider_get_callback_uri             (GoaOAuthProvider             *provider);
-const gchar *goa_oauth_provider_get_authentication_cookie    (GoaOAuthProvider             *provider);
 gchar       *goa_oauth_provider_get_identity_sync            (GoaOAuthProvider          *provider,
                                                               const gchar               *access_token,
                                                               const gchar               *access_token_secret,
diff --git a/src/goabackend/goapocketprovider.c b/src/goabackend/goapocketprovider.c
index f0e41b0..8e88ca8 100644
--- a/src/goabackend/goapocketprovider.c
+++ b/src/goabackend/goapocketprovider.c
@@ -259,12 +259,6 @@ out:
   return ret;
 }
 
-static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
-{
-  return NULL;
-}
-
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
@@ -445,5 +439,4 @@ goa_pocket_provider_class_init (GoaPocketProviderClass *klass)
   oauth2_class->is_identity_node          = is_identity_node;
   oauth2_class->add_account_key_values    = add_account_key_values;
   oauth2_class->process_redirect_url      = process_redirect_url;
-  oauth2_class->get_authentication_cookie = get_authentication_cookie;
 }
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 981e825..5ee7112 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -123,12 +123,6 @@ get_client_secret (GoaOAuth2Provider *oauth2_provider)
   return NULL;
 }
 
-static const gchar *
-get_authentication_cookie (GoaOAuth2Provider *oauth2_provider)
-{
-  return "PPAuth";
-}
-
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gchar *
@@ -383,7 +377,6 @@ goa_windows_live_provider_class_init (GoaWindowsLiveProviderClass *klass)
   oauth2_class->get_scope                = get_scope;
   oauth2_class->get_client_id            = get_client_id;
   oauth2_class->get_client_secret        = get_client_secret;
-  oauth2_class->get_authentication_cookie = get_authentication_cookie;
   oauth2_class->get_identity_sync        = get_identity_sync;
   oauth2_class->is_identity_node         = is_identity_node;
   oauth2_class->add_account_key_values   = add_account_key_values;


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