Merge lp:~mardy/account-plugins/mcloud-plugin-lp1587282 into lp:account-plugins

Proposed by Alberto Mardegan on 2016-06-02
Status: Merged
Approved by: David Barth on 2016-07-07
Approved revision: 167
Merged at revision: 171
Proposed branch: lp:~mardy/account-plugins/mcloud-plugin-lp1587282
Merge into: lp:account-plugins
Prerequisite: lp:~mardy/account-plugins/owncloud-1570986
Diff against target: 164 lines (+67/-0)
9 files modified
.bzrignore (+1/-0)
Makefile.am (+2/-0)
configure.ac (+15/-0)
data/providers/mcloud.provider.in.in (+28/-0)
debian/account-plugin-mcloud.install (+4/-0)
debian/control (+8/-0)
debian/rules (+2/-0)
qml/Makefile.am (+1/-0)
qml/mcloud/Main.qml (+6/-0)
To merge this branch: bzr merge lp:~mardy/account-plugins/mcloud-plugin-lp1587282
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Pending
Online Accounts 2016-06-02 Pending
Review via email: mp+296319@code.launchpad.net

Commit message

Add account plugin for MCloud

Description of the change

Add account plugin for MCloud

Testing instructions:

In the testing device, paste the following commands in a terminal:

cat > ~/.local/share/accounts/services/mcloud-test.service <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<service id="mcloud-test">
  <type>test-type</type>
  <name>MCloud test</name>
  <provider>mcloud</provider>
</service>
EOF

cat > ~/.local/share/accounts/applications/mcloud-test.application <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<application id="mcloud-test">
  <description>MCloud test</description>
  <services>
    <service id="mcloud-test">
      <description>Test mcloud account</description>
    </service>
  </services>
</application>
EOF

Then head to the System Settings -> Accounts and create a MCloud account. Ask mardy on IRC for a test account.

