Merge lp:~kobe24-lixiang/account-plugins/13.04 into lp:account-plugins/13.04

Proposed by kobe
Status: Needs review
Proposed branch: lp:~kobe24-lixiang/account-plugins/13.04
Merge into: lp:account-plugins/13.04
Diff against target: 181 lines (+75/-1)
10 files modified
Makefile.am (+3/-0)
configure.ac (+15/-0)
data/providers/tencent.provider.in.in (+27/-0)
data/services/Makefile.am (+1/-0)
data/services/tencent-microblog.service.in (+8/-0)
data/webkit-options/open.t.qq.com.conf (+4/-0)
debian/account-plugin-tencent.install (+3/-0)
debian/changelog (+4/-1)
debian/control (+8/-0)
src/config.vapi (+2/-0)
To merge this branch: bzr merge lp:~kobe24-lixiang/account-plugins/13.04
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Needs Fixing
Ken VanDine Disapprove
Review via email: mp+168220@code.launchpad.net

Description of the change

Tencent-Microblog is very popular like Sina-Microblog in China. I had completed the authentication using oAuth2.0.
Then I'm going to do this work about friends-tencent like friends-sina and friends-sohu.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Great to see tencent support, but the 13.04 is a maintenance branch, bug fixes only. New features should be targeted to trunk. Please resubmit the proposal against lp:account-plugins

Thanks

review: Disapprove
Revision history for this message
kobe (kobe24-lixiang) wrote :

At first, I add code to trunk, but it depends on libaccounts-glib. In the source list, I can't get the package with the requested version.
So I get the libaccounts-glib code from launchpad to build package. There is still a problem about the build-depends requestment "automake (>=1:1.13)". Maybe there is other problem in my progress.
My system is UbuntuKylin 13.04, and I can't solve the question. So I had to use libaccounts-glib-13.04 and account-plugins-13.04.Then, there is no any problem.
I need your help to tell me what I shoud do if i use the trunk code.
Regards,
Kobe Lee.

At 2013-06-08 11:57:27,"Ken VanDine" <email address hidden> wrote:
>Review: Disapproveroatures should be targeted to trunk. Please resubmit the proposal against lp:account-plugins
>
>Thanks
>--
>https://code.launchpad.net/~kobe24-lixiang/account-plugins/13.04/+merge/168220
>You are the owner of lp:~kobe24-lixiang/account-plugins/13.04.

Revision history for this message
Alberto Mardegan (mardy) wrote :

