New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orator-session

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orator-session - npm Package Compare versions

Comparing version 1.0.20 to 1.0.21

2

package.json
{
"name": "orator-session",
"version": "1.0.20",
"version": "1.0.21",
"description": "Session state and authentication manager for Orator Restful web API server.",

@@ -5,0 +5,0 @@ "main": "source/Orator-Session.js",

@@ -479,2 +479,24 @@ /**

/**
* Lookup session from session store, but only retrieve related userID key
*
* @method getSessionUserID
*/
var getSessionUserID = function(pSessionID, fCallback)
{
libSessionStore.get(pSessionID,
function(pError, pData)
{
var tmpUserID = 0;
if (pData)
{
var tmpSessionData = JSON.parse(pData);
if (tmpSessionData.UserID)
tmpUserID = tmpSessionData.UserID;
}
return fCallback(pError, tmpUserID);
});
}
//TODO: make this extensible

@@ -544,2 +566,3 @@ var formatUserPacketFromRecord = function(pUserRecord)

checkoutSessionToken: checkoutSessionToken,
getSessionUserID: getSessionUserID,
formatEmptyUserPacket: formatEmptyUserPacket,

@@ -546,0 +569,0 @@ formatUserPacketFromRecord: formatUserPacketFromRecord,

@@ -34,2 +34,3 @@ /**

var _OratorSession;
var _SessionID;

@@ -302,2 +303,4 @@ setup

.to.equal(200);
_SessionID = pResponse.body.SessionID;
fDone();

@@ -330,2 +333,14 @@ }

(
'Lookup user id from session id (internal)',
function(fDone)
{
_OratorSession.getSessionUserID(_SessionID, function(pError, pUserID)
{
Expect(pUserID).to.equal(1);
return fDone();
});
}
);
test
(
'Shutdown Orator WebServer',

@@ -332,0 +347,0 @@ function()

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc