fh-aaa-client
Advanced tools
Comparing version 0.0.1-11 to 0.1.0-12
@@ -11,8 +11,3 @@ var _ = require('underscore'); | ||
return function(req, cb){ | ||
if (typeof explain === 'function'){ | ||
cb = explain; | ||
explain = false; | ||
} | ||
if (!req['user-id'] || !req['business-objects'] || !req.perm){ | ||
if (!req['user-id'] || !req['business-objects'] || !req.perm || typeof cb !== 'function'){ | ||
return cb(new Error('Error - invalid arguments')); | ||
@@ -19,0 +14,0 @@ } |
@@ -5,7 +5,17 @@ var request = require('request'); | ||
return function doAAARequest(path, body, cb){ | ||
var url = config.protocol + '://' + config.host + path; | ||
request.post({ | ||
var url = config.protocol + '://' + config.host + path, | ||
method = 'POST', | ||
requestParams; | ||
if (typeof body === 'function'){ | ||
cb = body; | ||
method = 'GET'; | ||
body = true; | ||
} | ||
requestParams = { | ||
url : url, | ||
json : body | ||
}, function(err, res, body){ | ||
json : body, | ||
method : method | ||
}; | ||
request(requestParams, function(err, res, body){ | ||
if (err || res.statusCode !== 200){ | ||
@@ -12,0 +22,0 @@ return cb(err || 'Error ' + res.statusCode); |
@@ -11,3 +11,3 @@ var _ = require('underscore'); | ||
return function(req, cb){ | ||
if (!req['user-id'] || !req['business-objects']){ | ||
if (!req['user-id'] || !req['business-objects'] || typeof cb !== 'function'){ | ||
return cb(new Error('Error - invalid arguments')); | ||
@@ -14,0 +14,0 @@ } |
@@ -6,4 +6,5 @@ var request = require('request'); | ||
canAccess : require('./canAccess')(config), | ||
filterList : require('./filterList')(config) | ||
filterList : require('./filterList')(config), | ||
getTeam : require('./getTeam')(config), | ||
}; | ||
}; |
{ | ||
"name": "fh-aaa-client", | ||
"description": "FeedHenry Authentication, Authorization, and Accounting (AAA) Client", | ||
"version": "0.0.1-11", | ||
"version": "0.1.0-12", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -1,1 +0,1 @@ | ||
0.0.1-11 | ||
0.1.0-12 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3272
8
75