Merge pull request #154 from bradgignac/remove-type-parameter

Remove type query parameter from OAuth2 requests.
This commit is contained in:
Ciaran Jessup 2014-01-04 06:07:19 -08:00
commit d8d3f9c8fc
1 changed files with 1 additions and 3 deletions

View File

@ -132,13 +132,12 @@ exports.OAuth2.prototype._executeRequest= function( http_library, options, post_
if( options.method == 'POST' && post_body ) {
request.write(post_body);
}
request.end();
request.end();
}
exports.OAuth2.prototype.getAuthorizeUrl= function( params ) {
var params= params || {};
params['client_id'] = this._clientId;
params['type'] = 'web_server';
return this._baseSite + this._authorizeUrl + "?" + querystring.stringify(params);
}
@ -146,7 +145,6 @@ exports.OAuth2.prototype.getOAuthAccessToken= function(code, params, callback) {
var params= params || {};
params['client_id'] = this._clientId;
params['client_secret'] = this._clientSecret;
params['type']= 'web_server';
var codeParam = (params.grant_type === 'refresh_token') ? 'refresh_token' : 'code';
params[codeParam]= code;