To clean up your device after the test, run this command:
    rm ~/.local/share/accounts/*/mcloud-test*

To post a comment you must log in.
166. By Alberto Mardegan on 2016-06-16

Merge from trunk

* debian/control:
  Update package descriptions for all account plugins (LP: #1590786)
[ Alberto Mardegan ]
* Add account plugin for vk.com (LP: #1564883)
* Add ownCloud plugin (LP: #1570986)
[ Alberto Mardegan ]
* After the authentication, retrieve the username in Google, Facebook,
  Flickr and Twitter plugins (LP: #1565772)
* debian/control, debian/libaccount-plugin-facebook.install,
  debian/libaccount-plugin-flickr.install,
  debian/libaccount-plugin-twitter.install:
  add packages containing plugin modules.
* debian/account-plugin-facebook.install,
  debian/account-plugin-flickr.install,
  debian/account-plugin-twitter.install:
  remove unneeded webkit-options files.
[ CI Train Bot ]
* No-change rebuild.

167. By Alberto Mardegan on 2016-06-16

Update description

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2016-06-08 12:08:49 +0000
3+++ .bzrignore 2016-06-16 11:50:26 +0000
4@@ -28,6 +28,7 @@
5 /debian/account-plugin-google/
6 /debian/account-plugin-icons/
7 /debian/account-plugin-identica/
8+/debian/account-plugin-mcloud/
9 /debian/account-plugin-owncloud/
10 /debian/account-plugin-sina/
11 /debian/account-plugin-sohu/
12
13=== modified file 'Makefile.am'
14--- Makefile.am 2016-06-08 12:08:49 +0000
15+++ Makefile.am 2016-06-16 11:50:26 +0000
16@@ -89,6 +89,7 @@
17 data/providers/identica.provider.in.in \
18 data/providers/linkedin.provider.in.in \
19 data/providers/instagram.provider.in.in \
20+ data/providers/mcloud.provider.in.in \
21 data/providers/owncloud.provider.in.in \
22 data/providers/sina.provider.in.in \
23 data/providers/sohu.provider.in.in \
24@@ -139,6 +140,7 @@
25 # https://bugs.launchpad.net/bugs/1571587
26 iconsdir = $(datadir)/icons/hicolor/32x32/apps
27 dist_icons_DATA = \
28+ data/icons/mcloud.png \
29 data/icons/owncloud.png \
30 data/icons/vk.png
31
32
33=== modified file 'configure.ac'
34--- configure.ac 2016-06-08 12:08:49 +0000
35+++ configure.ac 2016-06-16 11:50:26 +0000
36@@ -228,6 +228,20 @@
37 AC_SUBST(SOHU_CLIENT_ID, ["$sohu_client_id"])
38 AC_SUBST(SOHU_CLIENT_SECRET, ["$sohu_client_secret"])
39
40+# Set Mcloud client id/secret
41+AC_ARG_WITH(mcloud-client-id,
42+ [AS_HELP_STRING([--with-mcloud-client-id],
43+ [Mcloud client id])],
44+ [mcloud_client_id=$withval],
45+ [mcloud_client_id="APP1ZtqoN3R0002"])
46+AC_ARG_WITH(mcloud-client-secret,
47+ [AS_HELP_STRING([--with-mcloud-client-secret],
48+ [Mcloud client secret])],
49+ [mcloud_client_secret=$withval],
50+ [mcloud_client_secret="A70EFCDC91456349E7FDECF0A33574AC"])
51+AC_SUBST(MCLOUD_CLIENT_ID, ["$mcloud_client_id"])
52+AC_SUBST(MCLOUD_CLIENT_SECRET, ["$mcloud_client_secret"])
53+
54 # Set VK client id
55 AC_ARG_WITH(vk-client-id,
56 [AS_HELP_STRING([--with-vk-client-id],
57@@ -252,6 +266,7 @@
58 data/providers/identica.provider.in
59 data/providers/linkedin.provider.in
60 data/providers/instagram.provider.in
61+ data/providers/mcloud.provider.in
62 data/providers/owncloud.provider.in
63 data/providers/sina.provider.in
64 data/providers/sohu.provider.in
65
66=== added file 'data/icons/mcloud.png'
67Binary files data/icons/mcloud.png 1970-01-01 00:00:00 +0000 and data/icons/mcloud.png 2016-06-16 11:50:26 +0000 differ
68=== added file 'data/providers/mcloud.provider.in.in'
69--- data/providers/mcloud.provider.in.in 1970-01-01 00:00:00 +0000
70+++ data/providers/mcloud.provider.in.in 2016-06-16 11:50:26 +0000
71@@ -0,0 +1,28 @@
72+<?xml version="1.0" encoding="UTF-8"?>
73+<provider id="mcloud">
74+ <name>MCloud</name>
75+ <icon>mcloud</icon>
76+ <translations>MCloud</translations>
77+ <domains>.*10086\.cn</domains>
78+ <plugin>generic-oauth</plugin>
79+ <single-account>true</single-account>
80+ <template>
81+ <group name="auth">
82+ <setting name="method">oauth2</setting>
83+ <setting name="mechanism">web_server</setting>
84+ <group name="oauth2">
85+ <group name="web_server">
86+ <setting name="Host">caiyun.feixin.10086.cn</setting>
87+ <setting name="AuthPath">authorize.jsp</setting>
88+ <setting name="TokenPath">https://ose.caiyun.feixin.10086.cn/oauthApp/OAuth2/getToken</setting>
89+ <setting name="RedirectUri">http://developer.ubuntu.com/en/</setting>
90+ <setting name="ResponseType">code</setting>
91+ <setting name="ClientId">@MCLOUD_CLIENT_ID@</setting>
92+ <setting name="ClientSecret">@MCLOUD_CLIENT_SECRET@</setting>
93+ <setting type="as" name="Scope">['nd_cloud']</setting>
94+ <setting type="as" name="AllowedSchemes">['https', 'http']</setting>
95+ </group>
96+ </group>
97+ </group>
98+ </template>
99+</provider>
100
101=== added file 'debian/account-plugin-mcloud.install'
102--- debian/account-plugin-mcloud.install 1970-01-01 00:00:00 +0000
103+++ debian/account-plugin-mcloud.install 2016-06-16 11:50:26 +0000
104@@ -0,0 +1,4 @@
105+usr/share/accounts/providers/mcloud.provider
106+usr/share/accounts/qml-plugins/mcloud/*.qml
107+usr/share/icons/hicolor/32x32/apps/mcloud.png
108+
109
110=== modified file 'debian/control'
111--- debian/control 2016-06-14 09:05:51 +0000
112+++ debian/control 2016-06-16 11:50:26 +0000
113@@ -148,6 +148,14 @@
114 This plugin adds support for creating Instagram accounts in the Unity Control
115 Center
116
117+Package: account-plugin-mcloud
118+Architecture: all
119+Depends: ${misc:Depends},
120+ ubuntu-system-settings-online-accounts,
121+Description: Online account plugin for Unity - mCloud
122+ This plugin adds support for creating mCloud accounts in the Unity Control
123+ Center
124+
125 Package: account-plugin-owncloud
126 Architecture: all
127 Depends: ${misc:Depends},
128
129=== modified file 'debian/rules'
130--- debian/rules 2016-04-08 12:09:22 +0000
131+++ debian/rules 2016-06-16 11:50:26 +0000
132@@ -22,6 +22,8 @@
133 --with-linkedin-consumer-secret="BazRki2LE8eZtcqh" \
134 --with-instagram-client-id="01c3df41a2274a14882adea8e8ebbd46" \
135 --with-instagram-client-secret="4751ccdc39c648719ea83cfb1c866c26" \
136+ --with-mcloud-client-id="APP1ZtqoN3R0002" \
137+ --with-mcloud-client-secret="A70EFCDC91456349E7FDECF0A33574AC" \
138 --with-vk-client-id="5402699"
139
140 override_dh_install:
141
142=== modified file 'qml/Makefile.am'
143--- qml/Makefile.am 2016-04-18 12:06:17 +0000
144+++ qml/Makefile.am 2016-06-16 11:50:26 +0000
145@@ -2,6 +2,7 @@
146 facebook/Main.qml \
147 flickr/Main.qml \
148 google/Main.qml \
149+ mcloud/Main.qml \
150 owncloud/Main.qml \
151 owncloud/NewAccount.qml \
152 twitter/Main.qml \
153
154=== added directory 'qml/mcloud'
155=== added file 'qml/mcloud/Main.qml'
156--- qml/mcloud/Main.qml 1970-01-01 00:00:00 +0000
157+++ qml/mcloud/Main.qml 2016-06-16 11:50:26 +0000
158@@ -0,0 +1,6 @@
159+import Ubuntu.OnlineAccounts.Plugin 1.0
160+
161+OAuthMain {
162+ creationComponent: OAuth {
163+ }
164+}

Subscribers

People subscribed via source and target branches

to all changes: