oauth2: Removing the inconsistent and duplicate features, better naming

- Removed Flow, flow is a nothing but options.
- Renamed Cacher to Storer.
- Removed the setter from the Transport. Store should do the initial set.
  Getter is not removed, because extra fields are available through
  Transport.Token.Extra(). It's not pleasant to implement a custom Storer
  implementation to read such values.

oauth2: Remove VMs from the AppEngine example title
This commit is contained in:
Burcu Dogan
2014-11-24 17:07:50 -08:00
parent c048af9da2
commit b846388564
6 changed files with 114 additions and 133 deletions

View File

@@ -7,6 +7,7 @@
package google
import (
"net/http"
"strings"
"sync"
"time"
@@ -44,7 +45,9 @@ func init() {
func AppEngineContext(ctx appengine.Context) oauth2.Option {
return func(opts *oauth2.Options) error {
opts.TokenFetcherFunc = makeAppEngineTokenFetcher(ctx, opts)
opts.Transport = &urlfetch.Transport{Context: ctx}
opts.Client = &http.Client{
Transport: &urlfetch.Transport{Context: ctx},
}
return nil
}
}