Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(385)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 6998048: Add appengineutil package with OAuth helpers for App Engine

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by jasonhall
Modified:
13 years ago
Reviewers:
adg
Visibility:
Public.
Add appengineutil package with OAuth helpers for App Engine

Patch Set 1 #

Patch Set 2 : . #

Total comments: 12
Created: 13 years ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -0 lines) Patch
A oauth/appengineutil/appengineutil.go View 1 chunk +189 lines, -0 lines 12 comments Download
A oauth/appengineutil/example/app.yaml View 1 1 chunk +8 lines, -0 lines 0 comments Download
A oauth/appengineutil/example/app/app.go View 1 chunk +50 lines, -0 lines 0 comments Download
Total messages: 2
|
adg
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineutil.go File oauth/appengineutil/appengineutil.go (right): https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineutil.go#newcode147 oauth/appengineutil/appengineutil.go:147: type datastoreCache struct { You should export this so ...
13 years ago (2013年01月08日 00:50:56 UTC) #1
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
File oauth/appengineutil/appengineutil.go (right):
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:147: type datastoreCache struct {
You should export this so that it can be used independently of the other stuff
you have here.
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:148: c appengine.Context
Export these fields as Context and User
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:150: }
add a Kind field, so the user can specify a custom datastore kind
you could make a blank kind default to "oauth.Token"
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:157: item, e := memcache.Get(d.c, d.u.ID)
memcache keys should have some kind of prefix (perhaps the Kind?), to avoid
stepping on other cache keys
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:173: func (d datastoreCache) PutToken(t
*oauth.Token) (err error) {
don't bother with the named return var here, it just makes the function more
tricky
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:177: return
return err
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:181: encoded, e := json.Marshal(t)
s/e/err/
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:182: if e == nil {
if err != nil {
 return err
}
regularity trumps concise code
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:183: memcache.Set(d.c, &memcache.Item{
check the error return and log the error, if any
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:188: return
return nil
Sign in to reply to this message.
adg
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineutil.go File oauth/appengineutil/appengineutil.go (right): https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineutil.go#newcode83 oauth/appengineutil/appengineutil.go:83: config.RedirectURL = getRedirectURL(c) I think you should export getRedirectURL ...
13 years ago (2013年01月08日 00:53:52 UTC) #2
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
File oauth/appengineutil/appengineutil.go (right):
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:83: config.RedirectURL = getRedirectURL(c)
I think you should export getRedirectURL too, and don't mutate config inside
MustOAuth and NewOAuthCallbackHandlerFunc
https://codereview.appspot.com/6998048/diff/5/oauth/appengineutil/appengineut...
oauth/appengineutil/appengineutil.go:118: // Make a local copy of the config.
I don't think this is necessary. We can probably rely on the OAuth config being
static.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /