{"_id":"express-persona","_rev":"29-aa9bd42990fc9a96a15dcde947769276","name":"express-persona","description":"Mozilla Persona authentication for your Express application","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"express-persona","version":"0.0.1","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap test/*.test.js"},"devDependencies":{"express":"~2.5.11","tap":"~0.3.1"},"_id":"express-persona@0.0.1","dist":{"shasum":"2dc76abbf14f0615e69c8919fd68c6aa58c629f9","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.1.tgz","integrity":"sha512-cQEdav1JI+SVYy6XZeDAbnjwapBPWi6Oz7wOV4/SuOdeXukNM6fMUd5SXl7z65Khz6WIMQifkOrCrVLSxysXPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCELFUx4Jlsey+0GkduHbA5v7FJstqP3dpCqf93w0z4ZgIhAOrOjSyEsalOSCa+dRZQ+qsP5o/Fu3a19yaZIR/ik+L3"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.2":{"name":"express-persona","version":"0.0.2","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap test/*.test.js"},"devDependencies":{"async":"~1.0.22","express":"~2.5.11","tap":"~0.3.1"},"_id":"express-persona@0.0.2","dist":{"shasum":"ed6de86292cbacd4c4b2dc7f8a80391be7711d08","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.2.tgz","integrity":"sha512-iNZXl365mSbjnxH3CLtLGgAYe7qoH8a9SebB0r42JvCR35604foZvQoa9izWKPNl6sSItjxUzsnfeBZMIWc0rA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWlcp/hJ8kjvEh/ccbJuR56ccRkD84oHgS6YlrE8k79QIhANTsDiCFFu2JX7m0WqtOduqqU3KdVAS6+ZxU420ZGfD1"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.3":{"name":"express-persona","version":"0.0.3","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","tap":"~0.3.1"},"_id":"express-persona@0.0.3","dist":{"shasum":"2ed9bd80d893e12a9cc128ddd85e84f3656805b8","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.3.tgz","integrity":"sha512-OMxPCSHTvM3knvameKwshu7bgdx0rFr6rLiSbvCO+X82ZXvyX9stc16mCV1PI3pYv3PYjICMOwL4iW0WhwVcPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCr73/jvwhmlMmgq0y2SZKv64309QS1zgUVYoYeROJy8AIhAN2Mpkh+VNxKNEcEmKzD6GTn8sCEVx1gBw1nR+NcssEt"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.4":{"name":"express-persona","version":"0.0.4","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 60 test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","request":"~2.11.4","tap":"~0.3.1"},"_id":"express-persona@0.0.4","dist":{"shasum":"f957557903bec364190f7f2ccf726b1e69fa471d","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.4.tgz","integrity":"sha512-OZG8I++UL80vAudYnwU4CfdaToIJ6PSgkTbz0aGwKQZhfKm6HeuYowSkmn6goXx02iWadlYoo57jD+kLOeRkUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcnrmJhkv/6e70DoxbhSUUBNo47llOh/IBKwLzxJrl2QIhALwAo1+1MAeNDQWtmPr2I9RWCyVkMOw3kjOqxUidgMIQ"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.5":{"name":"express-persona","version":"0.0.5","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 60 test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","request":"~2.11.4","tap":"~0.3.1"},"_id":"express-persona@0.0.5","dist":{"shasum":"e6acde7cefa07800becb75b02fa7726dd897be5d","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.5.tgz","integrity":"sha512-E884BYfLx/I/cRyBxYPdDqLGch/UQxzO8aUoD0mtwFFYPqstskspt3fvnl/1551CrQ4z33f2Bxng5ddm5LVEVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4cv80lKngFL5cxbMMZs9fPgS1DeFo/KlLQEu4BnAUNAiEAzCrVj+wa9Y9Uuc21fliDnuaWHWutdbUpDH5GAiFTGbI="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.6":{"name":"express-persona","version":"0.0.6","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 60 test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","request":"~2.11.4","tap":"~0.3.1"},"_id":"express-persona@0.0.6","dist":{"shasum":"fd4c53fc27b1196df18d994d7aa62adb36dde661","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.6.tgz","integrity":"sha512-fo5vGZuDk8ekh2+HUj8NRG6NVUYP+H7aCh3qSVEfZNTly+i1zvr7Y/Tp9ii/TweicrMCtrgHCSf3+diBGLLqIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcNngr0hgDRQkTPz0dq5Az6pfarFe66oD6Jf7xe8dS2gIgHx6T2Sb64L4kqIeWhOb/aBGFI/yBdV18cPVNSN9Rp/E="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.7":{"name":"express-persona","version":"0.0.7","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 120 test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","request":"~2.11.4","tap":"~0.3.1"},"_id":"express-persona@0.0.7","dist":{"shasum":"78c169a48ba5c571dd23c55a4acbf8c09f05a510","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.7.tgz","integrity":"sha512-VOOTIGdXBjljtqSeA6RD65UN1w0Iro9npWoJZzeOw9wwOG64ofjbYaSQmHa6NojKFORS4oLq2CrNwUPdCtPV8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPmG/zuFkHwGPh4auIC+qkw9hHUvjF0HEns+5+vvF2GgIhANslZrTUFzKDoZu6HXQNfiLu9GguHDA6x0l0VnrACg+v"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.8":{"name":"express-persona","version":"0.0.8","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 120 test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","request":"~2.11.4","tap":"~0.3.1"},"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"_id":"express-persona@0.0.8","dist":{"shasum":"ab735e06cef01351faa5c0310db8c377f254fa2f","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.8.tgz","integrity":"sha512-D7ymhwCM8lQku603P4yVRuohXzwoYHDMNoC8lqiwWJ2/RbamGRvC/f19ffbbTw6uwjOinDphBzhJrat3G3qN8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFxZ1kWezArDL7ZrP9HWdo7HQgOuPRFgSNHiKMjuBhyAIgAJTx+rNYLbR3zcjaTUThnvV/FIU0DmcugghZaX1aZkA="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.9":{"name":"express-persona","version":"0.0.9","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 120 test/*.test.js"},"devDependencies":{"async":"~0.1.22","express":"~2.5.11","request":"~2.11.4","tap":"~0.3.1"},"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"_id":"express-persona@0.0.9","dist":{"shasum":"18632ec1d10053eb424f82d3d22a649c435c507a","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.9.tgz","integrity":"sha512-M0cJk+prlrWJh2rrmtoQNewM/W1A1cc2F3UQj+H50nJGuwoS68JnCNQWK/InTmvBPHDyJd0HEoanaB1gVgnXVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7XxCXedcn+RE/S0ZSU8EJic43N2khM2YOyHKtGh1YTAiEAu8DaxzJGE78rLAxaC789jbE5cH4Jd4DsZoiz6Dcdn0U="}]},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.0.10":{"name":"express-persona","version":"0.0.10","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 120 test/*.test.js"},"dependencies":{"connect":"~2.9.0"},"devDependencies":{"async":"~0.2.9","express":"~3.4.0","request":"~2.27.0","tap":"~0.4.4"},"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"_id":"express-persona@0.0.10","dist":{"shasum":"a887f8f8c5eec4a5de9b80d1abf4c21daa6a3b7c","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.0.10.tgz","integrity":"sha512-2kRc0suC/VztL7suJBnXHC3CWEaRJ3JU3I7OEmo81yr/cfb6KpZP8ewkSO3FF6n6LMnQah046j2PFFcs+4IBPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7L+SVPIRzKy/Fyioh4kLcF5HB7VNzi+ssxkevdvTLjAiB0FcsUgGJkDfNIQxWTcOvewdbHaesYVjLcgJB5gp9yBw=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.1.0":{"name":"express-persona","version":"0.1.0","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 120 test/*.test.js"},"dependencies":{"browserid-verify":"~0.1.2","connect":"~2.9.0"},"devDependencies":{"async":"~0.2.9","express":"~3.4.0","request":"~2.27.0","tap":"~0.4.4"},"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"_id":"express-persona@0.1.0","dist":{"shasum":"4c5ff9297512b9fa3e1bb6c3b439a2c0f98263af","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.1.0.tgz","integrity":"sha512-U01V8yuqJ43e7DnfRqjhKSxYdJKkQ/OPho2oUNBTPFuF/bE6/IohmfhfaKMxtMFrHwGPtfLRrkLdTQDDgHi7ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBgN+M4s2NrffI4eb6fh4Ff8IHT3PmAOzX+eIhX3jHZQIhAOfR+3yX4HNJ5l9/d+GfIlrqYpUFXTuT+6H/x2L8wJUU"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.1.1":{"name":"express-persona","version":"0.1.1","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"./node_modules/.bin/tap --timeout 120 test/*.test.js"},"dependencies":{"browserid-verify":"~0.1.2","connect":"~2.9.0"},"devDependencies":{"async":"~0.2.9","express":"~3.4.0","request":"~2.27.0","tap":"~0.4.4"},"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"homepage":"https://github.com/jbuck/express-persona","_id":"express-persona@0.1.1","dist":{"shasum":"7678fbcd6692040d56bfe309c6643addd16abfd0","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.1.1.tgz","integrity":"sha512-lXOOGEtnIV+Gl+0GWceUMqi3Kk174d/kiYZnane8M2lRrhx/U6bFvQG9ait886/y9bNlZPZMvH9txXnnQ9MW3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8Stscq/FkEHmGu8BlZsFgHEahIqkWfAYFQ11C/7FqgwIgZoAszeiU/0JHwiSibW0qGadvwblfqpSRDo2B008IBsE="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}]},"0.1.2":{"name":"express-persona","version":"0.1.2","description":"Mozilla Persona authentication for your Express application","keywords":["mozilla","persona","browserid","authentication","express"],"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"license":"BSD","main":"index.js","repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"scripts":{"test":"tap --timeout 120 test/*.test.js"},"dependencies":{"browserid-verify":"~0.1.2","connect":"~2.9.0"},"devDependencies":{"async":"~0.2.9","express":"~3.4.0","request":"~2.27.0","tap":"~0.4.4"},"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"homepage":"https://github.com/jbuck/express-persona","_id":"express-persona@0.1.2","_shasum":"5847e3d870e93158dcf61d83939d3c3fe18fa379","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jbuck","email":"jon@jbuckley.ca"},"maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}],"dist":{"shasum":"5847e3d870e93158dcf61d83939d3c3fe18fa379","tarball":"https://registry.npmjs.org/express-persona/-/express-persona-0.1.2.tgz","integrity":"sha512-XjXmWw8gMcGaP7oE9svVm/L+KRIT299cExCdT1rFE9txHoPTgl+qFkxuYJvhEFYwBIP9cMUK9TUyzLnFQGYVig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYrqF5QLLkXoGXXKD7//1R5EOfKH+JgyzFSJLhgK1a1AiABEt8NB52nmRtTxJIXh8YUlmNdjrZ8Xvvoyx66y9LK7w=="}]}}},"readme":"express-persona [![Build Status](https://secure.travis-ci.org/jbuck/express-persona.png)](http://travis-ci.org/jbuck/express-persona)\n===============\n\nMozilla Persona integration for Express. express-persona is designed to quickly get\nPersona authentication working in your Express application, while following Persona\nsecurity best practices.\n\nQuick start\n-----------\nInstall using npm: `npm install express-persona`\n\nInclude the module inside your Express application:\n\n```javascript\nvar express = require(\"express\"),\n    app = express();\n\napp.use(express.json())\n  .use(express.urlencoded())\n  .use(express.cookieParser())\n  .use(express.session({\n  \tsecret: \"mozillapersona\"\n  }));\n\nrequire(\"express-persona\")(app, {\n  audience: \"http://localhost:8888\" // Must match your browser's address bar\n});\n```\n\nInclude the Persona library in your web page:\n\n`<script src=\"https://login.persona.org/include.js\"></script>`\n\nAdd login and logout functionality to your buttons:\n\n```javascript\ndocument.querySelector(\"#login\").addEventListener(\"click\", function() {\n  navigator.id.request();\n}, false);\n\ndocument.querySelector(\"#logout\").addEventListener(\"click\", function() {\n  navigator.id.logout();\n}, false);\n```\n\nWatch for login and logout actions:\n\n```javascript\nnavigator.id.watch({\n  onlogin: function(assertion) {\n    var xhr = new XMLHttpRequest();\n    xhr.open(\"POST\", \"/persona/verify\", true);\n    xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n    xhr.addEventListener(\"loadend\", function(e) {\n      var data = JSON.parse(this.responseText);\n      if (data && data.status === \"okay\") {\n        console.log(\"You have been logged in as: \" + data.email);\n      }\n    }, false);\n\n    xhr.send(JSON.stringify({\n      assertion: assertion\n    }));\n  },\n  onlogout: function() {\n    var xhr = new XMLHttpRequest();\n    xhr.open(\"POST\", \"/persona/logout\", true);\n    xhr.addEventListener(\"loadend\", function(e) {\n      console.log(\"You have been logged out\");\n    });\n    xhr.send();\n  }\n});\n```\n\nBy default, express-persona adds the users email address to `req.session.email` when their\nemail is validated.\n\nThis library will handle 3 of 4 essential practices for [Persona security considerations]\n(https://developer.mozilla.org/en-US/docs/Persona/Security_Considerations) but you should\nimplement CSRF protection as well. I recommend the built-in express csrf middleware.\n\nYou can view and run complete examples in the\n[examples directory](https://github.com/jbuck/express-persona/tree/master/examples).\n\nDocumentation\n-------------\n\n### API\n\n* `require('express-persona')` returns `function(express, options)`\n  * `express` is an instance of the express server that you want to add routes to\n  * `options` is an object. It has one required parameter, `audience`.\n\n### Required options\n\n* `audience` - The URL of your express app when viewed in a browser. Must include the protocol, hostname, and port.\n  * Example: `http://example.org:80`, `https://example.org:443`\n\n### Optional options\n\n* `verifyPath` - The URL that clients use to verify credentials.\n  * Default: `/persona/verify`\n  * Examples: `/browserid/verify`, `/api/verify`\n* `logoutPath` - The URL that clients use to logout.\n  * Default: `/persona/logout`\n  * Examples: `/browserid/logout`, `/api/logout`\n* `sessionKey` - The session key to store the validated email in.\n  * Default: `email`\n  * Example: `user`, `username`\n* `verifierURI` - The URI of the Persona Remote Verification API\n  * Default: `https://verifier.login.persona.org/verify`\n  * You probably don't want to touch this unless you have a good reason, like testing.\n* `verifyResponse(error, req, res, email)` - Function to generate response for verify route\n  * Default: see _Verify route_, below, for successess and failure responses\n  * `error` will be a string suitable for display (the \"reason\" attribute in the default implementation), if an error occurs\n  * `req, res` are the request and response objects\n  * `email` is a string containing the email, and will exist if there is not an error\n* `logoutResponse(error, req, res)` - Function to generate response for logout route\n  * Default: see _Logout route_, below, for response\n  * `error` will be a string suitable for display, if an error occurs\n  * `req, res` are the request and response objects\n* `middleware(req, res, next)` - Custom middleware for logout/login routes\n  * Default: none\n  * `req, res` are the request and response objects\n  * `next` points to the next middleware function in the chain\n\n### Verify route\n\n* On success:\n\n```javascript\n{\n  \"status\": \"okay\"\n  \"email\": \"jon@example.org\"\n}\n```\n\n* On failure\n\n```javascript\n{\n  \"status\": \"failure\"\n  \"reason\": \"request failed\"\n}\n```\n\n### Logout route\n\n* Always returns:\n\n```javascript\n{\n  \"status\": \"okay\"\n}\n```\n\nTests\n-----\n\n### Running Tests\n\nRun tests using `npm test` from the root of the repository.\n","maintainers":[{"name":"jbuck","email":"jon@jbuckley.ca"}],"time":{"modified":"2022-06-17T22:30:27.078Z","created":"2012-09-20T23:59:40.673Z","0.0.1":"2012-09-20T23:59:41.203Z","0.0.2":"2012-09-24T19:07:16.405Z","0.0.3":"2012-09-24T21:07:37.915Z","0.0.4":"2012-09-25T17:21:23.769Z","0.0.5":"2012-09-25T21:34:04.436Z","0.0.6":"2012-10-03T21:17:45.873Z","0.0.7":"2012-10-18T19:25:50.287Z","0.0.8":"2013-06-03T19:41:26.434Z","0.0.9":"2013-06-14T17:26:04.375Z","0.0.10":"2013-09-10T12:33:56.143Z","0.1.0":"2013-09-25T14:25:30.640Z","0.1.1":"2013-12-02T15:43:27.518Z","0.1.2":"2014-05-29T21:08:33.947Z"},"author":{"name":"Jon Buckley","email":"jon@jbuckley.ca"},"repository":{"type":"git","url":"https://github.com/jbuck/express-persona.git"},"homepage":"https://github.com/jbuck/express-persona","keywords":["mozilla","persona","browserid","authentication","express"],"bugs":{"url":"https://github.com/jbuck/express-persona/issues"},"license":"BSD","readmeFilename":"README.md"}