Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(69)

Issue 165550043: oauth2: Introduce an option function type

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by jbd
Modified:
11 years ago
Reviewers:
adg1
CC:
djd
Visibility:
Public.

Description

- Reduce the duplicate code by merging the flows and determining the flow type by looking at the provided options. - Options as a function type allows us to validate an individual an option in its scope and makes it easier to compose the built-in options with the third-party ones.

Patch Set 1 #

Total comments: 18

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+821 lines, -748 lines) Patch
M example_test.go View 1 2 3 4 5 4 chunks +33 lines, -29 lines 0 comments Download
M google/appengine.go View 1 2 3 2 chunks +67 lines, -88 lines 0 comments Download
M google/appengine_test.go View 1 6 chunks +41 lines, -14 lines 0 comments Download
M google/appenginevm.go View 1 2 3 2 chunks +66 lines, -88 lines 0 comments Download
M google/appenginevm_test.go View 6 chunks +41 lines, -14 lines 0 comments Download
M google/example_test.go View 1 3 chunks +58 lines, -44 lines 0 comments Download
M google/google.go View 1 2 3 4 5 6 2 chunks +83 lines, -100 lines 0 comments Download
A internal/oauth2.go View 1 chunk +36 lines, -0 lines 0 comments Download
M jws/jws.go View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M jwt.go View 1 2 3 4 5 6 3 chunks +82 lines, -160 lines 0 comments Download
M jwt_test.go View 3 chunks +37 lines, -17 lines 0 comments Download
M oauth2.go View 1 2 3 4 5 6 7 5 chunks +194 lines, -118 lines 0 comments Download
M oauth2_test.go View 7 chunks +65 lines, -53 lines 0 comments Download
M transport.go View 1 2 3 4 7 chunks +6 lines, -17 lines 0 comments Download
M transport_test.go View 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 14
adg1
https://codereview.appspot.com/165550043/diff/1/google/example_test.go File google/example_test.go (right): https://codereview.appspot.com/165550043/diff/1/google/example_test.go#newcode32 google/example_test.go:32: "https://www.googleapis.com/auth/blogger"), prefer ", ) https://codereview.appspot.com/165550043/diff/1/google/example_test.go#newcode131 google/example_test.go:131: google.ComputeEngineAccount(""), put an ...
11 years ago (2014-11-06 22:52:42 UTC) #1
adg1
https://codereview.appspot.com/165550043/diff/1/oauth2.go File oauth2.go (right): https://codereview.appspot.com/165550043/diff/1/oauth2.go#newcode227 oauth2.go:227: func (o *Options) retrieveToken(v url.Values) (*Token, error) { I ...
11 years ago (2014-11-06 22:56:30 UTC) #2
jbd
https://codereview.appspot.com/165550043/diff/1/google/example_test.go File google/example_test.go (right): https://codereview.appspot.com/165550043/diff/1/google/example_test.go#newcode32 google/example_test.go:32: "https://www.googleapis.com/auth/blogger"), On 2014/11/06 22:52:41, adg1 wrote: > prefer > ...
11 years ago (2014-11-06 23:23:52 UTC) #3
adg1
https://codereview.appspot.com/165550043/diff/1/oauth2.go File oauth2.go (right): https://codereview.appspot.com/165550043/diff/1/oauth2.go#newcode92 oauth2.go:92: f := &Flow{ On 2014/11/06 23:23:52, jbd wrote: > ...
11 years ago (2014-11-06 23:29:51 UTC) #4
jbd
> to me, the switch indicates that there are a few distinct paths for the ...
11 years ago (2014-11-07 00:35:03 UTC) #5
adg1
^_^ On Fri Nov 07 2014 at 11:35:03 AM <jbd@google.com> wrote: > > to me, ...
11 years ago (2014-11-07 00:39:20 UTC) #6
jbd
Btw, if the Flow is type Flow struct { opts Options } Maybe Options is ...
11 years ago (2014-11-07 02:59:16 UTC) #7
adg1
Well this protects the options from being manipulated after the object is created. On Fri, ...
11 years ago (2014-11-07 03:02:07 UTC) #8
jbd
> Well this protects the options from being manipulated after the object is > created. ...
11 years ago (2014-11-07 03:19:14 UTC) #9
jbd
PTAL
11 years ago (2014-11-07 03:56:44 UTC) #10
jbd
Can I have a LGTM?
11 years ago (2014-11-10 03:13:54 UTC) #11
adg1
Yeah, all the sub-repo stuff jumped in the way this morning but I'm reviewing this ...
11 years ago (2014-11-10 03:16:53 UTC) #12
adg1
LGTM
11 years ago (2014-11-10 03:24:14 UTC) #13
jbd
11 years ago (2014-11-10 03:54:18 UTC) #14
Submitted as 0cf6f9b144f92af7a901094e39b22c310f4ea2cd. BREAK ALL THE BUILDS!!!!!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b