11 Commits

Author SHA1 Message Date
Andrew Martens
a742d838f5 Set default User-Agent if not otherwise specified in customHeaders 2013-05-07 14:38:04 -07:00
ciaranj
301ebab90c Added an extra test, and checked realHeaders to catch any dodgy custom ones 2013-03-05 18:07:40 +00:00
ciaranj
8be23c309c Merge remote-tracking branch 'jfromaniello/bug129' 2013-03-05 17:43:51 +00:00
ciaranj
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
ciaranj
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
Jose F. Romaniello
798157c185 fix #129 Setting token in query params and Authorization header violates spec 2013-03-05 04:04:00 -03:00
Brian Park
efbce5bd68 Add in Authorization Header and support extra headers by default. 2012-11-21 10:29:30 -05:00
ciaranj
c631a31503 Adding a test for the refresh_token grant type support 2012-04-24 21:40:24 +01:00
ciaranj
6fa0288805 Adding test for passing back the extra data to the OAuth2 getOAuthAccessToken caller 2012-04-24 20:44:58 +01:00
ciaranj
707b8f77b2 OAuth2 getOAuthAccessToken now POSTs rather than GET as per the spec (v20) 2011-08-15 23:30:47 +01:00
ciaranj
2c0b8c3b79 Fixes issue 17 - Handles rev07 and above of the OAuth spec 2010-12-12 22:38:56 +00:00