Commit Graph

236 Commits

Author SHA1 Message Date
Burcu Dogan 79dad4e0f4 oauth2: add CONTRIBUTING
Change-Id: I8775dc83b8fda3954032921f120eab223d1551b4
Reviewed-on: https://go-review.googlesource.com/1651
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-17 00:02:23 +00:00
Johan Euphrosine a360c4ed80 oauth2: fix typo
Change-Id: Ic39a63c50a042ab836bbc496db9aea7fb52870d2
Reviewed-on: https://go-review.googlesource.com/1652
Reviewed-by: Burcu Dogan <jbd@google.com>
2014-12-16 18:11:04 +00:00
Brad Fitzpatrick 1679411e42 github: new package with Github's Endpoint
Change-Id: I4a64493f521678570a89d5da76604c258fb9ceac
Reviewed-on: https://go-review.googlesource.com/1631
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-16 06:37:13 +00:00
Burcu Dogan 9b6b7610ad oauth2: rewrite google package, fix the broken build
Change-Id: I2753a88d7be483bdbc0cac09a1beccc4806ea4bc
Reviewed-on: https://go-review.googlesource.com/1361
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-16 06:20:58 +00:00
Brad Fitzpatrick a568078818 oauth2: redesign the API
Tests and examples aren't updated yet. The tree will be broken after this,
but nobody should be using this yet anyway.