Thanks Kobe for this plugin! Please, first check the indentation: in the Makefile.am files and in configure.ac, we use tabs, not spaces (you'll notice that in the diff below your lines are not correctly aligned with the others).

About targeting "trunk", you need to upgrade your system to use "saucy"; you can do this by replacing the lines in your /etc/apt/sources.list file from "raring" to "saucy". However, be warned that "saucy" is a development release and, as such, might be less stable than 13.04.
If you don't want to upgrade, feel free to continue using 13.04, but please set the target branch for this merge proposal to be "trunk". Even if you cannot build it: I'll try your patch and see if it builds and works (I think it will, because so far there are no changes in how the account plugins work from "raring" to "saucy").

review: Needs Fixing

Unmerged revisions

98. By kobe

 Add authentication of Tencent using oAuth2.0 which is popular in China

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2013-03-19 14:47:46 +0000
3+++ Makefile.am 2013-06-08 02:54:28 +0000
4@@ -62,6 +62,7 @@
5 data/providers/identica.provider.in.in \
6 data/providers/sina.provider.in.in \
7 data/providers/sohu.provider.in.in \
8+ data/providers/tencent.provider.in.in \
9 data/providers/twitter.provider.in.in \
10 data/providers/windows-live.provider.in.in
11
12@@ -86,6 +87,7 @@
13 data/services/picasa.service.in \
14 data/services/sina-microblog.service.in \
15 data/services/sohu-microblog.service.in \
16+ data/services/tencent-microblog.service.in \
17 data/services/twitter-microblog.service.in \
18 data/services/wlm.service.in
19
20@@ -97,6 +99,7 @@
21 data/webkit-options/accounts.google.com.conf \
22 data/webkit-options/api.t.sina.com.cn.conf \
23 data/webkit-options/api.t.sohu.com.conf \
24+ data/webkit-options/open.t.qq.com.conf \
25 data/webkit-options/api.twitter.com.conf \
26 data/webkit-options/foursquare.com.conf \
27 data/webkit-options/identi.ca.conf \
28
29=== modified file 'configure.ac'
30--- configure.ac 2013-03-26 13:34:19 +0000
31+++ configure.ac 2013-06-08 02:54:28 +0000
32@@ -172,6 +172,20 @@
33 AC_SUBST(SOHU_CONSUMER_KEY, ["$sohu_consumer_key"])
34 AC_SUBST(SOHU_CONSUMER_SECRET, ["$sohu_consumer_secret"])
35
36+# Set Tencent client id/secret
37+AC_ARG_WITH(tencent-client-id,
38+ [AS_HELP_STRING([--with-tencent-client-id],
39+ [Tencent client id])],
40+ [tencent_client_id=$withval],
41+ [tencent_client_id="801336640"])
42+AC_ARG_WITH(tencent-client-secret,
43+ [AS_HELP_STRING([--with-tencent-client-secret],
44+ [Tencent client secret])],
45+ [tencent_client_secret=$withval],
46+ [tencent_client_secret="f00f83cae40b5e65902f7776b052fd76"])
47+AC_SUBST(TENCENT_CLIENT_ID, ["$tencent_client_id"])
48+AC_SUBST(TENCENT_CLIENT_SECRET, ["$tencent_client_secret"])
49+
50 # Set Windows Live client id
51 AC_ARG_WITH(windows-live-client-id,
52 [AS_HELP_STRING([--with-windows-live-client-id],
53@@ -188,6 +202,7 @@
54 data/providers/identica.provider.in
55 data/providers/sina.provider.in
56 data/providers/sohu.provider.in
57+ data/providers/tencent.provider.in
58 data/providers/twitter.provider.in
59 data/providers/windows-live.provider.in
60 Makefile
61
62=== added file 'data/providers/tencent.provider.in.in'
63--- data/providers/tencent.provider.in.in 1970-01-01 00:00:00 +0000
64+++ data/providers/tencent.provider.in.in 2013-06-08 02:54:28 +0000
65@@ -0,0 +1,27 @@
66+<?xml version="1.0" encoding="UTF-8" ?>
67+<provider id="tencent">
68+ <name>Tencent</name>
69+ <icon>tencent</icon>
70+ <translations>account-plugins</translations>
71+ <domains>.*t\.qq\.com</domains>
72+ <plugin>generic-oauth</plugin>
73+
74+ <template>
75+ <group name="auth">
76+ <setting name="method">oauth2</setting>
77+ <setting name="mechanism">user_agent</setting>
78+ <group name="oauth2">
79+ <group name="user_agent">
80+ <setting name="Host">open.t.qq.com</setting>
81+ <setting name="AuthPath">/cgi-bin/oauth2/authorize</setting>
82+ <setting name="TokenPath">/cgi-bin/oauth2/access_token</setting>
83+ <setting name="RedirectUri">https://wiki.ubuntu.com/</setting>
84+ <setting name="ResponseType">token</setting>
85+ <setting type="as" name="Scope">['all']</setting>
86+ <setting name="ClientId">@TENCENT_CLIENT_ID@</setting>
87+ <setting name="ClientSecret">@TENCENT_CLIENT_SECRET@</setting>
88+ </group>
89+ </group>
90+ </group>
91+ </template>
92+</provider>
93
94=== modified file 'data/services/Makefile.am'
95--- data/services/Makefile.am 2012-10-04 14:18:34 +0000
96+++ data/services/Makefile.am 2013-06-08 02:54:28 +0000
97@@ -15,6 +15,7 @@
98 picasa.service.in \
99 sina-microblog.service.in \
100 sohu-microblog.service.in \
101+ tencent-microblog.service.in \
102 twitter-microblog.service.in \
103 wlm.service.in
104
105
106=== added file 'data/services/tencent-microblog.service.in'
107--- data/services/tencent-microblog.service.in 1970-01-01 00:00:00 +0000
108+++ data/services/tencent-microblog.service.in 2013-06-08 02:54:28 +0000
109@@ -0,0 +1,8 @@
110+<?xml version="1.0" encoding="UTF-8" ?>
111+<service id="tencent-microblog">
112+ <type>microblogging</type>
113+ <name>Tencent</name>
114+ <icon>tencent</icon>
115+ <provider>tencent</provider>
116+ <translations>account-plugins</translations>
117+</service>
118
119=== added file 'data/webkit-options/open.t.qq.com.conf'
120--- data/webkit-options/open.t.qq.com.conf 1970-01-01 00:00:00 +0000
121+++ data/webkit-options/open.t.qq.com.conf 2013-06-08 02:54:28 +0000
122@@ -0,0 +1,4 @@
123+ViewportWidth = 420
124+ViewportHeight = 500
125+UsernameField = input[name="userId"]
126+PasswordField = input[name="passwd"]
127
128=== added file 'debian/account-plugin-tencent.install'
129--- debian/account-plugin-tencent.install 1970-01-01 00:00:00 +0000
130+++ debian/account-plugin-tencent.install 2013-06-08 02:54:28 +0000
131@@ -0,0 +1,3 @@
132+etc/signon-ui/webkit-options.d/open.t.qq.com.conf
133+usr/share/accounts/services/tencent-microblog.service
134+usr/share/accounts/providers/tencent.provider
135
136=== modified file 'debian/changelog'
137--- debian/changelog 2013-03-26 13:34:19 +0000
138+++ debian/changelog 2013-06-08 02:54:28 +0000
139@@ -3,7 +3,10 @@
140 * New upstream snapshot
141 - Fix Foursquare authentication (LP: #1159795)
142
143- -- Alberto Mardegan <alberto.mardegan@canonical.com> Tue, 26 Mar 2013 15:32:44 +0200
144+ [ Kobe Lee ]
145+ * Add authentication of Tencent using oAuth2.0 which is popular in China.
146+
147+ -- Kobe Lee (kylinkobe) <kobe24_lixiang@126.com> Sat, 08 Jun 2013 09:32:42 +0800
148
149 account-plugins (0.10bzr13.03.19-0ubuntu1) raring; urgency=low
150
151
152=== modified file 'debian/control'
153--- debian/control 2013-03-19 18:41:45 +0000
154+++ debian/control 2013-06-08 02:54:28 +0000
155@@ -85,6 +85,14 @@
156 Description: GNOME Control Center account plugin for single signon - windows live
157 GNOME Control Center account plugins for single signon
158
159+Package: account-plugin-tencent
160+Architecture: any
161+Depends: ${misc:Depends},
162+ account-plugin-generic-oauth,
163+ unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1)
164+Description: GNOME Control Center account plugin for single signon - tencent
165+ GNOME Control Center account plugins for single signon
166+
167 Package: account-plugin-sohu
168 Architecture: any
169 Depends: ${misc:Depends},
170
171=== modified file 'src/config.vapi'
172--- src/config.vapi 2012-11-12 11:24:22 +0000
173+++ src/config.vapi 2013-06-08 02:54:28 +0000
174@@ -36,5 +36,7 @@
175 public const string SINA_CONSUMER_SECRET;
176 public const string SOHU_CONSUMER_KEY;
177 public const string SOHU_CONSUMER_SECRET;
178+ public const string TENCENT_CONSUMER_KEY;
179+ public const string TENCENT_CONSUMER_SECRET;
180 public const string WINDOWS_LIVE_CLIENT_ID;
181 }

Subscribers

People subscribed via source and target branches

to all changes: