Merge lp:~vaguedream/account-plugins/account-plugins into lp:account-plugins

Proposed by Zhang Zhao on 2013-04-03
Status: Merged
Approved by: Alberto Mardegan on 2013-04-10
Approved revision: 100
Merged at revision: 98
Proposed branch: lp:~vaguedream/account-plugins/account-plugins
Merge into: lp:account-plugins
Diff against target: 112 lines (+28/-28)
6 files modified
Makefile.am (+1/-1)
configure.ac (+13/-13)
data/providers/sina.provider.in.in (+11/-11)
data/webkit-options/api.t.sina.com.cn.conf (+0/-2)
data/webkit-options/api.weibo.com.conf (+2/-0)
debian/account-plugin-sina.install (+1/-1)
To merge this branch: bzr merge lp:~vaguedream/account-plugins/account-plugins
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration 2013-04-09 Approve on 2013-04-10
Alberto Mardegan (community) 2013-04-03 Approve on 2013-04-10
Review via email: mp+156725@code.launchpad.net

Commit message

Fix Sina account creation

Sina abandoned oauth1 at the end of 2012.
and the domain are changing from api.sina.com.cn to api.weibo.com.

Description of the change

Sina abandoned oauth1 at the end of 2012.
and the domain are changing from api.sina.com.cn to api.weibo.com.

Most Chinese people use sina microblog,and 1/3 of the people use tencent microblog.Basically no one use the Sohu microblog.

Now I am repairing gwibber-service-sina.

To post a comment you must log in.
Will Cooke (willcooke) wrote :

Hello Zhang Zhao,

Thank you very much for your contribution. We'd love to see it incorporate in to Ubuntu, but first I need to ask you to sign the contributor agreement. It's a straight forward process, and you can find full details here:

http://www.canonical.com/contributors

Please let me know once you've completed the form.

Thanks again.

Cheers, Will

Alberto Mardegan (mardy) wrote :

Hi Zhao, I have another question: who is the owner of those API keys?

Zhang Zhao (vaguedream) wrote :

> Hello Zhang Zhao,
>
> Thank you very much for your contribution. We'd love to see it incorporate in
> to Ubuntu, but first I need to ask you to sign the contributor agreement.
> It's a straight forward process, and you can find full details here:
>
> http://www.canonical.com/contributors
>
> Please let me know once you've completed the form.
>
> Thanks again.
>
> Cheers, Will

I've completed the form.

Zhang Zhao (vaguedream) wrote :

I applied for the API key in the name of ubuntukylin, has now passed Sina audit.

Zhang Zhao (vaguedream) wrote :

I tried the key before, but without success.

Zhang Zhao (vaguedream) wrote :

The new key's owner is ubuntukylin team.

Zhang Zhao (vaguedream) wrote :

> I tried the key before, but without success.
return error:redirect_uri_mismatch,the redirect_uri is not https://wiki.ubuntu.com/

Will Cooke (willcooke) wrote :

> I've completed the form.

Excellent, thanks a lot.

Alberto Mardegan (mardy) wrote :

Thanks Zhang for this patch! I managed to try it and I got an account created. :-)

review: Approve
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~vaguedream/account-plugins/account-plugins/+merge/156725/+edit-commit-message

