107 Commits

Author SHA1 Message Date
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
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
0ae3d4edc9 Allow users to get extra fields from a token response. 2014-10-27 20:01:11 -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
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
CL Sung
099e4f09b0 Add Linkedin to the providers not supporting Auth headers. 2014-09-11 10:49:49 +08: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
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
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
948919caa0 Merge branch 'httpclient' 2014-09-03 18:04:35 -07:00
Alif Rachmawadi
eae9d0e836 removed NewTransport inline example 2014-09-03 08:27:29 +07:00
Burcu Dogan
8524783bd7 Allow configs to be initialised with zero values for Client and Transport. 2014-09-02 14:06:51 -07:00
Alif Rachmawadi
e049d530c3 fixed NewTransport example code 2014-09-02 21:17:45 +07:00
Burcu Dogan
32b45383ad Managed VM users should depend on http.DefaultTransport by default. 2014-08-31 16:08:13 -07:00
Burcu Dogan
6bb0a5207a Do not assume that http.DefaultClient and http.DefaultTransport is always available. 2014-08-31 15:17:36 -07:00
Burcu Dogan
3a5e8819eb Rename exchange code to code, document as authorization code. 2014-08-16 21:21:58 -07:00
Burcu Dogan
ee77246177 Don't provide a Transport interface but provide a http.RoundTripper implementation. 2014-08-14 10:59:09 -07:00
Burcu Dogan
b314823c0b TokenFetcher should not mutate existing tokens. 2014-08-13 16:47:57 -07:00
Burcu Dogan
b2a1756f98 Merge branch 'scopes-omit' 2014-08-13 14:05:44 -07:00
Burcu Dogan
de4c4313f9 Adding required client_secret credential. 2014-08-13 13:59:53 -07:00
Burcu Dogan
f9dc7568c2 Docs improvements, lint error fixes. 2014-08-13 13:40:18 -07:00
Burcu Dogan
03e5fbeae0 Fixing json tags. 2014-08-12 23:42:30 -07:00
Burcu Dogan
a9dc52b3d3 Docs, code cleanups. 2014-08-12 19:50:34 -07:00
Burcu Dogan
4c579cbd0d Export exchange.
Allows users to exchange and retrieve a token
without initialising a Transport.
2014-08-11 00:27:43 -07:00
Arnaud Ysmal
87013cb7c2 Make AccessType, ApprovalPrompt and RedirectURL optional. 2014-07-31 21:06:10 +02:00
Burcu Dogan
067c73f77e Clone authURL. 2014-07-21 16:44:58 -07:00
Burcu Dogan
4ad15bb1fc Remove named return values. 2014-07-20 21:07:57 -07:00
Burcu Dogan
70bd497612 Fail during conf init if auth or token URL is not valid. 2014-07-20 16:56:38 -07:00
Burcu Dogan
6b4f2ed2ce Use default client rather than a new client instance. 2014-07-14 10:26:21 -07:00
Burcu Dogan
0f597d5ad4 oauth2: don't use http.DefaultTransport.
http.DefaultTransport is not available on App Engine.
2014-07-11 10:57:28 -07:00
Johan Euphrosine
93ad3f4a9e remove cache 2014-07-08 22:27:34 -07:00
Burcu Dogan
5501212e88 Merge branch 'readme' 2014-06-27 17:04:43 -07:00
Burcu Dogan
de1f5a349e Dont export exchange. 2014-06-26 17:27:53 -07:00
Burcu Dogan
c4d44ca3c9 Add examples for regular and JWT configs and transport init. 2014-06-24 12:44:20 -07:00
Burcu Dogan
4337573be3 oauth2: perform caching ops at the transport level 2014-06-17 16:09:09 +02:00
Burcu Dogan
002375a1dd Removing unnecessary option getters. 2014-05-26 17:29:56 +02:00
Burcu Dogan
4b558944a3 Provide missing docs for Cache interface and transport constructors. 2014-05-26 16:47:46 +02:00
Burcu Dogan
58513eb0ea Provide a transport constructor for transporters with a cache. 2014-05-26 14:45:41 +02:00
Burcu Dogan
0476447419 Moving error handlers to the cache implementations. 2014-05-21 15:56:44 +02:00
Burcu Dogan
dd66946789 Merge branch 'cache' of github.com:rakyll/oauth2 into cache 2014-05-21 15:24:41 +02:00