{"_id":"dnode-session","_rev":"39-c4e828a249f66ef1053c0c4be02fb988","name":"dnode-session","description":"Expose your connect/express sessions to dnode","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.0":{"author":{"name":"Thomas Blobaum","email":"tblobaum@gmail.com","url":"http://tomblobaum.tumblr.com/"},"name":"dnode-session","description":"Expose your connect/express sessions to dnode","version":"0.3.0","repository":{"type":"git","url":"git://github.com/tblobaum/dnode-session.git"},"main":"index.js","engines":{"node":">=v0.6.0"},"dependencies":{"connect":"~1.8.0"},"devDependencies":{},"_npmUser":{"name":"tblobaum","email":"tblobaum@gmail.com"},"_id":"dnode-session@0.3.0","_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"62000707fd256fb069cf480ef0587b7d024f042a","tarball":"https://registry.npmjs.org/dnode-session/-/dnode-session-0.3.0.tgz","integrity":"sha512-7Q54ZBeFhKkTLv+d2lF0MhdjdldGlkZyMqG+e8OcUs4skcqJI62dJ5RI7x01jUnDVzknlPIUw3haKgAndcSLyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCem80nHswGBKqPevEauWHKFyUVDhXBSg9DDhsQkQ+OnAIhAIyjoRVKxJl8ZUQqiuyRZ0Ybqsh/svn5AeoHzwbGGZBS"}]},"maintainers":[{"name":"tblobaum","email":"tblobaum@gmail.com"}],"directories":{}},"0.3.1":{"author":{"name":"Thomas Blobaum","email":"tblobaum@gmail.com","url":"http://tomblobaum.tumblr.com/"},"name":"dnode-session","description":"Expose your connect/express sessions to dnode","version":"0.3.1","repository":{"type":"git","url":"git://github.com/tblobaum/dnode-session.git"},"main":"index.js","engines":{"node":">=v0.6.0"},"dependencies":{"connect":"~1.8.0"},"devDependencies":{},"_npmUser":{"name":"tblobaum","email":"tblobaum@gmail.com"},"_id":"dnode-session@0.3.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"4cb01f98bd3b4141510b5388069bef51dfd41883","tarball":"https://registry.npmjs.org/dnode-session/-/dnode-session-0.3.1.tgz","integrity":"sha512-dv2nGm/rFPBC0RoQHv/XlifiTV1ESTl/1kSRE1iRxq8rklLUaYTAGs77j5KEWSqJYvhWosMxBp6Fe60HZZQMPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGXH1GHi0+LWcXK88kMeBCQA6PVr29LKa87EnG8MUreAiAe7EA1pIUI1RrxzbUK1H+JCnFF+gp8oU/mqyEkxnvUwg=="}]},"readme":"dnode-session\n=============\n\nDNode session handling and integration with Express session storage\n\nInstallation\n------------\n\n    npm install dnode-session\n\nor from source\n\n    git clone git://github.com/tblobaum/dnode-session.git \n    cd dnode-session\n    npm link\n\nOptions\n-------\n\n* `key` session key (optional, default `connect.sid`)\n* `store` session store object\n* `keepAlive` persist session with socket connection (optional, default `true`)\n* `interval` refresh rate for keep alive (optional, default `120000`)\n\nUsage\n-----\n\nPass the same session store into dnodeSession as you did with express for integration\n\n```javascript\nvar dnode = require('dnode')\n  , dnodeSession = require('dnode-session')\n  , express = require('express')\n  , redisStore = require('connect-redis')(express)\n  , server = express.createServer()\n  , sessionStore = new redisStore()\n\nserver.use(express.session({ \n  secret: 'agent'\n, store: sessionStore\n})\n\ndnode()\n  .use(dnodeSession({\n    store: sessionStore\n  }))\n  .listen(server)\n\nserver.listen()\n````\n\nExamples\n--------\n\n###Basic usage\n\n```javascript\ndnodeSession({\n  store: sessionStore\n})\n````\n\n###Full configuration\n\n```javascript\ndnodeSession({\n  store: sessionStore // session store object\n, key: 'connect.sid'  // (optional) session key\n, keepAlive: true     // (optional) keep session alive with dnode connection\n, interval: 120000    // (optional) keep alive refresh rate\n})\n````\n\n###Session manipulation\n\n```javascript\ndnode.use(function(client, conn) {\n  this.session(function(err, sess) {\n    sess.foo = 'bar'\n    sess.save()\n  })\n})\n````\n\nMethods\n-------\n\nWithin the client and server, dnode-session supplies the following methods.\n\n###session(callback)\n\nReturn the session storage object, which can be modified\n\n```javascript\nsession(function(err, sess) {\n  // ...\n})\n````\n\n###cookies(callback)\n\nReturn the cookies that would be available from `req.cookies` in express\n\n```javascript\ncookies(function(cookies) {\n  // ...\n})\n````\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2011-2012 Tom Blobaum <tblobaum@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","maintainers":[{"name":"tblobaum","email":"tblobaum@gmail.com"}]}},"maintainers":[{"name":"tblobaum","email":"tblobaum@gmail.com"}],"time":{"modified":"2022-06-15T06:19:09.585Z","created":"2011-09-27T09:37:19.574Z","0.0.1":"2011-09-27T09:37:21.130Z","0.0.2":"2011-11-14T10:18:19.667Z","0.0.2-1":"2011-11-14T10:45:51.504Z","0.0.3":"2011-11-14T12:06:13.868Z","0.0.4":"2011-11-18T18:50:27.869Z","0.0.4-1":"2011-11-23T11:01:23.320Z","0.3.0":"2012-01-08T20:46:49.660Z","0.3.1":"2012-03-04T16:10:33.505Z"},"author":{"name":"Thomas Blobaum","email":"tblobaum@gmail.com","url":"http://tomblobaum.tumblr.com/"},"repository":{"type":"git","url":"git://github.com/tblobaum/dnode-session.git"}}