Permalink
Browse files

Based on the OAuth 2.0 spec, we need to implement "Authorization" hea…

…der. Facebook seems to be ignoring this, but still must have.
  • Loading branch information...
1 parent 03f3692 commit 3c127cc77f2a1715cfbbe7806ada32da5471ebf1 hidetomo committed Apr 16, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/oauth2.js
View
@@ -44,6 +44,7 @@ exports.OAuth2.prototype._request= function(method, url, headers, post_body, acc
if( access_token ) {
if( ! parsedUrl.query ) parsedUrl.query= {};
parsedUrl.query[this._accessTokenName]= access_token;
+ realHeaders['Authorization']="OAuth2 " + access_token;
}
var result= "";

2 comments on commit 3c127cc

I'll just need to check the examples still work before merging this, but looks good to me :) Thank you.

Hmm, I'm struggling to see this in the latest specification, I think the relevant area is here: http://tools.ietf.org/html/draft-ietf-oauth-v2-25#section-7.1 but I can't see a token type of 'OAuth2' specified ? :(

Please sign in to comment.