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

Issue 10178020: Start implementing an auth flow for platform apps to be able to do auth (Closed)

Created:
8 years, 8 months ago by Munjal (Google)
Modified:
8 years, 7 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip+watch_chromium.org
Visibility:
Public.

Description

BUG=124493 Implementation of a new API, launchAuthFlow, that allows the apps to perform any auth protocol with any provider. - Add the API boilerplate (patches from Jon's CL) - Create a new ExtensionAuthFlow class that encapsulates the WebContents / WebView / Widget code to perform the auth flow - Use ExtensionAuthFlow in the API implementation. Note that we currently allow two URL formats for redirect back from the provider: 1. chrome-extension://<extension-id>/ 2. https://<extension-id>.ext.chromium.org/ We would ideally want just 1, but providers don't currently allow such a scheme. So we allow 2 as a workaround and if/when providers add support for 1, we can remove 2. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138039

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 38

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 10

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Total comments: 14

Patch Set 23 : #

Patch Set 24 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+825 lines, -6 lines) Patch
M chrome/browser/extensions/api/identity/identity_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/identity/identity_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +37 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/identity/identity_apitest.cc 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 +29 lines, -6 lines 0 comments Download
A chrome/browser/extensions/api/identity/web_auth_flow.h 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 +111 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/identity/web_auth_flow.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 23 1 chunk +174 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc 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 +209 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_registry.cc 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 +1 line, -0 lines 0 comments Download
A chrome/browser/ui/extensions/web_auth_flow_window.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 +59 lines, -0 lines 0 comments Download
A chrome/browser/ui/extensions/web_auth_flow_window.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 +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/extensions/web_auth_flow_window_views.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 +49 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/extensions/web_auth_flow_window_views.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 +60 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi 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 +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi 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 +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/experimental_identity.json 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 +28 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/identity/test.js 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 +8 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
sky
https://chromiumcodereview.appspot.com/10178020/diff/1/chrome/browser/extensions/api/identity/extension_auth_flow.h File chrome/browser/extensions/api/identity/extension_auth_flow.h (right): https://chromiumcodereview.appspot.com/10178020/diff/1/chrome/browser/extensions/api/identity/extension_auth_flow.h#newcode75 chrome/browser/extensions/api/identity/extension_auth_flow.h:75: scoped_ptr<views::WebView> web_view_; Views are normally owned by their parent. ...
8 years, 8 months ago (2012-04-27 18:27:38 UTC) #1
Munjal (Google)
John, can you review the usage of WebContents / WebContentsDelegate / Widget / WidgetDelegate parts ...
8 years, 7 months ago (2012-05-02 18:03:21 UTC) #2
Munjal (Google)
Also, I already tried this with Google and Facebook OAuth2 endpoints and both work great.
8 years, 7 months ago (2012-05-02 18:03:59 UTC) #3
jam
On 2012/05/02 18:03:21, munjal wrote: > John, can you review the usage of WebContents / ...
8 years, 7 months ago (2012-05-03 17:17:51 UTC) #4
Munjal (Google)
Mihai, can you please take a look? On Thu, May 3, 2012 at 10:17 AM, ...
8 years, 7 months ago (2012-05-03 19:32:42 UTC) #5
Mihai Parparita -not on Chrome
https://chromiumcodereview.appspot.com/10178020/diff/26003/chrome/browser/extensions/api/identity/extension_auth_flow.cc File chrome/browser/extensions/api/identity/extension_auth_flow.cc (right): https://chromiumcodereview.appspot.com/10178020/diff/26003/chrome/browser/extensions/api/identity/extension_auth_flow.cc#newcode28 chrome/browser/extensions/api/identity/extension_auth_flow.cc:28: "https://%s.ext.chromium.org/"; I would prefer not use chromium.org, since it's ...
8 years, 7 months ago (2012-05-04 22:37:18 UTC) #6
Avi (use Gerrit)
My advice: - File a bug for this feature. - Put the link to the ...
8 years, 7 months ago (2012-05-07 23:31:12 UTC) #7
Munjal (Google)
Thanks for a thorough review. Addressed most of the comments, except one thing: use of ...
8 years, 7 months ago (2012-05-08 19:26:35 UTC) #8
Avi (use Gerrit)
On 2012/05/08 19:26:35, munjal wrote: > Still figuring out details on how to address that. ...
8 years, 7 months ago (2012-05-08 20:03:55 UTC) #9
Avi (use Gerrit)
I was waaay too harsh here; I'm sorry. I didn't fully understand the context here ...
8 years, 7 months ago (2012-05-08 21:23:52 UTC) #10
Mihai Parparita -not on Chrome
https://chromiumcodereview.appspot.com/10178020/diff/26003/chrome/browser/extensions/api/identity/extension_auth_flow.h File chrome/browser/extensions/api/identity/extension_auth_flow.h (right): https://chromiumcodereview.appspot.com/10178020/diff/26003/chrome/browser/extensions/api/identity/extension_auth_flow.h#newcode33 chrome/browser/extensions/api/identity/extension_auth_flow.h:33: class ExtensionAuthFlow : public content::WebContentsDelegate, On 2012/05/08 19:26:35, munjal ...
8 years, 7 months ago (2012-05-08 21:33:30 UTC) #11
Munjal (Google)
Ok finally I am done with tests and making sure it compiles on non views ...
8 years, 7 months ago (2012-05-11 18:53:32 UTC) #12
Mihai Parparita -not on Chrome
https://chromiumcodereview.appspot.com/10178020/diff/39005/chrome/browser/extensions/api/identity/identity_api.cc File chrome/browser/extensions/api/identity/identity_api.cc (right): https://chromiumcodereview.appspot.com/10178020/diff/39005/chrome/browser/extensions/api/identity/identity_api.cc#newcode89 chrome/browser/extensions/api/identity/identity_api.cc:89: AddRef(); // Balanced in OnAuthFlowSuccess/Failed. Nit: "Failure" instead of ...
8 years, 7 months ago (2012-05-14 20:59:39 UTC) #13
Munjal (Google)
https://chromiumcodereview.appspot.com/10178020/diff/39005/chrome/browser/extensions/api/identity/identity_api.cc File chrome/browser/extensions/api/identity/identity_api.cc (right): https://chromiumcodereview.appspot.com/10178020/diff/39005/chrome/browser/extensions/api/identity/identity_api.cc#newcode89 chrome/browser/extensions/api/identity/identity_api.cc:89: AddRef(); // Balanced in OnAuthFlowSuccess/Failed. On 2012/05/14 20:59:39, Mihai ...
8 years, 7 months ago (2012-05-15 00:55:20 UTC) #14
Munjal (Google)
Done with everything. PTAL. https://chromiumcodereview.appspot.com/10178020/diff/39005/chrome/test/data/extensions/api_test/identity/test.js File chrome/test/data/extensions/api_test/identity/test.js (right): https://chromiumcodereview.appspot.com/10178020/diff/39005/chrome/test/data/extensions/api_test/identity/test.js#newcode15 chrome/test/data/extensions/api_test/identity/test.js:15: function launchAuthFlow() { On 2012/05/14 ...
8 years, 7 months ago (2012-05-15 18:20:02 UTC) #15
Mihai Parparita -not on Chrome
LGTM
8 years, 7 months ago (2012-05-15 23:48:30 UTC) #16
scottmg
Regarding the compile error, the header is "friend class ..." so it's probably fwd declaring ...
8 years, 7 months ago (2012-05-16 20:27:07 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/munjal@chromium.org/10178020/46033
8 years, 7 months ago (2012-05-16 21:43:30 UTC) #18
commit-bot: I haz the power
Presubmit check for 10178020-46033 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 7 months ago (2012-05-16 21:43:49 UTC) #19
Munjal (Google)
Scott, can you take a look at stuff under chrome/browser/ui?
8 years, 7 months ago (2012-05-16 23:12:11 UTC) #20
sky
http://codereview.chromium.org/10178020/diff/46033/chrome/browser/ui/extensions/web_auth_flow_window.cc File chrome/browser/ui/extensions/web_auth_flow_window.cc (right): http://codereview.chromium.org/10178020/diff/46033/chrome/browser/ui/extensions/web_auth_flow_window.cc#newcode32 chrome/browser/ui/extensions/web_auth_flow_window.cc:32: WebAuthFlowWindow::~WebAuthFlowWindow() { method order should match header. http://codereview.chromium.org/10178020/diff/46033/chrome/browser/ui/extensions/web_auth_flow_window.h File ...
8 years, 7 months ago (2012-05-16 23:17:10 UTC) #21
Munjal (Google)
Scott, thanks for the quick review. All done. PTAL. http://codereview.chromium.org/10178020/diff/46033/chrome/browser/ui/extensions/web_auth_flow_window.cc File chrome/browser/ui/extensions/web_auth_flow_window.cc (right): http://codereview.chromium.org/10178020/diff/46033/chrome/browser/ui/extensions/web_auth_flow_window.cc#newcode32 chrome/browser/ui/extensions/web_auth_flow_window.cc:32: ...
8 years, 7 months ago (2012-05-16 23:33:43 UTC) #22
sky
8 years, 7 months ago (2012-05-17 03:39:07 UTC) #23
LGTM

Powered by Google App Engine
This is Rietveld 408576698