review: Needs Fixing (continuous-integration)
review: Approve (continuous-integration)

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-21 08:50:59 +0000
3+++ Makefile.am 2013-04-09 06:14:20 +0000
4@@ -97,7 +97,7 @@
5 webkitoptionsdir = $(sysconfdir)/signon-ui/webkit-options.d
6 dist_webkitoptions_DATA = \
7 data/webkit-options/accounts.google.com.conf \
8- data/webkit-options/api.t.sina.com.cn.conf \
9+ data/webkit-options/api.weibo.com.conf \
10 data/webkit-options/api.t.sohu.com.conf \
11 data/webkit-options/api.twitter.com.conf \
12 data/webkit-options/foursquare.com.conf \
13
14=== modified file 'configure.ac'
15--- configure.ac 2013-03-21 08:24:18 +0000
16+++ configure.ac 2013-04-09 06:14:20 +0000
17@@ -158,19 +158,19 @@
18 AC_SUBST(IDENTICA_CONSUMER_KEY, ["$identica_consumer_key"])
19 AC_SUBST(IDENTICA_CONSUMER_SECRET, ["$identica_consumer_secret"])
20
21-# Set Sina consumer key/secret
22-AC_ARG_WITH(sina-consumer-key,
23- [AS_HELP_STRING([--with-sina-consumer-key],
24- [Sina consumer key])],
25- [sina_consumer_key=$withval],
26- [sina_consumer_key="1472971394"])
27-AC_ARG_WITH(sina-consumer-secret,
28- [AS_HELP_STRING([--with-sina-consumer-secret],
29- [Sina consumer secret])],
30- [sina_consumer_secret=$withval],
31- [sina_consumer_secret="49443ea72f7545486143f3f074b0b66e"])
32-AC_SUBST(SINA_CONSUMER_KEY, ["$sina_consumer_key"])
33-AC_SUBST(SINA_CONSUMER_SECRET, ["$sina_consumer_secret"])
34+# Set Sina client id/secret
35+AC_ARG_WITH(sina-client-id,
36+ [AS_HELP_STRING([--with-sina-client-id],
37+ [Sina client id])],
38+ [sina_client_id=$withval],
39+ [sina_client_id="3011480316"])
40+AC_ARG_WITH(sina-client-secret,
41+ [AS_HELP_STRING([--with-sina-client-secret],
42+ [Sina client secret])],
43+ [sina_client_secret=$withval],
44+ [sina_client_secret="bb66bd5dacdaa84ee2917e1162359b48"])
45+AC_SUBST(SINA_CLIENT_ID, ["$sina_client_id"])
46+AC_SUBST(SINA_CLIENT_SECRET, ["$sina_client_secret"])
47
48 # Set Sohu consumer key/secret
49 AC_ARG_WITH(sohu-consumer-key,
50
51=== modified file 'data/providers/sina.provider.in.in'
52--- data/providers/sina.provider.in.in 2013-02-25 06:25:34 +0000
53+++ data/providers/sina.provider.in.in 2013-04-09 06:14:20 +0000
54@@ -1,24 +1,24 @@
55-<?xml version="1.0" encoding="UTF-8" ?>
56+<?xml version="1.0" encoding="UTF-8"?>
57 <provider id="sina">
58 <name>Sina</name>
59 <icon>sina</icon>
60 <translations>account-plugins</translations>
61- <domains>.*t\.sina\.com\.cn</domains>
62+ <domains>.*weibo\.com</domains>
63 <plugin>generic-oauth</plugin>
64
65 <template>
66 <group name="auth">
67 <setting name="method">oauth2</setting>
68- <setting name="mechanism">HMAC-SHA1</setting>
69+ <setting name="mechanism">user_agent</setting>
70 <group name="oauth2">
71- <group name="HMAC-SHA1">
72- <setting name="RequestEndpoint">http://api.t.sina.com.cn/oauth/request_token</setting>
73- <setting name="TokenEndpoint">http://api.t.sina.com.cn/oauth/access_token</setting>
74- <setting name="AuthorizationEndpoint">http://api.t.sina.com.cn/oauth/authorize</setting>
75- <setting name="Callback">http://wiki.ubuntu.com/</setting>
76- <setting name="ConsumerKey">@SINA_CONSUMER_KEY@</setting>
77- <setting name="ConsumerSecret">@SINA_CONSUMER_SECRET@</setting>
78- <setting name="AllowedSchemes" type="as">['https','http']</setting>
79+ <group name="user_agent">
80+ <setting name="Host">api.weibo.com</setting>
81+ <setting name="AuthPath">oauth2/authorize</setting>
82+ <setting name="TokenPath">oauth2/access_token</setting>
83+ <setting name="RedirectUri">https://wiki.ubuntu.com/</setting>
84+ <setting name="ResponseType">token</setting>
85+ <setting name="ClientId">@SINA_CLIENT_ID@</setting>
86+ <setting name="ClientSecret">@SINA_CLIENT_SECRET@</setting>
87 </group>
88 </group>
89 </group>
90
91=== removed file 'data/webkit-options/api.t.sina.com.cn.conf'
92--- data/webkit-options/api.t.sina.com.cn.conf 2012-06-27 11:41:09 +0000
93+++ data/webkit-options/api.t.sina.com.cn.conf 1970-01-01 00:00:00 +0000
94@@ -1,2 +0,0 @@
95-UsernameField = input[name="userId"]
96-PasswordField = input[name="passwd"]
97
98=== added file 'data/webkit-options/api.weibo.com.conf'
99--- data/webkit-options/api.weibo.com.conf 1970-01-01 00:00:00 +0000
100+++ data/webkit-options/api.weibo.com.conf 2013-04-09 06:14:20 +0000
101@@ -0,0 +1,2 @@
102+UsernameField = input[name="userId"]
103+PasswordField = input[name="passwd"]
104
105=== modified file 'debian/account-plugin-sina.install'
106--- debian/account-plugin-sina.install 2013-02-22 15:17:49 +0000
107+++ debian/account-plugin-sina.install 2013-04-09 06:14:20 +0000
108@@ -1,3 +1,3 @@
109-etc/signon-ui/webkit-options.d/api.t.sina.com.cn.conf
110+etc/signon-ui/webkit-options.d/api.weibo.com.conf
111 usr/share/accounts/services/sina-microblog.service
112 usr/share/accounts/providers/sina.provider

Subscribers

People subscribed via source and target branches

to all changes: