
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
ajn-session
Advanced tools
A very simple and lightweight session manager
Configuration options:
Session.sessionLifeTime Number, default is 60000 * 30, which is 60 min
Session.maxSize Number, Max size of all data stored per session in bytes, default is 262144 bytes
Session.sessionName String, Name of the session cookie, default is 'nodesess';
usage:
var Session = require('../index').Session; var http = require('http');
var srv = http.createServer(function (req, res) { // initialize a session object on each request, pass the request and // response objects to it it will discover if session is alread set, and // create one if it isn't var session = new Session(req, res);
// set foo session property value to bar
session.setData('foo', 'bar');
// get foo session property value and print it to console
console.log(session.getData('foo'));
// delete foo session property value to bar
session.delData('foo');
// print 'foo' session property to console, it must return undefined
console.log(session.getData('foo'));
....
}); srv.listen(1111, '127.0.0.1');
FAQs
A very simple and lightweight session manager
The npm package ajn-session receives a total of 0 weekly downloads. As such, ajn-session popularity was classified as not popular.
We found that ajn-session demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.