[shotwell] Introduce "refresh()" method to authenticator



commit e96362678ca4e8b5650df2fdbfd0e55ee50cb326
Author: Jens Georg <mail jensge org>
Date:   Mon Feb 13 20:50:51 2017 +0100

    Introduce "refresh()" method to authenticator
    
    Signed-off-by: Jens Georg <mail jensge org>

 .../shotwell/FacebookPublishingAuthenticator.vala  |    4 ++++
 .../shotwell/FlickrPublishingAuthenticator.vala    |    4 ++++
 .../shotwell/GoogleAuthenticator.vala              |    4 ++++
 src/plugins/PublishingInterfaces.vala              |    1 +
 4 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala 
b/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala
index 3cab73b..26a2363 100644
--- a/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala
+++ b/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala
@@ -211,6 +211,10 @@ namespace Publishing.Authenticator.Shotwell.Facebook {
             invalidate_persistent_session();
         }
 
+        public void refresh() {
+            // No-Op with Flickr
+        }
+
         /* Private functions */
         private bool is_persistent_session_valid() {
             string? token = get_persistent_access_token();
diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala 
b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
index 850be72..e389908 100644
--- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
+++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
@@ -340,6 +340,10 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
             invalidate_persistent_session();
         }
 
+        public void refresh() {
+            // No-Op with flickr
+        }
+
         private void do_show_login_welcome_pane() {
             debug("ACTION: installing login welcome pane");
 
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.vala 
b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
index 97661c4..5b884c8 100644
--- a/plugins/authenticator/shotwell/GoogleAuthenticator.vala
+++ b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
@@ -133,6 +133,10 @@ namespace Publishing.Authenticator.Shotwell.Google {
             host.set_config_string("refresh_token", "");
         }
 
+        public void refresh() {
+            // TODO: Needs to re-auth
+        }
+
         private void do_hosted_web_authentication() {
             debug("ACTION: running OAuth authentication flow in hosted web pane.");
 
diff --git a/src/plugins/PublishingInterfaces.vala b/src/plugins/PublishingInterfaces.vala
index 1eed3de..6518142 100644
--- a/src/plugins/PublishingInterfaces.vala
+++ b/src/plugins/PublishingInterfaces.vala
@@ -615,6 +615,7 @@ public interface Authenticator : Object {
     public abstract void authenticate();
     public abstract bool can_logout();
     public abstract void logout();
+    public abstract void refresh();
 
     public abstract GLib.HashTable<string, Variant> get_authentication_parameter();
 }


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