Commit Graph

96 Commits

Author SHA1 Message Date
8658d7d55b Remove type query parameter from OAuth2 requests.
While the type parameter was required in older versions of the OAuth2
specification, it was removed in version 8. Currently, this breaks OAuth2
against the Dropbox API. Closes #127.

http://tools.ietf.org/html/draft-ietf-oauth-v2-08#section-4.1.1
2013-07-27 18:42:14 -04:00
301ebab90c Added an extra test, and checked realHeaders to catch any dodgy custom ones 2013-03-05 18:07:40 +00:00
8be23c309c Merge remote-tracking branch 'jfromaniello/bug129' 2013-03-05 17:43:51 +00:00
03d713be9a Fixes Issue #129
Not ideal, but effectively reverts the default behaviour of the library to how 0.9.8 worked,
that is it passes the access_token as a query parameter to the server.

To allow the utility 'get' method to use an Authorization header *instead* then you need to
explicitly enable this behaviour by using the method :

  var oa= new Oauth(...);
  oa.useAuthorizationHeaderforGET(true)

Note this can/should be used in conjunction with the other utility method:

  oa.setAuthMethod(...)

The default value for the Authorization header is 'Bearer'

If you're building your own requests using oa._request then there is a new exported
method:

  oa.buildAuthHeader(token)
2013-03-05 17:34:20 +00:00
ba81ad43bd Fixes Issue #125 - Abusing externally passed in data structure
Also had to re-jig the test, as it turns out the contributor-supplied test
for this work didn't *actually* test anything :(
2013-03-05 17:00:35 +00:00
798157c185 fix #129 Setting token in query params and Authorization header violates spec 2013-03-05 04:04:00 -03:00
45a983e6dc Merge pull request #114 from rolandboon/master
Fix requests containing !'()* in POST data
2012-11-25 07:28:31 -08:00
efbce5bd68 Add in Authorization Header and support extra headers by default. 2012-11-21 10:29:30 -05:00
240a992553 Update lib/oauth.js
Fix the mismatch between the output of querystring.stringify() and this._encodeData().
2012-09-28 12:59:59 +03:00
3a15f03c34 Merge pull request #101 from GCheung55/patch-1
Update to make sure hostName exists before trying to act on it
2012-07-28 05:33:46 -07:00
d43a712548 Merge remote-tracking branch 'chrischw/master' 2012-07-28 13:25:12 +01:00
b03f6ae424 Remove excess double URL encoding introduced by fixes for issue #64 2012-07-28 13:09:32 +01:00
5fab3c577e Added an option to change the OAuth parameter seperator 2012-07-07 00:56:39 +02:00
409405f674 Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error. 2012-06-11 11:36:31 -07:00
d8d1e0bad7 fixed issue #64 w/ tests 2012-06-07 10:44:54 -07:00
64b2487199 Merge remote-tracking branch 'lukebaker/patch-1' into add_support_for_oauth2_token_refresh 2012-04-24 21:19:02 +01:00
ef51782104 Fix global scope leak, and amend decision on when to use https or http libraries 2012-04-24 21:11:20 +01:00
1970e0045e Merge remote-tracking branch 'dmathieu/fix_http' into not_require_http
Conflicts:
	lib/oauth2.js
2012-04-24 20:54:49 +01:00
e4cc471160 Merge commit '2e1f9f9' into oauth2_results_callback 2012-04-24 20:37:38 +01:00
e1a8422e7c Add support for refreshing an access token 2012-03-13 23:17:15 -03:00
6404f6e023 [ #Issue 75 ] Fixing Live Protocol 302 Resources 2011-10-26 14:05:03 -02:00
9b4703aaca request variable leaked into the global scope 2011-10-20 16:39:13 +03:00
32620902a5 don't send the request using https if the uri is http 2011-09-24 14:10:46 +02:00
2e1f9f9db6 callback results when getAccessToken 2011-09-21 01:26:33 +08:00
3c45927acd Fixes Issue #62 (adds another misbehaving host) 2011-08-23 20:59:47 +01:00
85805b6b1b Tidying up a method comment 2011-08-17 09:02:03 +01:00
aca047eaeb Reimplemented configurable http method for token requests using setClientOptions 2011-08-17 08:42:58 +01:00
49c83f1824 Documented behaviour of getOAuthRequestToken 2011-08-16 14:04:01 +01:00
1b4624cacd Added support for GET when requesting request tokens 2011-08-16 13:26:49 +01:00
a2ac03bc37 uggh committed a console.log 2011-08-15 23:43:29 +01:00
707b8f77b2 OAuth2 getOAuthAccessToken now POSTs rather than GET as per the spec (v20) 2011-08-15 23:30:47 +01:00
0643395b2e Supports OAuth Providers that don't end connections neatly (Google!) 2011-08-15 23:27:06 +01:00
d8b5731446 Added support and test coverage for following 301 redirects 2011-07-08 10:04:45 -04:00
5707c480df Adding a configuration mechanism (that may not stay) to allow overriding of the name of the access token used when requesting resources 2011-06-30 00:03:22 +01:00
5f383ff1b1 fix content length for oauth 1.0 2011-06-25 12:36:25 +04:00
3ed11c05bd Inverting the branch logic for easier reading 2011-06-23 22:18:11 +01:00
c78a9ca129 Match all 2xx response codes. 2011-06-23 09:14:46 -07:00
37c2408187 Some minor reformatting and 'standardisation' of the merged code
Also updating package.json to reflect Echo support
2011-05-10 23:31:14 +01:00
ed01a23da1 Refactored OAuthEcho object into oauth.js to remove lots of redundancy 2011-05-08 23:07:57 -04:00
0158a78c4c Added support for OAuth Echo 2011-05-05 10:56:23 -04:00
9fea0b5458 Added tests for 302 redirect functionality 2011-04-19 23:09:20 +01:00
15f06f254f Follow 302 redirects with "Location" header 2011-02-26 15:01:54 +01:00
13d9420c94 Merge branch '0.4_compat_fixes'
Conflicts:
	lib/oauth.js
2011-02-13 11:41:15 +00:00
349d258b1f Updated the Oauth2 code to work with the new https api 2011-02-06 19:52:44 +00:00
5041ca168a closes 24 - Now compatible with node v0.3.7 2011-02-02 21:35:04 +00:00
98e432b431 Compatibility with node 0.3.8 2011-02-02 19:34:32 +00:00
40b70bb9ef Renaming variable sshEnabled -> sslEnabled 2010-12-18 07:52:48 -08:00
3331aefe27 Resolves Issue 18 - Handles node.js querystring a little better
in the edge case on composite parameters such as foo[bar] :)
2010-12-13 20:04:41 +00:00
fd2fad54da Adds support for PUT & DELETE verbs. Fixes #13 2010-12-12 23:06:24 +00:00
2c0b8c3b79 Fixes issue 17 - Handles rev07 and above of the OAuth spec 2010-12-12 22:38:56 +00:00