Merge lp:~mardy/account-plugins/usernames-1565772 into lp:account-plugins
- usernames-1565772
- Merge into trunk
Proposed by
Alberto Mardegan
Status: | Merged |
---|---|
Approved by: | David Barth |
Approved revision: | 160 |
Merged at revision: | 156 |
Proposed branch: | lp:~mardy/account-plugins/usernames-1565772 |
Merge into: | lp:account-plugins |
Diff against target: |
540 lines (+279/-29) 21 files modified
.bzrignore (+5/-0) Makefile.am (+26/-6) configure.ac (+4/-1) data/providers/facebook.provider.in.in (+1/-1) data/providers/flickr.provider.in.in (+1/-1) data/providers/twitter.provider.in.in (+1/-1) data/webkit-options/api.twitter.com.conf (+0/-2) data/webkit-options/login.yahoo.com.conf (+0/-2) data/webkit-options/www.facebook.com.conf (+0/-7) debian/account-plugin-facebook.install (+0/-1) debian/account-plugin-flickr.install (+0/-1) debian/account-plugin-twitter.install (+0/-1) debian/changelog (+15/-0) debian/control (+27/-4) debian/libaccount-plugin-facebook.install (+1/-0) debian/libaccount-plugin-flickr.install (+1/-0) debian/libaccount-plugin-twitter.install (+1/-0) src/facebook.vala (+69/-0) src/flickr.vala (+41/-0) src/google.vala (+40/-1) src/twitter.vala (+46/-0) |
To merge this branch: | bzr merge lp:~mardy/account-plugins/usernames-1565772 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Online Accounts | Pending | ||
Review via email: mp+290970@code.launchpad.net |
Commit message
Retrieve usernames in Facebook, Flickr, Google and Twitter plugins
Use the new APIs in libaccount-plugin to override the query_username() method; remove the unneeded webkit-options files from some account providers.
Description of the change
Retrieve usernames in Facebook, Flickr, Google and Twitter plugins
Use the new APIs in libaccount-plugin to override the query_username() method; remove the unneeded webkit-options files from some account providers.
To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Needs Fixing
(continuous-integration)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2013-03-19 08:52:34 +0000 | |||
3 | +++ .bzrignore 2016-04-05 11:21:38 +0000 | |||
4 | @@ -6,6 +6,7 @@ | |||
5 | 6 | *.service | 6 | *.service |
6 | 7 | *.substvars | 7 | *.substvars |
7 | 8 | *.stamp | 8 | *.stamp |
8 | 9 | *.trs | ||
9 | 9 | INSTALL | 10 | INSTALL |
10 | 10 | Makefile | 11 | Makefile |
11 | 11 | Makefile.in | 12 | Makefile.in |
12 | @@ -50,7 +51,11 @@ | |||
13 | 50 | .deps | 51 | .deps |
14 | 51 | .dirstamp | 52 | .dirstamp |
15 | 52 | .libs | 53 | .libs |
16 | 54 | /src/facebook.c | ||
17 | 55 | /src/flickr.c | ||
18 | 53 | /src/generic-oauth.c | 56 | /src/generic-oauth.c |
19 | 54 | /src/google.c | 57 | /src/google.c |
20 | 58 | /src/twitter.c | ||
21 | 59 | /test-driver | ||
22 | 55 | /test-provider | 60 | /test-provider |
23 | 56 | /test-service | 61 | /test-service |
24 | 57 | 62 | ||
25 | === modified file 'Makefile.am' | |||
26 | --- Makefile.am 2015-04-17 08:53:11 +0000 | |||
27 | +++ Makefile.am 2016-04-05 11:21:38 +0000 | |||
28 | @@ -8,8 +8,11 @@ | |||
29 | 8 | if ENABLE_LIBACCOUNT_PLUGIN | 8 | if ENABLE_LIBACCOUNT_PLUGIN |
30 | 9 | # Binary account plugins. | 9 | # Binary account plugins. |
31 | 10 | plugin_LTLIBRARIES = \ | 10 | plugin_LTLIBRARIES = \ |
32 | 11 | libfacebook.la \ | ||
33 | 12 | libflickr.la \ | ||
34 | 11 | libgeneric-oauth.la \ | 13 | libgeneric-oauth.la \ |
36 | 12 | libgoogle.la | 14 | libgoogle.la \ |
37 | 15 | libtwitter.la | ||
38 | 13 | 16 | ||
39 | 14 | VALAFLAGS = \ | 17 | VALAFLAGS = \ |
40 | 15 | --vapidir $(top_srcdir)/src \ | 18 | --vapidir $(top_srcdir)/src \ |
41 | @@ -36,12 +39,32 @@ | |||
42 | 36 | -no-undefined \ | 39 | -no-undefined \ |
43 | 37 | -export-symbols-regex '^ap_module_get_object_type' | 40 | -export-symbols-regex '^ap_module_get_object_type' |
44 | 38 | 41 | ||
47 | 39 | libgoogle_la_CPPFLAGS = $(plugin_cppflags) | 42 | libfacebook_la_CPPFLAGS = $(plugin_cppflags) $(RESTAPIS_CFLAGS) |
48 | 40 | libgoogle_la_LIBADD = $(plugin_libadd) | 43 | libfacebook_la_LIBADD = $(plugin_libadd) $(RESTAPIS_LIBS) |
49 | 44 | libfacebook_la_LDFLAGS = $(plugin_ldflags) | ||
50 | 45 | libfacebook_la_VALAFLAGS = --pkg libsoup-2.4 --pkg json-glib-1.0 | ||
51 | 46 | libfacebook_la_SOURCES = \ | ||
52 | 47 | src/facebook.vala | ||
53 | 48 | |||
54 | 49 | libflickr_la_CPPFLAGS = $(plugin_cppflags) | ||
55 | 50 | libflickr_la_LIBADD = $(plugin_libadd) | ||
56 | 51 | libflickr_la_LDFLAGS = $(plugin_ldflags) | ||
57 | 52 | libflickr_la_SOURCES = \ | ||
58 | 53 | src/flickr.vala | ||
59 | 54 | |||
60 | 55 | libgoogle_la_CPPFLAGS = $(plugin_cppflags) $(RESTAPIS_CFLAGS) | ||
61 | 56 | libgoogle_la_LIBADD = $(plugin_libadd) $(RESTAPIS_LIBS) | ||
62 | 41 | libgoogle_la_LDFLAGS = $(plugin_ldflags) | 57 | libgoogle_la_LDFLAGS = $(plugin_ldflags) |
63 | 58 | libgoogle_la_VALAFLAGS = --pkg libsoup-2.4 --pkg json-glib-1.0 | ||
64 | 42 | libgoogle_la_SOURCES = \ | 59 | libgoogle_la_SOURCES = \ |
65 | 43 | src/google.vala | 60 | src/google.vala |
66 | 44 | 61 | ||
67 | 62 | libtwitter_la_CPPFLAGS = $(plugin_cppflags) | ||
68 | 63 | libtwitter_la_LIBADD = $(plugin_libadd) | ||
69 | 64 | libtwitter_la_LDFLAGS = $(plugin_ldflags) | ||
70 | 65 | libtwitter_la_SOURCES = \ | ||
71 | 66 | src/twitter.vala | ||
72 | 67 | |||
73 | 45 | libgeneric_oauth_la_CPPFLAGS = $(plugin_cppflags) | 68 | libgeneric_oauth_la_CPPFLAGS = $(plugin_cppflags) |
74 | 46 | libgeneric_oauth_la_LIBADD = $(plugin_libadd) | 69 | libgeneric_oauth_la_LIBADD = $(plugin_libadd) |
75 | 47 | libgeneric_oauth_la_LDFLAGS = $(plugin_ldflags) | 70 | libgeneric_oauth_la_LDFLAGS = $(plugin_ldflags) |
76 | @@ -104,12 +127,9 @@ | |||
77 | 104 | data/webkit-options/api.instagram.com.conf \ | 127 | data/webkit-options/api.instagram.com.conf \ |
78 | 105 | data/webkit-options/api.weibo.com.conf \ | 128 | data/webkit-options/api.weibo.com.conf \ |
79 | 106 | data/webkit-options/api.t.sohu.com.conf \ | 129 | data/webkit-options/api.t.sohu.com.conf \ |
80 | 107 | data/webkit-options/api.twitter.com.conf \ | ||
81 | 108 | data/webkit-options/foursquare.com.conf \ | 130 | data/webkit-options/foursquare.com.conf \ |
82 | 109 | data/webkit-options/identi.ca.conf \ | 131 | data/webkit-options/identi.ca.conf \ |
83 | 110 | data/webkit-options/login.live.com.conf \ | 132 | data/webkit-options/login.live.com.conf \ |
84 | 111 | data/webkit-options/login.yahoo.com.conf \ | ||
85 | 112 | data/webkit-options/www.facebook.com.conf \ | ||
86 | 113 | data/webkit-options/www.linkedin.com.conf | 133 | data/webkit-options/www.linkedin.com.conf |
87 | 114 | 134 | ||
88 | 115 | dist_bin_SCRIPTS = \ | 135 | dist_bin_SCRIPTS = \ |
89 | 116 | 136 | ||
90 | === modified file 'configure.ac' | |||
91 | --- configure.ac 2014-09-11 10:07:28 +0000 | |||
92 | +++ configure.ac 2016-04-05 11:21:38 +0000 | |||
93 | @@ -41,7 +41,10 @@ | |||
94 | 41 | [have_libaccount_plugin=no]) | 41 | [have_libaccount_plugin=no]) |
95 | 42 | 42 | ||
96 | 43 | AS_IF([test "x$have_libaccount_plugin" = "xyes"], | 43 | AS_IF([test "x$have_libaccount_plugin" = "xyes"], |
98 | 44 | [PKG_CHECK_MODULES([ACCOUNT_PLUGINS], [account-plugin >= 0.1.3])], | 44 | [ |
99 | 45 | PKG_CHECK_MODULES([ACCOUNT_PLUGINS], [account-plugin >= 0.1.3]) | ||
100 | 46 | PKG_CHECK_MODULES([RESTAPIS], [libsoup-2.4 json-glib-1.0]) | ||
101 | 47 | ], | ||
102 | 45 | [AS_IF([test "x$enable_libaccount_plugin" = "xyes"], | 48 | [AS_IF([test "x$enable_libaccount_plugin" = "xyes"], |
103 | 46 | [AC_MSG_ERROR([libaccount-plugin support enabled but required dependencies were not found])])]) | 49 | [AC_MSG_ERROR([libaccount-plugin support enabled but required dependencies were not found])])]) |
104 | 47 | 50 | ||
105 | 48 | 51 | ||
106 | === modified file 'data/providers/facebook.provider.in.in' | |||
107 | --- data/providers/facebook.provider.in.in 2015-09-09 08:48:32 +0000 | |||
108 | +++ data/providers/facebook.provider.in.in 2016-04-05 11:21:38 +0000 | |||
109 | @@ -4,7 +4,7 @@ | |||
110 | 4 | <icon>facebook</icon> | 4 | <icon>facebook</icon> |
111 | 5 | <translations>account-plugins</translations> | 5 | <translations>account-plugins</translations> |
112 | 6 | <domains>.*facebook\.com</domains> | 6 | <domains>.*facebook\.com</domains> |
114 | 7 | <plugin>generic-oauth</plugin> | 7 | <plugin>facebook</plugin> |
115 | 8 | <single-account>true</single-account> | 8 | <single-account>true</single-account> |
116 | 9 | 9 | ||
117 | 10 | <template> | 10 | <template> |
118 | 11 | 11 | ||
119 | === modified file 'data/providers/flickr.provider.in.in' | |||
120 | --- data/providers/flickr.provider.in.in 2013-02-25 06:25:34 +0000 | |||
121 | +++ data/providers/flickr.provider.in.in 2016-04-05 11:21:38 +0000 | |||
122 | @@ -4,7 +4,7 @@ | |||
123 | 4 | <icon>flickr</icon> | 4 | <icon>flickr</icon> |
124 | 5 | <translations>account-plugins</translations> | 5 | <translations>account-plugins</translations> |
125 | 6 | <domains>.*flickr\.com</domains> | 6 | <domains>.*flickr\.com</domains> |
127 | 7 | <plugin>generic-oauth</plugin> | 7 | <plugin>flickr</plugin> |
128 | 8 | 8 | ||
129 | 9 | <template> | 9 | <template> |
130 | 10 | <group name="auth"> | 10 | <group name="auth"> |
131 | 11 | 11 | ||
132 | === modified file 'data/providers/twitter.provider.in.in' | |||
133 | --- data/providers/twitter.provider.in.in 2013-02-22 15:17:49 +0000 | |||
134 | +++ data/providers/twitter.provider.in.in 2016-04-05 11:21:38 +0000 | |||
135 | @@ -3,7 +3,7 @@ | |||
136 | 3 | <name>Twitter</name> | 3 | <name>Twitter</name> |
137 | 4 | <icon>twitter</icon> | 4 | <icon>twitter</icon> |
138 | 5 | <translations>account-plugins</translations> | 5 | <translations>account-plugins</translations> |
140 | 6 | <plugin>generic-oauth</plugin> | 6 | <plugin>twitter</plugin> |
141 | 7 | <domains>.*twitter\.com</domains> | 7 | <domains>.*twitter\.com</domains> |
142 | 8 | 8 | ||
143 | 9 | <template> | 9 | <template> |
144 | 10 | 10 | ||
145 | === removed file 'data/webkit-options/api.twitter.com.conf' | |||
146 | --- data/webkit-options/api.twitter.com.conf 2012-06-19 06:08:30 +0000 | |||
147 | +++ data/webkit-options/api.twitter.com.conf 1970-01-01 00:00:00 +0000 | |||
148 | @@ -1,2 +0,0 @@ | |||
149 | 1 | UsernameField = input[id="username_or_email"] | ||
150 | 2 | PasswordField = input[id="password"] | ||
151 | 3 | 0 | ||
152 | === removed file 'data/webkit-options/login.yahoo.com.conf' | |||
153 | --- data/webkit-options/login.yahoo.com.conf 2012-06-18 14:24:03 +0000 | |||
154 | +++ data/webkit-options/login.yahoo.com.conf 1970-01-01 00:00:00 +0000 | |||
155 | @@ -1,2 +0,0 @@ | |||
156 | 1 | UsernameField = input[name="login"] | ||
157 | 2 | PasswordField = input[name="passwd"] | ||
158 | 3 | 0 | ||
159 | === removed file 'data/webkit-options/www.facebook.com.conf' | |||
160 | --- data/webkit-options/www.facebook.com.conf 2012-05-02 22:58:29 +0000 | |||
161 | +++ data/webkit-options/www.facebook.com.conf 1970-01-01 00:00:00 +0000 | |||
162 | @@ -1,7 +0,0 @@ | |||
163 | 1 | ViewportWidth = 420 | ||
164 | 2 | ViewportHeight = 320 | ||
165 | 3 | UsernameField = input[name="email"] | ||
166 | 4 | PasswordField = input[name="pass"] | ||
167 | 5 | #ZoomFactor = 2 | ||
168 | 6 | #PreferredWidth = 420 | ||
169 | 7 | |||
170 | 8 | 0 | ||
171 | === modified file 'debian/account-plugin-facebook.install' | |||
172 | --- debian/account-plugin-facebook.install 2015-04-17 08:53:11 +0000 | |||
173 | +++ debian/account-plugin-facebook.install 2016-04-05 11:21:38 +0000 | |||
174 | @@ -1,4 +1,3 @@ | |||
175 | 1 | etc/signon-ui/webkit-options.d/www.facebook.com.conf | ||
176 | 2 | usr/share/accounts/services/facebook-sharing.service | 1 | usr/share/accounts/services/facebook-sharing.service |
177 | 3 | usr/share/accounts/services/facebook-microblog.service | 2 | usr/share/accounts/services/facebook-microblog.service |
178 | 4 | usr/share/accounts/providers/facebook.provider | 3 | usr/share/accounts/providers/facebook.provider |
179 | 5 | 4 | ||
180 | === modified file 'debian/account-plugin-flickr.install' | |||
181 | --- debian/account-plugin-flickr.install 2014-03-31 08:21:46 +0000 | |||
182 | +++ debian/account-plugin-flickr.install 2016-04-05 11:21:38 +0000 | |||
183 | @@ -1,4 +1,3 @@ | |||
184 | 1 | etc/signon-ui/webkit-options.d/login.yahoo.com.conf | ||
185 | 2 | usr/share/accounts/services/flickr-*.service | 1 | usr/share/accounts/services/flickr-*.service |
186 | 3 | usr/share/accounts/providers/flickr.provider | 2 | usr/share/accounts/providers/flickr.provider |
187 | 4 | usr/share/accounts/qml-plugins/flickr/Main.qml | 3 | usr/share/accounts/qml-plugins/flickr/Main.qml |
188 | 5 | 4 | ||
189 | === modified file 'debian/account-plugin-twitter.install' | |||
190 | --- debian/account-plugin-twitter.install 2013-06-07 11:56:25 +0000 | |||
191 | +++ debian/account-plugin-twitter.install 2016-04-05 11:21:38 +0000 | |||
192 | @@ -1,4 +1,3 @@ | |||
193 | 1 | etc/signon-ui/webkit-options.d/api.twitter.com.conf | ||
194 | 2 | usr/share/accounts/services/twitter-microblog.service | 1 | usr/share/accounts/services/twitter-microblog.service |
195 | 3 | usr/share/accounts/providers/twitter.provider | 2 | usr/share/accounts/providers/twitter.provider |
196 | 4 | usr/share/accounts/qml-plugins/twitter/Main.qml | 3 | usr/share/accounts/qml-plugins/twitter/Main.qml |
197 | 5 | 4 | ||
198 | === modified file 'debian/changelog' | |||
199 | --- debian/changelog 2016-01-26 10:52:41 +0000 | |||
200 | +++ debian/changelog 2016-04-05 11:21:38 +0000 | |||
201 | @@ -1,3 +1,18 @@ | |||
202 | 1 | account-plugins (0.13-0ubuntu1) UNRELEASED; urgency=medium | ||
203 | 2 | |||
204 | 3 | * After the authentication, retrieve the username in Google, Facebook, | ||
205 | 4 | Flickr and Twitter plugins (LP: #1565772) | ||
206 | 5 | * debian/control, debian/libaccount-plugin-facebook.install, | ||
207 | 6 | debian/libaccount-plugin-flickr.install, | ||
208 | 7 | debian/libaccount-plugin-twitter.install: | ||
209 | 8 | add packages containing plugin modules. | ||
210 | 9 | * debian/account-plugin-facebook.install, | ||
211 | 10 | debian/account-plugin-flickr.install, | ||
212 | 11 | debian/account-plugin-twitter.install: | ||
213 | 12 | remove unneeded webkit-options files. | ||
214 | 13 | |||
215 | 14 | -- Alberto Mardegan <alberto.mardegan@canonical.com> Tue, 05 Apr 2016 13:47:48 +0300 | ||
216 | 15 | |||
217 | 1 | account-plugins (0.12+16.04.20160126-0ubuntu1) xenial; urgency=medium | 16 | account-plugins (0.12+16.04.20160126-0ubuntu1) xenial; urgency=medium |
218 | 2 | 17 | ||
219 | 3 | [ Alberto Mardegan ] | 18 | [ Alberto Mardegan ] |
220 | 4 | 19 | ||
221 | === modified file 'debian/control' | |||
222 | --- debian/control 2015-07-23 14:10:26 +0000 | |||
223 | +++ debian/control 2016-04-05 11:21:38 +0000 | |||
224 | @@ -7,9 +7,11 @@ | |||
225 | 7 | gobject-introspection, | 7 | gobject-introspection, |
226 | 8 | python3, | 8 | python3, |
227 | 9 | pkg-config, | 9 | pkg-config, |
228 | 10 | libaccount-plugin-1.0-dev (>= 0.1.9), | ||
229 | 10 | libaccounts-glib-dev (>= 1.10), | 11 | libaccounts-glib-dev (>= 1.10), |
230 | 12 | libjson-glib-dev, | ||
231 | 11 | libsignon-glib-dev, | 13 | libsignon-glib-dev, |
233 | 12 | libaccount-plugin-1.0-dev (>= 0.1.3), | 14 | libsoup2.4-dev, |
234 | 13 | valac (>= 0.16), | 15 | valac (>= 0.16), |
235 | 14 | gnome-common, | 16 | gnome-common, |
236 | 15 | dh-autoreconf, | 17 | dh-autoreconf, |
237 | @@ -49,26 +51,47 @@ | |||
238 | 49 | Description: GNOME Control Center account plugin for single signon | 51 | Description: GNOME Control Center account plugin for single signon |
239 | 50 | GNOME Control Center account plugins for single signon | 52 | GNOME Control Center account plugins for single signon |
240 | 51 | 53 | ||
241 | 54 | Package: libaccount-plugin-facebook | ||
242 | 55 | Architecture: any | ||
243 | 56 | Depends: ${shlibs:Depends}, ${misc:Depends}, | ||
244 | 57 | signon-plugin-oauth2, | ||
245 | 58 | Description: GNOME Control Center account plugin for single signon - Facebook Auth | ||
246 | 59 | GNOME Control Center account plugins for single signon | ||
247 | 60 | |||
248 | 52 | Package: account-plugin-facebook | 61 | Package: account-plugin-facebook |
249 | 53 | Architecture: all | 62 | Architecture: all |
250 | 54 | Depends: ${misc:Depends}, | 63 | Depends: ${misc:Depends}, |
252 | 55 | libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts, | 64 | libaccount-plugin-facebook | ubuntu-system-settings-online-accounts, |
253 | 56 | unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1), | 65 | unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1), |
254 | 57 | Description: GNOME Control Center account plugin for single signon - facebook | 66 | Description: GNOME Control Center account plugin for single signon - facebook |
255 | 58 | GNOME Control Center account plugins for single signon | 67 | GNOME Control Center account plugins for single signon |
256 | 59 | 68 | ||
257 | 69 | Package: libaccount-plugin-twitter | ||
258 | 70 | Architecture: any | ||
259 | 71 | Depends: ${shlibs:Depends}, ${misc:Depends}, | ||
260 | 72 | signon-plugin-oauth2, | ||
261 | 73 | Description: GNOME Control Center account plugin for single signon - Twitter Auth | ||
262 | 74 | GNOME Control Center account plugins for single signon | ||
263 | 75 | |||
264 | 60 | Package: account-plugin-twitter | 76 | Package: account-plugin-twitter |
265 | 61 | Architecture: all | 77 | Architecture: all |
266 | 62 | Depends: ${misc:Depends}, | 78 | Depends: ${misc:Depends}, |
268 | 63 | libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts, | 79 | libaccount-plugin-twitter | ubuntu-system-settings-online-accounts, |
269 | 64 | unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1), | 80 | unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1), |
270 | 65 | Description: GNOME Control Center account plugin for single signon - twitter | 81 | Description: GNOME Control Center account plugin for single signon - twitter |
271 | 66 | GNOME Control Center account plugins for single signon | 82 | GNOME Control Center account plugins for single signon |
272 | 67 | 83 | ||
273 | 84 | Package: libaccount-plugin-flickr | ||
274 | 85 | Architecture: any | ||
275 | 86 | Depends: ${shlibs:Depends}, ${misc:Depends}, | ||
276 | 87 | signon-plugin-oauth2, | ||
277 | 88 | Description: GNOME Control Center account plugin for single signon - Flickr Auth | ||
278 | 89 | GNOME Control Center account plugins for single signon | ||
279 | 90 | |||
280 | 68 | Package: account-plugin-flickr | 91 | Package: account-plugin-flickr |
281 | 69 | Architecture: all | 92 | Architecture: all |
282 | 70 | Depends: ${misc:Depends}, | 93 | Depends: ${misc:Depends}, |
284 | 71 | libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts, | 94 | libaccount-plugin-flickr | ubuntu-system-settings-online-accounts, |
285 | 72 | unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1), | 95 | unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1), |
286 | 73 | Description: GNOME Control Center account plugin for single signon - flickr | 96 | Description: GNOME Control Center account plugin for single signon - flickr |
287 | 74 | GNOME Control Center account plugins for single signon | 97 | GNOME Control Center account plugins for single signon |
288 | 75 | 98 | ||
289 | === added file 'debian/libaccount-plugin-facebook.install' | |||
290 | --- debian/libaccount-plugin-facebook.install 1970-01-01 00:00:00 +0000 | |||
291 | +++ debian/libaccount-plugin-facebook.install 2016-04-05 11:21:38 +0000 | |||
292 | @@ -0,0 +1,1 @@ | |||
293 | 1 | usr/lib/libaccount-plugin-1.0/providers/libfacebook.so | ||
294 | 0 | 2 | ||
295 | === added file 'debian/libaccount-plugin-flickr.install' | |||
296 | --- debian/libaccount-plugin-flickr.install 1970-01-01 00:00:00 +0000 | |||
297 | +++ debian/libaccount-plugin-flickr.install 2016-04-05 11:21:38 +0000 | |||
298 | @@ -0,0 +1,1 @@ | |||
299 | 1 | usr/lib/libaccount-plugin-1.0/providers/libflickr.so | ||
300 | 0 | 2 | ||
301 | === added file 'debian/libaccount-plugin-twitter.install' | |||
302 | --- debian/libaccount-plugin-twitter.install 1970-01-01 00:00:00 +0000 | |||
303 | +++ debian/libaccount-plugin-twitter.install 2016-04-05 11:21:38 +0000 | |||
304 | @@ -0,0 +1,1 @@ | |||
305 | 1 | usr/lib/libaccount-plugin-1.0/providers/libtwitter.so | ||
306 | 0 | 2 | ||
307 | === added file 'src/facebook.vala' | |||
308 | --- src/facebook.vala 1970-01-01 00:00:00 +0000 | |||
309 | +++ src/facebook.vala 2016-04-05 11:21:38 +0000 | |||
310 | @@ -0,0 +1,69 @@ | |||
311 | 1 | /* | ||
312 | 2 | * Copyright (C) 2016 Canonical, Inc | ||
313 | 3 | * | ||
314 | 4 | * This program is free software; you can redistribute it and/or modify | ||
315 | 5 | * it under the terms of the GNU General Public License version 2 as | ||
316 | 6 | * published by the Free Software Foundation. | ||
317 | 7 | * | ||
318 | 8 | * This program is distributed in the hope that it will be useful, | ||
319 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
320 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
321 | 11 | * GNU General Public License for more details. | ||
322 | 12 | * | ||
323 | 13 | * You should have received a copy of the GNU General Public License | ||
324 | 14 | * along with this program; if not, write to the Free Software | ||
325 | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
326 | 16 | * USA. | ||
327 | 17 | * | ||
328 | 18 | * Authors: | ||
329 | 19 | * Alberto Mardegan <alberto.mardegan@canonical.com> | ||
330 | 20 | */ | ||
331 | 21 | |||
332 | 22 | public class FacebookPlugin : Ap.OAuthPlugin { | ||
333 | 23 | private Soup.Session session; | ||
334 | 24 | |||
335 | 25 | public FacebookPlugin (Ag.Account account) { | ||
336 | 26 | Object (account: account); | ||
337 | 27 | } | ||
338 | 28 | |||
339 | 29 | private void fetch_username (string access_token) { | ||
340 | 30 | debug ("fetching username, AT = " + access_token); | ||
341 | 31 | Soup.URI destination_uri = | ||
342 | 32 | new Soup.URI ("https://graph.facebook.com/me?access_token=" + | ||
343 | 33 | access_token); | ||
344 | 34 | var message = new Soup.Message.from_uri ("GET", destination_uri); | ||
345 | 35 | session = new Soup.Session (); | ||
346 | 36 | session.queue_message (message, (sess, msg) => { | ||
347 | 37 | debug ("Got message reply"); | ||
348 | 38 | string body = (string) msg.response_body.data; | ||
349 | 39 | Json.Parser parser = new Json.Parser (); | ||
350 | 40 | try { | ||
351 | 41 | parser.load_from_data (body); | ||
352 | 42 | |||
353 | 43 | Json.Node root = parser.get_root (); | ||
354 | 44 | Json.Object response_object = root.get_object (); | ||
355 | 45 | var username = response_object.get_string_member ("name"); | ||
356 | 46 | account.set_display_name (username); | ||
357 | 47 | } catch (Error error) { | ||
358 | 48 | warning ("Could not parse reply: " + body); | ||
359 | 49 | } | ||
360 | 50 | |||
361 | 51 | store_account (); | ||
362 | 52 | }); | ||
363 | 53 | } | ||
364 | 54 | |||
365 | 55 | protected override void query_username () { | ||
366 | 56 | var reply = get_oauth_reply (); | ||
367 | 57 | Variant? v_token = reply.lookup_value ("AccessToken", null); | ||
368 | 58 | if (v_token != null) { | ||
369 | 59 | fetch_username (v_token.get_string ()); | ||
370 | 60 | } else { | ||
371 | 61 | store_account (); | ||
372 | 62 | } | ||
373 | 63 | } | ||
374 | 64 | } | ||
375 | 65 | |||
376 | 66 | public GLib.Type ap_module_get_object_type () | ||
377 | 67 | { | ||
378 | 68 | return typeof (FacebookPlugin); | ||
379 | 69 | } | ||
380 | 0 | 70 | ||
381 | === added file 'src/flickr.vala' | |||
382 | --- src/flickr.vala 1970-01-01 00:00:00 +0000 | |||
383 | +++ src/flickr.vala 2016-04-05 11:21:38 +0000 | |||
384 | @@ -0,0 +1,41 @@ | |||
385 | 1 | /* | ||
386 | 2 | * Copyright (C) 2016 Canonical, Inc | ||
387 | 3 | * | ||
388 | 4 | * This program is free software; you can redistribute it and/or modify | ||
389 | 5 | * it under the terms of the GNU General Public License version 2 as | ||
390 | 6 | * published by the Free Software Foundation. | ||
391 | 7 | * | ||
392 | 8 | * This program is distributed in the hope that it will be useful, | ||
393 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
394 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
395 | 11 | * GNU General Public License for more details. | ||
396 | 12 | * | ||
397 | 13 | * You should have received a copy of the GNU General Public License | ||
398 | 14 | * along with this program; if not, write to the Free Software | ||
399 | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
400 | 16 | * USA. | ||
401 | 17 | * | ||
402 | 18 | * Authors: | ||
403 | 19 | * Alberto Mardegan <alberto.mardegan@canonical.com> | ||
404 | 20 | */ | ||
405 | 21 | |||
406 | 22 | public class FlickrPlugin : Ap.OAuthPlugin { | ||
407 | 23 | public FlickrPlugin (Ag.Account account) { | ||
408 | 24 | Object (account: account); | ||
409 | 25 | } | ||
410 | 26 | |||
411 | 27 | protected override void query_username () { | ||
412 | 28 | var reply = get_oauth_reply (); | ||
413 | 29 | Variant? v_name = reply.lookup_value ("username", null); | ||
414 | 30 | if (v_name != null) { | ||
415 | 31 | account.set_display_name (v_name.get_string ()); | ||
416 | 32 | } | ||
417 | 33 | |||
418 | 34 | store_account (); | ||
419 | 35 | } | ||
420 | 36 | } | ||
421 | 37 | |||
422 | 38 | public GLib.Type ap_module_get_object_type () | ||
423 | 39 | { | ||
424 | 40 | return typeof (FlickrPlugin); | ||
425 | 41 | } | ||
426 | 0 | 42 | ||
427 | === modified file 'src/google.vala' | |||
428 | --- src/google.vala 2013-06-06 13:16:51 +0000 | |||
429 | +++ src/google.vala 2016-04-05 11:21:38 +0000 | |||
430 | @@ -1,5 +1,5 @@ | |||
431 | 1 | /* | 1 | /* |
433 | 2 | * Copyright (C) 2012 Canonical, Inc | 2 | * Copyright (C) 2012-2016 Canonical, Inc |
434 | 3 | * | 3 | * |
435 | 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
436 | 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
437 | @@ -20,6 +20,8 @@ | |||
438 | 20 | */ | 20 | */ |
439 | 21 | 21 | ||
440 | 22 | public class GooglePlugin : Ap.OAuthPlugin { | 22 | public class GooglePlugin : Ap.OAuthPlugin { |
441 | 23 | private Soup.Session session; | ||
442 | 24 | |||
443 | 23 | public GooglePlugin (Ag.Account account) { | 25 | public GooglePlugin (Ag.Account account) { |
444 | 24 | Object (account: account); | 26 | Object (account: account); |
445 | 25 | } | 27 | } |
446 | @@ -44,6 +46,43 @@ | |||
447 | 44 | 46 | ||
448 | 45 | set_ignore_cookies (true); | 47 | set_ignore_cookies (true); |
449 | 46 | } | 48 | } |
450 | 49 | |||
451 | 50 | private void fetch_username (string access_token) { | ||
452 | 51 | debug ("fetching username, AT = " + access_token); | ||
453 | 52 | Soup.URI destination_uri = | ||
454 | 53 | new Soup.URI ("https://www.googleapis.com/oauth2/v3/userinfo"); | ||
455 | 54 | var message = new Soup.Message.from_uri ("POST", destination_uri); | ||
456 | 55 | message.request_headers.append ("Authorization", "Bearer " + access_token); | ||
457 | 56 | message.request_headers.set_content_length (0); | ||
458 | 57 | session = new Soup.Session (); | ||
459 | 58 | session.queue_message (message, (sess, msg) => { | ||
460 | 59 | debug ("Got message reply"); | ||
461 | 60 | string body = (string) msg.response_body.data; | ||
462 | 61 | Json.Parser parser = new Json.Parser (); | ||
463 | 62 | try { | ||
464 | 63 | parser.load_from_data (body); | ||
465 | 64 | |||
466 | 65 | Json.Node root = parser.get_root (); | ||
467 | 66 | Json.Object response_object = root.get_object (); | ||
468 | 67 | var username = response_object.get_string_member ("email"); | ||
469 | 68 | account.set_display_name (username); | ||
470 | 69 | } catch (Error error) { | ||
471 | 70 | warning ("Could not parse reply: " + body); | ||
472 | 71 | } | ||
473 | 72 | |||
474 | 73 | store_account (); | ||
475 | 74 | }); | ||
476 | 75 | } | ||
477 | 76 | |||
478 | 77 | protected override void query_username () { | ||
479 | 78 | var reply = get_oauth_reply (); | ||
480 | 79 | Variant? v_token = reply.lookup_value ("AccessToken", null); | ||
481 | 80 | if (v_token != null) { | ||
482 | 81 | fetch_username (v_token.get_string ()); | ||
483 | 82 | } else { | ||
484 | 83 | store_account (); | ||
485 | 84 | } | ||
486 | 85 | } | ||
487 | 47 | } | 86 | } |
488 | 48 | 87 | ||
489 | 49 | public GLib.Type ap_module_get_object_type () | 88 | public GLib.Type ap_module_get_object_type () |
490 | 50 | 89 | ||
491 | === added file 'src/twitter.vala' | |||
492 | --- src/twitter.vala 1970-01-01 00:00:00 +0000 | |||
493 | +++ src/twitter.vala 2016-04-05 11:21:38 +0000 | |||
494 | @@ -0,0 +1,46 @@ | |||
495 | 1 | /* | ||
496 | 2 | * Copyright (C) 2016 Canonical, Inc | ||
497 | 3 | * | ||
498 | 4 | * This program is free software; you can redistribute it and/or modify | ||
499 | 5 | * it under the terms of the GNU General Public License version 2 as | ||
500 | 6 | * published by the Free Software Foundation. | ||
501 | 7 | * | ||
502 | 8 | * This program is distributed in the hope that it will be useful, | ||
503 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
504 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
505 | 11 | * GNU General Public License for more details. | ||
506 | 12 | * | ||
507 | 13 | * You should have received a copy of the GNU General Public License | ||
508 | 14 | * along with this program; if not, write to the Free Software | ||
509 | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
510 | 16 | * USA. | ||
511 | 17 | * | ||
512 | 18 | * Authors: | ||
513 | 19 | * Alberto Mardegan <alberto.mardegan@canonical.com> | ||
514 | 20 | */ | ||
515 | 21 | |||
516 | 22 | public class TwitterPlugin : Ap.OAuthPlugin { | ||
517 | 23 | public TwitterPlugin (Ag.Account account) { | ||
518 | 24 | Object (account: account); | ||
519 | 25 | } | ||
520 | 26 | |||
521 | 27 | protected override void query_username () { | ||
522 | 28 | var reply = get_oauth_reply (); | ||
523 | 29 | Variant? v_name = reply.lookup_value ("ScreenName", null); | ||
524 | 30 | if (v_name != null) { | ||
525 | 31 | account.set_display_name (v_name.get_string ()); | ||
526 | 32 | } else { | ||
527 | 33 | v_name = reply.lookup_value ("UserId", null); | ||
528 | 34 | if (v_name != null) { | ||
529 | 35 | account.set_display_name (v_name.get_string ()); | ||
530 | 36 | } | ||
531 | 37 | } | ||
532 | 38 | |||
533 | 39 | store_account (); | ||
534 | 40 | } | ||
535 | 41 | } | ||
536 | 42 | |||
537 | 43 | public GLib.Type ap_module_get_object_type () | ||
538 | 44 | { | ||
539 | 45 | return typeof (TwitterPlugin); | ||
540 | 46 | } |
FAILED: Continuous integration, rev:160 jenkins. qa.ubuntu. com/job/ account- plugins- ci/42/ jenkins. qa.ubuntu. com/job/ account- plugins- wily-amd64- ci/4/console jenkins. qa.ubuntu. com/job/ account- plugins- wily-armhf- ci/4/console jenkins. qa.ubuntu. com/job/ account- plugins- wily-i386- ci/4/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/account- plugins- ci/42/rebuild
http://