summaryrefslogtreecommitdiff
path: root/plugins/authenticator/shotwell
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-04-28 16:46:41 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-04-28 16:46:41 +0200
commit6d3354ff2e7ce13feeae1b75d94a186d86f82d89 (patch)
tree2d908584bfb663268004e19a23e02ce6c65034c5 /plugins/authenticator/shotwell
parent6dd5e6966c6ec10d38d4b620a053ae262ac60d86 (diff)
parent7385922cd37e4ffe65f4af34b2795307a76670c4 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'plugins/authenticator/shotwell')
-rw-r--r--plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala6
-rw-r--r--plugins/authenticator/shotwell/GoogleAuthenticator.vala3
-rw-r--r--plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala9
3 files changed, 10 insertions, 8 deletions
diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
index 97629ed..5188ed6 100644
--- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
+++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
@@ -15,6 +15,7 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
internal const string SERVICE_WELCOME_MESSAGE =
_("You are not currently logged into Flickr.\n\nClick Log in to log into Flickr in your Web browser. You will have to authorize Shotwell Connect to link to your Flickr account.");
+ internal const string SERVICE_DISCLAIMER = "<b>This product uses the Flickr API but is not endorsed or certified by SmugMug, Inc.</b>";
internal class AuthenticationRequestTransaction : Publishing.RESTSupport.OAuth1.Transaction {
public AuthenticationRequestTransaction(Publishing.RESTSupport.OAuth1.Session session) {
@@ -55,7 +56,8 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
public override void on_page_load() {
var uri = new Soup.URI(get_view().get_uri());
if (uri.scheme == "shotwell-auth" && this.auth_code == null) {
- this.error();
+ var form_data = Soup.Form.decode (uri.query);
+ this.auth_code = form_data.lookup("oauth_verifier");
}
if (this.auth_code != null) {
@@ -108,7 +110,7 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
debug("ACTION: installing login welcome pane");
host.set_service_locked(false);
- host.install_welcome_pane(SERVICE_WELCOME_MESSAGE, on_welcome_pane_login_clicked);
+ host.install_welcome_pane("%s\n\n%s".printf(SERVICE_WELCOME_MESSAGE, SERVICE_DISCLAIMER), on_welcome_pane_login_clicked);
}
private void on_welcome_pane_login_clicked() {
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.vala b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
index f561197..75d8f37 100644
--- a/plugins/authenticator/shotwell/GoogleAuthenticator.vala
+++ b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
@@ -23,7 +23,8 @@ namespace Publishing.Authenticator.Shotwell.Google {
public override void on_page_load() {
var uri = new Soup.URI(get_view().get_uri());
if (uri.scheme == REVERSE_CLIENT_ID && this.auth_code == null) {
- this.error();
+ var form_data = Soup.Form.decode (uri.query);
+ this.auth_code = form_data.lookup("code");
}
if (this.auth_code != null) {
diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
index 0d813ac..36fb290 100644
--- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
+++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
@@ -14,9 +14,9 @@ namespace Publishing.Authenticator {
var list = new Gee.ArrayList<string>();
list.add("flickr");
list.add("facebook");
- list.add("picasa");
list.add("youtube");
list.add("tumblr");
+ list.add("google-photos");
return list;
}
@@ -28,14 +28,13 @@ namespace Publishing.Authenticator {
return new Shotwell.Flickr.Flickr(host);
case "facebook":
return new Shotwell.Facebook.Facebook(host);
- case "picasa":
- return new Shotwell.Google.Google("https://picasaweb.google.com/data/", _("You are not currently logged into Picasa Web Albums.\n\nClick Log in to log into Picasa Web Albums in your Web browser. You will have to authorize Shotwell Connect to link to your Picasa Web Albums account."), host);
-
case "youtube":
return new Shotwell.Google.Google("https://gdata.youtube.com/", _("You are not currently logged into YouTube.\n\nYou must have already signed up for a Google account and set it up for use with YouTube to continue. You can set up most accounts by using your browser to log into the YouTube site at least once."), host);
case "tumblr":
return new Shotwell.Tumblr.Tumblr(host);
- default:
+ case "google-photos":
+ return new Shotwell.Google.Google("https://www.googleapis.com/auth/photoslibrary", _("You are not currently logged into Google Photos.\n\nYou must have already signed up for a Google account and set it up for use with Google Photos.\n\nYou will have to authorize Shotwell to link to your Google Photos account."), host);
+ default:
return null;
}
}