Merge remote-tracking branch 'lukebaker/patch-1' into add_support_for_oauth2_token_refresh

This commit is contained in:
ciaranj 2012-04-24 21:19:02 +01:00
commit 64b2487199

View File

@ -118,7 +118,8 @@ exports.OAuth2.prototype.getOAuthAccessToken= function(code, params, callback) {
params['client_id'] = this._clientId; params['client_id'] = this._clientId;
params['client_secret'] = this._clientSecret; params['client_secret'] = this._clientSecret;
params['type']= 'web_server'; params['type']= 'web_server';
params['code']= code; var codeParam = (params.grant_type === 'refresh_token') ? 'refresh_token' : 'code';
params[codeParam]= code;
var post_data= querystring.stringify( params ); var post_data= querystring.stringify( params );
var post_headers= { var post_headers= {