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

Proposed by kobe
Status: Needs review
Proposed branch: lp:~kobe24-lixiang/account-plugins/tencent
Merge into: lp:account-plugins
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/tencent
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Needs Fixing
Review via email: mp+171794@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi Kobe! This looks good to me, just please change this minor thing: in the Makefile.am, when you add the data/webkit-options/open.t.qq.com.conf file, please add it later so that the files are sorted alphabetically.

review: Needs Fixing
124. By kobe

chage file's order so that the files are sorted alphabetically

Unmerged revisions

124. By kobe

chage file's order so that the files are sorted alphabetically

123. 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-06-27 14:17:22 +0000
3+++ Makefile.am 2013-06-28 00:45:34 +0000
4@@ -68,6 +68,7 @@
5 data/providers/instagram.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@@ -95,6 +96,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@@ -112,6 +114,7 @@
21 data/webkit-options/identi.ca.conf \
22 data/webkit-options/login.live.com.conf \
23 data/webkit-options/login.yahoo.com.conf \
24+ data/webkit-options/open.t.qq.com.conf \
25 data/webkit-options/secure.flickr.com.conf \
26 data/webkit-options/www.facebook.com.conf \
27 data/webkit-options/www.linkedin.com.conf
28
29=== modified file 'configure.ac'
30--- configure.ac 2013-06-12 05:49:46 +0000
31+++ configure.ac 2013-06-28 00:45:34 +0000
32@@ -225,6 +225,20 @@
33 AC_SUBST(SOHU_CLIENT_ID, ["$sohu_client_id"])
34 AC_SUBST(SOHU_CLIENT_SECRET, ["$sohu_client_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@@ -243,6 +257,7 @@
54 data/providers/instagram.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-28 00:45:34 +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 2013-06-27 14:17:22 +0000
96+++ data/services/Makefile.am 2013-06-28 00:45:34 +0000
97@@ -16,6 +16,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-28 00:45:34 +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-28 00:45:34 +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-28 00:45:34 +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-06-27 04:31:04 +0000
138+++ debian/changelog 2013-06-28 00:45:34 +0000
139@@ -6,7 +6,10 @@
140 [ Ubuntu daily release ]
141 * Automatic snapshot from revision 121
142
143- -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 27 Jun 2013 04:31:03 +0000
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> Thu, 27 Jun 2013 20:14:11 +0800
148
149 account-plugins (0.11daily13.06.25-0ubuntu1) saucy; urgency=low
150
151
152=== modified file 'debian/control'
153--- debian/control 2013-06-19 09:23:40 +0000
154+++ debian/control 2013-06-28 00:45:34 +0000
155@@ -98,6 +98,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: all
169 Depends: ${misc:Depends},
170
171=== modified file 'src/config.vapi'
172--- src/config.vapi 2013-04-09 08:45:38 +0000
173+++ src/config.vapi 2013-06-28 00:45:34 +0000
174@@ -36,5 +36,7 @@
175 public const string SINA_CONSUMER_SECRET;
176 public const string SOHU_CLIENT_ID;
177 public const string SOHU_CLIENT_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: