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

Issue 1466733002: Google OAuth Device Flow support for FNL (Closed)

Created:
5 years, 1 month ago by ukode
Modified:
4 years, 9 months ago
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, rudominer
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Added support for adding Google accounts on platforms other than Android such as FNL or Goobuntu. It also persists the refresh tokens using files service, which are later used for fetching access tokens without a re-auth. Also, retrieves both GaiaID and user's email using OpenIDConnect based idtokens. Bug# https://github.com/domokit/mojo/issues/600 Related design doc: https://docs.google.com/document/d/1-LWlQl-9iInkeyuP0EoPhehDvyz68FCK0w_pfzZaZwU/edit R=qsr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/1195c66530da45464688fb251a1610155e5e089d

Patch Set 1 #

Patch Set 2 : Removed GetTokenInfo method from authentication mojom interface #

Patch Set 3 : Added unit tests and fixed bugs in accounts DB. #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : fixes from initial feedback #

Patch Set 6 : updated demo namespaces #

Total comments: 28

Patch Set 7 : Updated patch for review comments #

Patch Set 8 : Fixed the android tests #

Patch Set 9 : Fixed the build indentation #

Patch Set 10 : Refactored google_auth_service into sub components #

Total comments: 6

Patch Set 11 : Patch after rebase to master #

Patch Set 12 : Updated comments for authentication.mojom #

Total comments: 21

Patch Set 13 : Addressed review comments #

Total comments: 50

Patch Set 14 : #

Patch Set 15 : Added SelectAccount implementation #

Patch Set 16 : Moved polling inside AddAccount interface #

Patch Set 17 : #

Total comments: 48

Patch Set 18 : Replaced auth data with credential_db.mojom #

Patch Set 19 : Rebased to master #

Total comments: 28

Patch Set 20 : Added more validation and some optimizations #

Patch Set 21 : Rebased to master #

Total comments: 4

Patch Set 22 : Renamed Validate to IsValid in AccountManager #

Patch Set 23 : rebased to master #

Patch Set 24 : Removed data_unittest.py #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2332 lines, -1306 lines) Patch
M examples/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
A + examples/authentication_demo/BUILD.gn View 1 2 11 12 13 14 15 16 17 18 1 chunk +6 lines, -3 lines 0 comments Download
A examples/authentication_demo/google_authentication_demo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +134 lines, -0 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 40 chunks +676 lines, -139 lines 0 comments Download
A mojo/dart/packages/mojo_services/lib/authentication/authentication_impl_db.mojom.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 21 22 1 chunk +163 lines, -0 lines 0 comments Download
D mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -953 lines 0 comments Download
M mojo/data_pipe_utils/data_pipe_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/data_pipe_utils/data_pipe_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +13 lines, -0 lines 0 comments Download
D mojo/public/tools/bindings/pylib/mojom_tests/generate/data_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -141 lines 0 comments Download
M mojo/services/authentication/interfaces/authentication.mojom View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +19 lines, -1 line 0 comments Download
M services/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +4 lines, -0 lines 0 comments Download
M services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +9 lines, -0 lines 0 comments Download
M services/authentication/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +45 lines, -3 lines 0 comments Download
A services/authentication/accounts_db_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +110 lines, -0 lines 0 comments Download
A services/authentication/accounts_db_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +292 lines, -0 lines 0 comments Download
A services/authentication/accounts_db_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +160 lines, -0 lines 0 comments Download
M services/authentication/authentication_impl_db.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
A services/authentication/credentials_impl_db.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +41 lines, -0 lines 0 comments Download
M services/authentication/dummy_authentication_app.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -65 lines 0 comments Download
A services/authentication/google_authentication_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +111 lines, -0 lines 0 comments Download
A services/authentication/google_authentication_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +457 lines, -0 lines 0 comments Download
A services/authentication/main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +68 lines, -0 lines 0 comments Download
M services/authentication/src/org/chromium/mojo/authentication/AuthenticationServiceImpl.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (13 generated)
jln (very slow on Chromium)
Hey Usha, Just two quick things before I start taking a look that you should ...
5 years ago (2015-12-01 00:08:44 UTC) #5
ukode
Thanks Julien. Pls see the comments inline. On 2015/12/01 00:08:44, jln (slow on Chromium) wrote: ...
5 years ago (2015-12-04 19:45:42 UTC) #6
jln (very slow on Chromium)
Sorry I'm being so slow to review this. I just took a quick look but ...
5 years ago (2015-12-08 22:27:29 UTC) #7
rudominer
Please make the tests pass on the trybots.
5 years ago (2015-12-14 23:46:50 UTC) #9
rudominer
Please associate this patch with a bug and in either this patch description or the ...
5 years ago (2015-12-14 23:48:38 UTC) #10
ukode
PTAL. https://chromiumcodereview.appspot.com/1466733002/diff/40001/examples/authentication_demo/google_authentication_demo.cc File examples/authentication_demo/google_authentication_demo.cc (right): https://chromiumcodereview.appspot.com/1466733002/diff/40001/examples/authentication_demo/google_authentication_demo.cc#newcode9 examples/authentication_demo/google_authentication_demo.cc:9: On 2015/12/01 00:08:44, jln (slow on Chromium) wrote: ...
5 years ago (2015-12-16 19:24:13 UTC) #12
rudominer
I'm not done reviewing but here are a few comments. https://codereview.chromium.org/1466733002/diff/180001/mojo/services/authentication/interfaces/authentication.mojom File mojo/services/authentication/interfaces/authentication.mojom (right): https://codereview.chromium.org/1466733002/diff/180001/mojo/services/authentication/interfaces/authentication.mojom#newcode31 ...
5 years ago (2015-12-17 07:28:30 UTC) #14
ukode
https://codereview.chromium.org/1466733002/diff/180001/mojo/services/authentication/interfaces/authentication.mojom File mojo/services/authentication/interfaces/authentication.mojom (right): https://codereview.chromium.org/1466733002/diff/180001/mojo/services/authentication/interfaces/authentication.mojom#newcode31 mojo/services/authentication/interfaces/authentication.mojom:31: // Requests an oauth2 device code response for the ...
5 years ago (2015-12-17 21:53:24 UTC) #15
viettrungluu
(Note: Please send code reviews to viettrungluu@chromium.org -- I'm more likely to notice them that ...
5 years ago (2015-12-18 20:59:49 UTC) #17
qsr
https://codereview.chromium.org/1466733002/diff/220001/services/authentication/src/org/chromium/mojo/authentication/AuthenticationServiceImpl.java File services/authentication/src/org/chromium/mojo/authentication/AuthenticationServiceImpl.java (right): https://codereview.chromium.org/1466733002/diff/220001/services/authentication/src/org/chromium/mojo/authentication/AuthenticationServiceImpl.java#newcode253 services/authentication/src/org/chromium/mojo/authentication/AuthenticationServiceImpl.java:253: callback.call(null, null, null, "Unsupported operation."); It seems that this ...
5 years ago (2015-12-21 14:22:42 UTC) #19
rudominer
Removing myself from the reviewers because I think you have plenty of Mojo feedback from ...
5 years ago (2015-12-21 16:52:46 UTC) #22
ukode
PTAL. https://codereview.chromium.org/1466733002/diff/220001/mojo/data_pipe_utils/data_pipe_utils.cc File mojo/data_pipe_utils/data_pipe_utils.cc (right): https://codereview.chromium.org/1466733002/diff/220001/mojo/data_pipe_utils/data_pipe_utils.cc#newcode123 mojo/data_pipe_utils/data_pipe_utils.cc:123: std::min(source.size(), max_buffer_size)}; On 2015/12/18 20:59:49, viettrungluu wrote: > ...
4 years, 11 months ago (2016-01-06 23:52:59 UTC) #24
ukode
On 2015/12/21 16:52:46, rudominer wrote: > Removing myself from the reviewers because I think you ...
4 years, 11 months ago (2016-01-06 23:53:31 UTC) #25
viettrungluu
Note that my comments about doing things asynchronously instead of synchronously apply everywhere. (These comments ...
4 years, 11 months ago (2016-01-11 21:23:45 UTC) #26
qsr
https://codereview.chromium.org/1466733002/diff/240001/examples/authentication_demo/google_authentication_demo.cc File examples/authentication_demo/google_authentication_demo.cc (right): https://codereview.chromium.org/1466733002/diff/240001/examples/authentication_demo/google_authentication_demo.cc#newcode55 examples/authentication_demo/google_authentication_demo.cc:55: // TODO: Replace this with polling logic or show ...
4 years, 11 months ago (2016-01-13 12:01:01 UTC) #27
ukode
Sorry this took a while between juggling various things. Changelog for the latest patch includes: ...
4 years, 10 months ago (2016-02-09 00:20:18 UTC) #28
qsr
https://codereview.chromium.org/1466733002/diff/320001/examples/authentication_demo/google_authentication_demo.cc File examples/authentication_demo/google_authentication_demo.cc (right): https://codereview.chromium.org/1466733002/diff/320001/examples/authentication_demo/google_authentication_demo.cc#newcode1 examples/authentication_demo/google_authentication_demo.cc:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 10 months ago (2016-02-16 14:17:06 UTC) #29
ukode
PTAL. Major change is now everything is using mojom structs instead of regular struct, and ...
4 years, 10 months ago (2016-02-26 21:35:50 UTC) #30
qsr
https://codereview.chromium.org/1466733002/diff/360001/services/authentication/accounts_db_manager.cc File services/authentication/accounts_db_manager.cc (right): https://codereview.chromium.org/1466733002/diff/360001/services/authentication/accounts_db_manager.cc#newcode88 services/authentication/accounts_db_manager.cc:88: it != creds_store_.credentials.end(); it++) { Why not use a ...
4 years, 9 months ago (2016-03-04 15:06:46 UTC) #31
ukode
https://codereview.chromium.org/1466733002/diff/360001/services/authentication/accounts_db_manager.cc File services/authentication/accounts_db_manager.cc (right): https://codereview.chromium.org/1466733002/diff/360001/services/authentication/accounts_db_manager.cc#newcode88 services/authentication/accounts_db_manager.cc:88: it != creds_store_.credentials.end(); it++) { On 2016/03/04 15:06:45, qsr ...
4 years, 9 months ago (2016-03-11 22:48:52 UTC) #32
qsr
lgtm https://codereview.chromium.org/1466733002/diff/400001/services/authentication/accounts_db_manager.cc File services/authentication/accounts_db_manager.cc (right): https://codereview.chromium.org/1466733002/diff/400001/services/authentication/accounts_db_manager.cc#newcode127 services/authentication/accounts_db_manager.cc:127: error_ = CREDENTIALS_DB_WRITE_ERROR; Maybe CHECK or DCHECK or ...
4 years, 9 months ago (2016-03-18 10:52:23 UTC) #33
ukode
https://codereview.chromium.org/1466733002/diff/400001/services/authentication/accounts_db_manager.cc File services/authentication/accounts_db_manager.cc (right): https://codereview.chromium.org/1466733002/diff/400001/services/authentication/accounts_db_manager.cc#newcode127 services/authentication/accounts_db_manager.cc:127: error_ = CREDENTIALS_DB_WRITE_ERROR; On 2016/03/18 10:52:22, qsr wrote: > ...
4 years, 9 months ago (2016-03-18 18:25:24 UTC) #34
ukode
4 years, 9 months ago (2016-03-18 21:19:01 UTC) #36
Message was sent while issue was closed.
Committed patchset #24 (id:450001) manually as
1195c66530da45464688fb251a1610155e5e089d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698