Change-Id: I0004c738f40919ab46d107c71c011c510fbc748f
Reviewed-on: https://go-review.googlesource.com/1246
Reviewed-by: Burcu Dogan <jbd@google.com>
2014-12-16 06:20:49 +00:00
Burcu Dogan b3f9a68f05 oauth2: fix lint errors
Change-Id: I9cc4c61767be5e6eda189468430e9a89fe2f3796
2014-12-01 18:03:32 -08:00
Andrew Gerrand 3ec35f1969 Merge branch 'master' of https://github.com/golang/oauth2 2014-11-28 10:17:23 +11:00
Burcu Dogan e750a2fd5a oauth2: add vanity URL import comments, use the vanity URL on builds
Change-Id: Ia20e40d98aa709e3d598388e0a15501584152ab5
2014-11-26 11:47:34 -08:00
Burcu Dogan 5fd31d511c Merge pull request #50 from snikch/fix-json-expiry
Handle expiry correctly in json response
2014-11-25 19:48:01 -08:00
Burcu Dogan b846388564 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
2014-11-25 14:36:49 -08:00
Mal Curtis 778494f9ec Handle expiry correctly in json response
Go treats json numbers as float64 not int. Previously json response
expiry information was ignored since it was expected to be an int.
2014-11-21 13:07:44 +13:00
Burcu Dogan c048af9da2 Add Cacher interface. 2014-11-13 15:41:14 +11:00
Burcu Dogan 2d3ce25e9a Don't mutate the authorization endpoint.
Flow should be reusable, Options object should not be
mutated by the calls performed on the flow.
2014-11-12 10:02:14 +11:00
Burcu Dogan 0b8fcbadce Avoid setting an explicit token fetcher for the known flows. 2014-11-11 11:22:30 +11:00
Burcu Dogan 13cbb8b617 Disable builds for classic App Engine.
Current build file doesn't build the subdirectories, therefore succeeds
without building the actual packages. We need to add the appengine
and appengine_internal manually to the GOPATH and enable the
appengine build again.
2014-11-10 16:03:50 +11:00
Burcu Dogan 0cf6f9b144 Introduce an option function type
- 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.
2014-11-08 09:46:26 +11:00
Burcu Dogan 49f4824137 Merge pull request #48 from gmlewis/cache-mock
Cache oauth tokens locally and with Memcache.
2014-10-31 17:13:19 -07:00
Glenn Lewis 94c2b61903 Locally cache oauth tokens.
This change is for both App Engine and Managed VMs so that these apps can scale without running into the app_identity_service quota limit due to calling appengine.AccessToken too frequently.  An added benefit of caching is that calls to Google APIs will be significantly sped up due to removing the round-trip calls to the api_identity_service.
2014-10-31 16:04:03 -07:00
Burcu Dogan 68ff865055 Merge pull request #47 from rakyll/build
Build against the appengine runtime
2014-10-29 20:02:47 -07:00
Burcu Dogan 8fcd49950f Build against the appengine runtime. 2014-10-29 19:51:15 -07:00
Burcu Dogan 0ae3d4edc9 Allow users to get extra fields from a token response. 2014-10-27 20:01:11 -07:00
Burcu Dogan 2e27b6b6cb Handle non-2xx for metadata server responses. 2014-10-23 10:06:00 -07:00
Burcu Dogan 4b407cace1 Support token expiration for Facebook OAuth 2.0.
Facebook's OAuth 2.0 implementation seems to be broken and
returns expires_in value in expires. Fallback to expires field to
handle the expiration time for Facebook.
2014-10-21 10:43:33 -07:00
Burcu Dogan 7e2b7b4a79 Merge pull request #45 from secondbit/master
Update metadata server URL to be a FQDN.
2014-10-07 16:21:44 -07:00
Paddy Foran ad051cf1e6 Update metadata server URL to be a FQDN.
Without a fully qualified domain name, containers (like Docker) can't
connect to the metadata server. Update the address for the metadata
server to be a FQDN so containers can use the library. See #44.
2014-10-07 17:38:45 -04:00
Andrew Gerrand 8f816d62a2 Merge pull request #43 from mjibson/master
SoundCloud and spelling fixes
2014-10-04 17:10:03 +10:00
Matt Jibson 123b41c5cb Add SoundCloud to the providers not supporting Auth headers 2014-10-04 02:16:01 -04:00
Matt Jibson 311200b953 Spelling 2014-10-04 02:15:35 -04:00
Andrew Gerrand c03fd6cc9b Merge branch 'master' of github.com:golang/oauth2 2014-09-30 07:38:32 +10:00
Andrew Gerrand 040e271ca2 use variadics and fix build tags for App Engine files 2014-09-30 07:38:10 +10:00
Burcu Dogan 271b19bc29 Merge branch 'master' of github.com:golang/oauth2 2014-09-22 08:46:15 -07:00
Burcu Dogan 7ffb9a8fe1 Fixing path.join for URL generation. 2014-09-22 08:37:20 -07:00
Burcu Dogan f8fee03cb3 Godoc links should seem to be linking to godoc.org 2014-09-18 00:42:53 -07:00
Burcu Dogan 29bcba0a21 Merge pull request #39 from clsung/master
Add Linkedin to the providers not supporting Auth headers.
2014-09-11 18:56:33 -07:00
CL Sung 099e4f09b0 Add Linkedin to the providers not supporting Auth headers. 2014-09-11 10:49:49 +08:00
Burcu Dogan 6d51104f2c Build should use the exact build tag configuration of GAE managed VMs. 2014-09-08 15:05:45 -07:00
Burcu Dogan bda32de83f Travis build should keep building appenginevm configuration. 2014-09-08 14:56:32 -07:00
Burcu Dogan a388976807 Fixing build constraints for GAE and GAE managed runtime.
GAE managed VM runtime contains both appengine and appenginevm
build tags. Currently, appengine.go is being built even if user
wants to use the package on managed VM that errors with no
"appengine" package to import.
2014-09-08 13:34:36 -07:00
Burcu Dogan 85a0f4506d Merge pull request #37 from stacktic/DropboxAuthFix
Add Dropbox to the providers not supporting Auth headers.
2014-09-08 09:59:12 -07:00
Burcu Dogan 16c7b8dd8a Merge pull request #36 from jtolds/master
fix token exchange
2014-09-08 09:58:20 -07:00
Arnaud Ysmal e6396819be Add Dropbox to the providers not supporting Auth headers.
Dropbox does not support mixing URL param and Auth header for authentication but the retrieveToken method forces the client_id to be sent in the URL param.
2014-09-07 19:05:03 +02:00
JT Olds 8551f9eee2 some pr review fixes 2014-09-06 19:03:51 -06:00
JT Olds e68820a209 fix token exchange 2014-09-06 17:39:43 -06:00
Burcu Dogan 97a89b3be5 Access type and approval prompt should be set at URL generation. 2014-09-04 23:30:06 -07:00
Burcu Dogan cb029f4c1f Fix error message prefix. 2014-09-04 13:33:06 -07:00
Burcu Dogan bb8496880f Don't assume optional fields are required and use Basic Auth if available.
See https://github.com/golang/oauth2/issues/33
2014-09-04 13:28:18 -07:00
Burcu Dogan 32b8a902e6 client_secret should be optional. 2014-09-04 12:03:06 -07:00
Burcu Dogan cd4a6ded37 Removing non-required initial Client and Transport values. 2014-09-04 11:58:35 -07:00
Burcu Dogan 9d409b9dbd Merge branch 'jsonkeyfile' 2014-09-03 19:26:04 -07:00
Burcu Dogan 948919caa0 Merge branch 'httpclient' 2014-09-03 18:04:35 -07:00