Socket
Socket
Sign inDemoInstall

eh-api-client

Package Overview
Dependencies
47
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.3.0

test/internal.js

24

index.js

@@ -23,4 +23,6 @@ var

var Client = function(apiURL, lockUUID) {
this.lockUUID = lockUUID;
var Client = function(apiURL, options) {
options = options || {};
this.lockUUID = options.lockUUID;
this.internalAuth = options.internalAuth;
this.apiURL = apiURL;

@@ -51,2 +53,5 @@ };

}
if(this.internalAuth) {
reqParams.headers = {Authorization: "Internal " + this.internalAuth};
}
if(options.filter) {

@@ -120,2 +125,3 @@ var filterFields = [];

* @param {String} options.app
* @param {String} [options.lockType]
* @return {Client}

@@ -137,3 +143,5 @@ */

}
var client = new Client(self.apiURL, data.uuid);
var client = new Client(self.apiURL, {
lockUUID: data.uuid
});
cb(null, client);

@@ -143,2 +151,12 @@ });

/**
* @param {Number} userId
* @param {String} app
*/
Factory.prototype.getClient = function(userId, app) {
return new Client(this.apiURL, {
internalAuth: userId + ":" + app
});
};
module.exports = Factory;

2

package.json
{
"name": "eh-api-client",
"version": "0.2.0",
"version": "0.3.0",
"description": "Node.js rest client",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc