[shotwell] Update Google API keys
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Update Google API keys
- Date: Sat, 25 Feb 2017 21:20:42 +0000 (UTC)
commit dca35c362b741c1379676c2e1c7099d39e4d1755
Author: Jens Georg <mail jensge org>
Date: Sat Feb 11 22:28:47 2017 +0100
Update Google API keys
Old API keys were not activated for YouTube Data API v3 uploading.
Signed-off-by: Jens Georg <mail jensge org>
.../shotwell/GoogleAuthenticator.vala | 19 ++++++++-----------
plugins/shotwell-publishing/YouTubePublishing.vala | 2 +-
2 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.vala
b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
index 9b40ad4..6d9dd19 100644
--- a/plugins/authenticator/shotwell/GoogleAuthenticator.vala
+++ b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
@@ -2,8 +2,8 @@ using Shotwell;
using Shotwell.Plugins;
namespace Publishing.Authenticator.Shotwell.Google {
- private const string OAUTH_CLIENT_ID =
"1073902228337-gm4uf5etk25s0hnnm0g7uv2tm2bm1j0b.apps.googleusercontent.com";
- private const string OAUTH_CLIENT_SECRET = "_kA4RZz72xqed4DqfO7xMmMN";
+ private const string OAUTH_CLIENT_ID =
"534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav67.apps.googleusercontent.com";
+ private const string OAUTH_CLIENT_SECRET = "pwpzZ7W1TCcD5uIfYCu8sM7x";
private class WebAuthenticationPane : Common.WebAuthenticationPane {
public static bool cache_dirty = false;
@@ -340,7 +340,7 @@ namespace Publishing.Authenticator.Shotwell.Google {
try {
txn.execute();
} catch (Spit.Publishing.PublishingError err) {
- host.post_error(err);
+ host.post_error(err);
}
}
@@ -366,15 +366,12 @@ namespace Publishing.Authenticator.Shotwell.Google {
if (session.is_authenticated()) // ignore these events if the session is already auth'd
return;
-
- // 400 errors indicate that the OAuth client ID and secret have become invalid. In most
- // cases, this can be fixed by logging the user out
-#if 0
- if (txn.get_status_code() == 400) {
- do_logout();
- return;
+ if (txn.get_status_code() == Soup.Status.BAD_REQUEST ||
+ txn.get_status_code() == Soup.Status.UNAUTHORIZED) {
+ // Refresh token invalid, starting over
+ host.set_config_string("refresh_token", "");
+ Idle.add (() => { this.authenticate(); return false; });
}
-#endif
host.post_error(err);
}
diff --git a/plugins/shotwell-publishing/YouTubePublishing.vala
b/plugins/shotwell-publishing/YouTubePublishing.vala
index 425d262..0997f20 100644
--- a/plugins/shotwell-publishing/YouTubePublishing.vala
+++ b/plugins/shotwell-publishing/YouTubePublishing.vala
@@ -55,7 +55,7 @@ public class YouTubeService : Object, Spit.Pluggable, Spit.Publishing.Service {
namespace Publishing.YouTube {
private const string DEVELOPER_KEY =
- "AI39si5VEpzWK0z-pzo4fonEj9E4driCpEs9lK8y3HJsbbebIIRWqW3bIyGr42bjQv-N3siAfqVoM8XNmtbbp5x2gpbjiSAMTQ";
+ "AIzaSyB6hLnm0n5j8Y6Bkvh9bz3i8ADM2bJdYeY";
private enum PrivacySetting {
PUBLIC,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]