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
=== modified file 'data/providers/google.provider.in.in'
--- data/providers/google.provider.in.in 2013-02-25 06:19:48 +0000
+++ data/providers/google.provider.in.in 2013-06-06 13:18:55 +0000
@@ -13,12 +13,12 @@
13 <group name="oauth2">13 <group name="oauth2">
14 <group name="web_server">14 <group name="web_server">
15 <setting name="Host">accounts.google.com</setting>15 <setting name="Host">accounts.google.com</setting>
16 <setting name="AuthPath">o/oauth2/auth</setting>16 <!-- HACK: access_type is non standard, but Google requires it in
17 order to return a refresh token -->
18 <setting name="AuthPath">o/oauth2/auth?access_type=offline</setting>
17 <setting name="TokenPath">o/oauth2/token</setting>19 <setting name="TokenPath">o/oauth2/token</setting>
18 <setting name="RedirectUri">https://wiki.ubuntu.com/</setting>20 <setting name="RedirectUri">https://wiki.ubuntu.com/</setting>
19 <!-- HACK: access_type is non standard, but Google requires it in21 <setting name="ResponseType">code</setting>
20 order to return a refresh token -->
21 <setting name="ResponseType">code&amp;access_type=offline</setting>
22 <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>22 <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>
23 <setting name="ClientId">@GOOGLE_CLIENT_ID@</setting>23 <setting name="ClientId">@GOOGLE_CLIENT_ID@</setting>
24 <setting name="ClientSecret">@GOOGLE_CLIENT_SECRET@</setting>24 <setting name="ClientSecret">@GOOGLE_CLIENT_SECRET@</setting>
2525
=== modified file 'debian/changelog'
--- debian/changelog 2013-06-06 00:56:08 +0000
+++ debian/changelog 2013-06-06 13:18:55 +0000
@@ -1,3 +1,10 @@
1account-plugins (0.11daily13.06.06-0ubuntu2) UNRELEASED; urgency=low
2
3 * Fix Google authentication, which was broken with the lasted QUrl query
4 handling in Qt5.
5
6 -- Alberto Mardegan <alberto.mardegan@canonical.com> Thu, 06 Jun 2013 16:15:17 +0300
7
1account-plugins (0.11daily13.06.06-0ubuntu1) saucy; urgency=low8account-plugins (0.11daily13.06.06-0ubuntu1) saucy; urgency=low
29
3 [ Jeremy Bicha ]10 [ Jeremy Bicha ]
411
=== modified file 'src/google.vala'
--- src/google.vala 2013-02-22 15:17:49 +0000
+++ src/google.vala 2013-06-06 13:18:55 +0000
@@ -31,15 +31,15 @@
31 /* Note the evil trick here: Google uses a couple of non-standard OAuth31 /* Note the evil trick here: Google uses a couple of non-standard OAuth
32 * parameters: "access_type" and "approval_prompt"; the signon OAuth32 * parameters: "access_type" and "approval_prompt"; the signon OAuth
33 * plugin doesn't (yet?) give us a way to provide extra parameters, so33 * plugin doesn't (yet?) give us a way to provide extra parameters, so
34 * we fool it by appending them to the value of the "ResponseType".34 * we fool it by appending them to the value of the "AuthPath".
35 *35 *
36 * We need to specify "access_type=offline" if we want Google to return36 * We need to specify "access_type=offline" if we want Google to return
37 * us a refresh token.37 * us a refresh token.
38 * The "approval_prompt=force" string forces Google to ask for38 * The "approval_prompt=force" string forces Google to ask for
39 * authentication.39 * authentication.
40 */40 */
41 oauth_params.insert ("ResponseType",41 oauth_params.insert ("AuthPath",
42 "code&access_type=offline&approval_prompt=force");42 "o/oauth2/auth?access_type=offline&approval_prompt=force");
43 set_oauth_parameters (oauth_params);43 set_oauth_parameters (oauth_params);
4444
45 set_ignore_cookies (true);45 set_ignore_cookies (true);

Subscribers

People subscribed via source and target branches