You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

ewd-client

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.15.0 to 1.16.0

28

lib/proto/ewd-client.js

@@ -27,3 +27,3 @@ /*!

11 May 2017
26 July 2017

@@ -83,2 +83,5 @@ Thanks to Ward DeBacker for enhancements to the client functionality

var appName = application;
var jwt = false;
var jwt_decode;
if (typeof application === 'object') {

@@ -91,2 +94,4 @@ $ = application.$;

cookieName = application.cookieName;
jwt = application.jwt || false;
jwt_decode = application.jwt_decode;
}

@@ -122,2 +127,8 @@

}
else if (jwt) {
cb = function(responseObj) {
if (responseObj.message && responseObj.message.token) token = responseObj.message.token;
callback(responseObj);
};
}
EWD.on(type, cb, true);

@@ -148,2 +159,11 @@ }

if (!EWD.jwt) {
Object.defineProperty(EWD, 'jwt', {
get: function() {
if (jwt && jwt_decode) return jwt_decode(token);
return false;
}
});
}
console.log(application + ' registered');

@@ -154,2 +174,3 @@ EWD.emit('ewd-registered');

if (messageObj.type === 'ewd-reregister') {
if (jwt && messageObj.message.token) token = messageObj.message.token; // update JWT with new session info (ie new socketId)
console.log('Re-registered');

@@ -258,2 +279,3 @@ EWD.emit('ewd-reregistered');

messageObj.token = token;
messageObj.jwt = jwt;
socket.emit('ewdjs', messageObj);

@@ -303,2 +325,3 @@ delete messageObj.token;

};
if (jwt) message.jwt = jwt;
}

@@ -308,3 +331,4 @@ else {

type: 'ewd-register',
application: application
application: application,
jwt: jwt
};

@@ -311,0 +335,0 @@ }

2

package.json
{
"name": "ewd-client",
"version": "1.15.0",
"version": "1.16.0",
"description": "Browser (websocket & HTTP) Client for QEWD applications",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc