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

Issue 6188069: Adding a credentials_from_code and credentials_from_clientsecrets_and_code function

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by kerp
Modified:
13 years ago
CC:
google-api-python-client_googlegroups.com
Visibility:
Public.

Description

Adding a credentials_from_code and credentials_from_clientsecrets_and_code function, based on suggestions from Joe. Both functions create a OAuth2WebServerFlow object, and then perform just the steps necessary to exchange an authorization_code for an access token, which gets wrapped up in a OAuth2Credentials object. These are primarily used for the "Get an authorization code from the client Javascript library, then pass that down to the server to exchange for an access_token" approach.

Patch Set 1 #

Total comments: 7

Patch Set 2 : Added four little unit test and made a few minor corrections, as per jgregorio's helpful suggestions #

Total comments: 6

Patch Set 3 : Added a "Raises" section to the documentation for our two calls #

Total comments: 2

Patch Set 4 : Reorganzied the imports. (Almost there...) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -0 lines) Patch
M oauth2client/client.py View 1 2 1 chunk +72 lines, -0 lines 0 comments Download
M tests/test_oauth2client.py View 1 2 3 3 chunks +68 lines, -0 lines 0 comments Download

Messages

Total messages: 10
jcgregorio_google
Also, each new function needs at least one unit test. http://codereview.appspot.com/6188069/diff/1/oauth2client/client.py File oauth2client/client.py (right): http://codereview.appspot.com/6188069/diff/1/oauth2client/client.py#newcode887 ...
13 years, 1 month ago (2012-05-14 21:16:13 UTC) #1
kerp
> Also, each new function needs at least one unit test. Done! Whew. That took ...
13 years, 1 month ago (2012-05-15 21:44:42 UTC) #2
kerp
http://codereview.appspot.com/6188069/diff/1/oauth2client/client.py File oauth2client/client.py (right): http://codereview.appspot.com/6188069/diff/1/oauth2client/client.py#newcode887 oauth2client/client.py:887: token_uri='https://accounts.google.com/o/oauth2/token'): On 2012/05/14 21:16:13, jcgregorio_google wrote: > 80 chars ...
13 years, 1 month ago (2012-05-15 21:45:00 UTC) #3
jcgregorio_google
http://codereview.appspot.com/6188069/diff/4001/oauth2client/client.py File oauth2client/client.py (right): http://codereview.appspot.com/6188069/diff/4001/oauth2client/client.py#newcode899 oauth2client/client.py:899: user_agent string, optional HTTP User-Agent to provide for this ...
13 years, 1 month ago (2012-05-21 12:58:51 UTC) #4
kerp
Done. PTAL http://codereview.appspot.com/6188069/diff/4001/oauth2client/client.py File oauth2client/client.py (right): http://codereview.appspot.com/6188069/diff/4001/oauth2client/client.py#newcode899 oauth2client/client.py:899: user_agent string, optional HTTP User-Agent to provide ...
13 years, 1 month ago (2012-05-21 19:57:08 UTC) #5
jcgregorio_google
http://codereview.appspot.com/6188069/diff/10001/tests/test_oauth2client.py File tests/test_oauth2client.py (right): http://codereview.appspot.com/6188069/diff/10001/tests/test_oauth2client.py#newcode30 tests/test_oauth2client.py:30: import os alphabetical order for imports
13 years, 1 month ago (2012-06-05 20:43:35 UTC) #6
kerp
http://codereview.appspot.com/6188069/diff/10001/tests/test_oauth2client.py File tests/test_oauth2client.py (right): http://codereview.appspot.com/6188069/diff/10001/tests/test_oauth2client.py#newcode30 tests/test_oauth2client.py:30: import os On 2012/06/05 20:43:35, jcgregorio_google wrote: > alphabetical ...
13 years ago (2012-06-12 21:44:26 UTC) #7
mimming
LGTM
13 years ago (2012-06-13 17:35:03 UTC) #8
jcgregorio_google
On 2012/06/13 17:35:03, mimming wrote: > LGTM lgtm
13 years ago (2012-06-14 13:09:26 UTC) #9
jcgregorio_google
13 years ago (2012-06-14 13:09:49 UTC) #10
Committed at
http://code.google.com/p/google-api-python-client/source/detail?r=3ebaf448901...

  Thanks!

On 2012/06/14 13:09:26, jcgregorio_google wrote:
> On 2012/06/13 17:35:03, mimming wrote:
> > LGTM
> 
> lgtm
Sign in to reply to this message.

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