Merge lp:~mardy/account-plugins/google-auth into lp:account-plugins

Proposed by Alberto Mardegan
Status: Merged
Approved by: Ken VanDine
Approved revision: 114
Merged at revision: 114
Proposed branch: lp:~mardy/account-plugins/google-auth
Merge into: lp:account-plugins
Diff against target: 58 lines (+14/-7)
3 files modified
data/providers/google.provider.in.in (+4/-4)
debian/changelog (+7/-0)
src/google.vala (+3/-3)
To merge this branch: bzr merge lp:~mardy/account-plugins/google-auth
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+167758@code.launchpad.net

Commit message

Fix Google authentication, which was broken with the lasted QUrl query
handling in Qt5.

Description of the change

Fix Google authentication, which was broken with the lasted QUrl query
handling in Qt5.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Works great

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/providers/google.provider.in.in'
2--- data/providers/google.provider.in.in 2013-02-25 06:19:48 +0000
3+++ data/providers/google.provider.in.in 2013-06-06 13:18:55 +0000
4@@ -13,12 +13,12 @@
5 <group name="oauth2">
6 <group name="web_server">
7 <setting name="Host">accounts.google.com</setting>
8- <setting name="AuthPath">o/oauth2/auth</setting>
9+ <!-- HACK: access_type is non standard, but Google requires it in
10+ order to return a refresh token -->
11+ <setting name="AuthPath">o/oauth2/auth?access_type=offline</setting>
12 <setting name="TokenPath">o/oauth2/token</setting>
13 <setting name="RedirectUri">https://wiki.ubuntu.com/</setting>
14- <!-- HACK: access_type is non standard, but Google requires it in
15- order to return a refresh token -->
16- <setting name="ResponseType">code&amp;access_type=offline</setting>
17+ <setting name="ResponseType">code</setting>
18 <setting name="Scope" type="as">['https://docs.google.com/feeds/','https://www.googleapis.com/auth/googletalk','https://www.googleapis.com/auth/userinfo.email','https://www.googleapis.com/auth/userinfo.profile','https://picasaweb.google.com/data/']</setting>
19 <setting name="ClientId">@GOOGLE_CLIENT_ID@</setting>
20 <setting name="ClientSecret">@GOOGLE_CLIENT_SECRET@</setting>
21
22=== modified file 'debian/changelog'
23--- debian/changelog 2013-06-06 00:56:08 +0000
24+++ debian/changelog 2013-06-06 13:18:55 +0000
25@@ -1,3 +1,10 @@
26+account-plugins (0.11daily13.06.06-0ubuntu2) UNRELEASED; urgency=low
27+
28+ * Fix Google authentication, which was broken with the lasted QUrl query
29+ handling in Qt5.
30+
31+ -- Alberto Mardegan <alberto.mardegan@canonical.com> Thu, 06 Jun 2013 16:15:17 +0300
32+
33 account-plugins (0.11daily13.06.06-0ubuntu1) saucy; urgency=low
34
35 [ Jeremy Bicha ]
36
37=== modified file 'src/google.vala'
38--- src/google.vala 2013-02-22 15:17:49 +0000
39+++ src/google.vala 2013-06-06 13:18:55 +0000
40@@ -31,15 +31,15 @@
41 /* Note the evil trick here: Google uses a couple of non-standard OAuth
42 * parameters: "access_type" and "approval_prompt"; the signon OAuth
43 * plugin doesn't (yet?) give us a way to provide extra parameters, so
44- * we fool it by appending them to the value of the "ResponseType".
45+ * we fool it by appending them to the value of the "AuthPath".
46 *
47 * We need to specify "access_type=offline" if we want Google to return
48 * us a refresh token.
49 * The "approval_prompt=force" string forces Google to ask for
50 * authentication.
51 */
52- oauth_params.insert ("ResponseType",
53- "code&access_type=offline&approval_prompt=force");
54+ oauth_params.insert ("AuthPath",
55+ "o/oauth2/auth?access_type=offline&approval_prompt=force");
56 set_oauth_parameters (oauth_params);
57
58 set_ignore_cookies (true);

Subscribers

People subscribed via source and target branches