Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Issue 134483008: Switch GAIA e-mail address retrieval from /GetUserInfo to /ListAccounts (Closed)

Created:
6 years, 11 months ago by bartfab (slow)
Modified:
6 years, 11 months ago
Reviewers:
xiyuan, zel
CC:
chromium-reviews, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org
Visibility:
Public.

Description

Switch GAIA e-mail address retrieval from /GetUserInfo to /ListAccounts Previously, the Chrome OS SAML login flow was passing the LSID obtained via /ServiceLogin to /GetUserInfo in order to retrieve the authenticated user's e-mail address. It turns out that this is wrong because /ServiceLogin yields a browser LSID and /GetUserInfo expects a programmatic LSID. In many cases, the two LSID flavors are identical and the existing code worked. But under some conditions, the browser LSID could be different, causing /GetUserInfo to fail. This CL switches to /ListAccounts instead, which handles browser LSIDs. An additional advantage of /ListAccounts is that it will read the LSID from cookies, removing the need to extract the LSID from the cookie jar explicitly. I could have further simplified the code by doing an XHR to /ListAccounts from the JS code of the auth extension, avoiding the JS -> C++ -> JS round trip. However, this would have been a CORS request, requiring the GAIA URL to be hard-coded in the auth extension's manifest. The implementation in this CL, which makes the /ListAccounts call from C++, is more flexible as it preserves the ability to change the GAIA URL via a command-line flag. BUG=332132 TEST=Updated browser test and manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245585

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -100 lines) Patch
M chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.h View 2 chunks +15 lines, -21 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.cc View 1 chunk +16 lines, -61 lines 0 comments Download
M google_apis/gaia/fake_gaia.h View 2 chunks +3 lines, -3 lines 0 comments Download
M google_apis/gaia/fake_gaia.cc View 3 chunks +7 lines, -15 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
bartfab (slow)
Hi Xiyuan, Could you please review authenticated_user_email_retriever.*? Hi Zel, Could you please review fake_gaia.*?
6 years, 11 months ago (2014-01-17 13:43:42 UTC) #1
zel
lgtm
6 years, 11 months ago (2014-01-17 15:52:34 UTC) #2
xiyuan
LGTM Good findings and I learned something today. :)
6 years, 11 months ago (2014-01-17 17:15:35 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/134483008/1
6 years, 11 months ago (2014-01-17 17:30:35 UTC) #4
commit-bot: I haz the power
6 years, 11 months ago (2014-01-17 19:35:32 UTC) #5
Message was sent while issue was closed.
Change committed as 245585

Powered by Google App Engine
This is Rietveld 408576698