Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
restify-session
Advanced tools
Readme
This module is made to manage session without cookies in a REST server powered by restify. Please install Redis (>=2.0.0) in your server to enable this module. To create documentation you must install JSDuck and type in your terminal:
$ ./gen_doc.sh
When you need to access to your REST server with session from a javascript app for iOS bundled as native app using Phonegap/Cordova, you can't use cookies because since iOS 5 these are disables by default.
Install restify-session
as usual:
$ npm install --save restify-session
Is very simple to enable session:
// dependencies
var restify = require('restify'),
session = require('restify-session')({
debug : true,
ttl : 2
});
// create the server
var server = restify.createServer();
// attach the session manager
server.use(session.sessionManager)
// attach a route
server.get('/', function(req, res, next){
res.send({ success: true, session: req.session });
return next();
});
// start the server
server.listen(3000);
Save this file as server.js and start it in a terminal window:
$ node server.js
Open your browser and put the address of your server:
http://localhost:3000
Now you see an answer like this:
{"success":true,"session":{"sid":"ViS5pHE5n8McblTATbyFUJTGJyzVFeXOcAEZ41Zs"}}
You can see your session id (sid) into the response header:
Session-Id ViS5pHE5n8McblTATbyFUJTGJyzVFeXOcAEZ41Zs
See full documentation into doc folder.
All tests are written in mocha and designed to be run with npm:
$ npm test
FAQs
Session manager for REST server without cookies
The npm package restify-session receives a total of 22 weekly downloads. As such, restify-session popularity was classified as not popular.
We found that restify-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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.