{"_id":"passport-unique-token","_rev":"15-830d823548486357755f1f2eaa085d9b","name":"passport-unique-token","description":"Unique Token authentication strategy for Passport.","dist-tags":{"latest":"3.0.0"},"versions":{"0.1.0":{"name":"passport-unique-token","version":"0.1.0","description":"Token authentication strategy for Passport - modified from passport-local.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/Lughino/"},"main":"lib/index.js","repository":{"type":"git","url":"git://github.com/Lughino/passport-unique-token"},"dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x","chai-passport-strategy":"0.1.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","token","auth","authn","authentication"],"bugs":{"url":"https://github.com/Lughino/passport-unique-token/issues"},"homepage":"https://github.com/Lughino/passport-unique-token","_id":"passport-unique-token@0.1.0","_shasum":"448b5db2f257d2687eae965a4e8a84cc9fd6acd9","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"dist":{"shasum":"448b5db2f257d2687eae965a4e8a84cc9fd6acd9","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-0.1.0.tgz","integrity":"sha512-v61gDWPkPTIKWKRDtqKH/QkMicqctLcFWanu84GbvCzxBC7ieYzThBqHc4mGLK8IB6nx9nzliZ11eqcjYFuhgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7bNN4pYkgkw8DrWvYoJIs6lzIevB6zziYsKl1sX7SNwIgE/84KP27Iqqabv0XSdm4tP05q01WRRFDsqhhHR1qwJ0="}]},"directories":{}},"0.1.1":{"name":"passport-unique-token","version":"0.1.1","description":"Unique Token authentication strategy for Passport - modified from passport-local.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/Lughino/"},"main":"lib/index.js","repository":{"type":"git","url":"git://github.com/Lughino/passport-unique-token"},"dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x","chai-passport-strategy":"0.1.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","token","auth","authn","authentication"],"bugs":{"url":"https://github.com/Lughino/passport-unique-token/issues"},"homepage":"https://github.com/Lughino/passport-unique-token","_id":"passport-unique-token@0.1.1","_shasum":"f37f857280528913815633fef230bdec1a874e53","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"dist":{"shasum":"f37f857280528913815633fef230bdec1a874e53","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-0.1.1.tgz","integrity":"sha512-tfGzFDyjsiCrij4yeCzM9GpZl2tc92fq+MMBJmNUonFNTK754bAJHQji/Q9g8Qzdw4DhcEP3s4QJe9tekQKazw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP/CM6YQEj6c9C2v1E/40GfCc1dtzPXOyxhCdqjGz5WgIhAIOLRVUZB2pJE/tfh0N7xQ30+ztixaLWYnT63hgorTt2"}]},"directories":{}},"0.1.2":{"name":"passport-unique-token","version":"0.1.2","description":"Unique Token authentication strategy for Passport - modified from passport-local.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/Lughino/"},"main":"lib/index.js","repository":{"type":"git","url":"git://github.com/Lughino/passport-unique-token"},"dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x","chai-passport-strategy":"0.1.x","gulp":"^3.6.2","gulp-jshint":"^1.6.1","istanbul":"^0.2.9"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","token","auth","authn","authentication"],"bugs":{"url":"https://github.com/Lughino/passport-unique-token/issues"},"homepage":"https://github.com/Lughino/passport-unique-token","_id":"passport-unique-token@0.1.2","_shasum":"cd95cde60730d15992d21272844a7f4d0196a70e","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"dist":{"shasum":"cd95cde60730d15992d21272844a7f4d0196a70e","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-0.1.2.tgz","integrity":"sha512-litEfg27SB22USlUEE9FjljBbtnTfobSdJYrxmIwsj+jfoCH73pTLtbju2hQY7x/OWTr9E0Qr/52f/UYADNrOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgCaNZJJ8uOggtPDA+yKLLitDUthy6xw0sV+gX5hUQ3AIhAMayiSYkVlgmA14ygntYRZdtwiC6+HCjXe9+pHEwuRK3"}]},"directories":{}},"0.1.3":{"name":"passport-unique-token","version":"0.1.3","description":"Unique Token authentication strategy for Passport - modified from passport-local.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/Lughino/"},"main":"lib/index.js","repository":{"type":"git","url":"git://github.com/Lughino/passport-unique-token"},"dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x","chai-passport-strategy":"0.1.x","gulp":"^3.6.2","gulp-jshint":"^1.6.1","istanbul":"^0.2.9"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","token","auth","authn","authentication"],"bugs":{"url":"https://github.com/Lughino/passport-unique-token/issues"},"homepage":"https://github.com/Lughino/passport-unique-token","gitHead":"6a9fe31302b3fb0edc9b1a169f61ba7d19ffbae7","_id":"passport-unique-token@0.1.3","_shasum":"357ce560576234c33107e98a76b9d9355ea3557e","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.10.36","_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"dist":{"shasum":"357ce560576234c33107e98a76b9d9355ea3557e","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-0.1.3.tgz","integrity":"sha512-hVyyXdf3uGyt31KrMrXOxpL9P8cEgE0RJXFzS2ertJL66s/qO+pK+b16HgLWdixXO2M7qgkLfSWhfLAAho+kDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUGUW/AfRADMvSuyU2a+MK+CNIr0EAofHd3RWa+Tc3DwIgbYjHwtEsIASrEiR+cBAw/ROShRAU46fQ8V8NoO1TGrY="}]},"directories":{}},"0.1.4":{"name":"passport-unique-token","version":"0.1.4","description":"Unique Token authentication strategy for Passport - modified from passport-local.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/Lughino/"},"main":"lib/index.js","repository":{"type":"git","url":"git://github.com/Lughino/passport-unique-token.git"},"dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x","chai-passport-strategy":"0.1.x","gulp":"^3.6.2","gulp-jshint":"^1.6.1","istanbul":"^0.2.9"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","token","auth","authn","authentication"],"bugs":{"url":"https://github.com/Lughino/passport-unique-token/issues"},"homepage":"https://github.com/Lughino/passport-unique-token","gitHead":"1112dfc7929bd65ed412bb9cdf43ae7dddb63c0a","_id":"passport-unique-token@0.1.4","_shasum":"58d4b5636ad4a5d2bb8c73fd4f5df4e85c22345f","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.3","_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"dist":{"shasum":"58d4b5636ad4a5d2bb8c73fd4f5df4e85c22345f","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-0.1.4.tgz","integrity":"sha512-ax48mDt1SOw/iih3NMT2mQsuWJKWRhhBYSmoL0YyqmbGmkMyiVTqZlBY9efMOmzG0SWVGS1nhAiOAx7hz5JfQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4QEqJ2HDDg0uXjWln9TYVMx+Th8dwm3qk1KbJ4HP/rAiApHImrGeZb8E0sB+Sf+8u10EUeTpbFanKQB3bFYK1z1w=="}]},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"directories":{}},"1.0.0":{"name":"passport-unique-token","version":"1.0.0","description":"Unique Token authentication strategy for Passport.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/Lughino/"},"main":"dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Lughino/passport-unique-token.git"},"dependencies":{"passport-strategy":"^1.0.0"},"devDependencies":{"@commitlint/cli":"^8.1.0","@commitlint/config-conventional":"^8.1.0","@commitlint/prompt-cli":"^8.1.0","@types/express":"^4.17.0","@types/jest":"^24.0.15","@types/node":"^12.6.8","@types/passport-strategy":"^0.2.35","@types/supertest":"^2.0.8","@typescript-eslint/eslint-plugin":"^1.12.0","@typescript-eslint/parser":"^1.12.0","body-parser":"^1.19.0","chai-passport-strategy":"^1.0.1","commitizen":"^4.0.2","cross-env":"^5.2.0","cz-customizable":"^6.2.0","eslint":"^6.0.1","eslint-config-prettier":"^6.0.0","eslint-plugin-import":"^2.18.1","express":"^4.17.1","husky":"^3.0.1","jest":"^24.8.0","jest-junit":"^6.4.0","lint-staged":"^9.2.0","passport":"^0.4.0","prettier":"^1.18.2","semantic-release":"^15.13.18","supertest":"^4.0.2","ts-jest":"^24.0.2","typescript":"^3.5.3"},"engines":{"node":">= 8.10.x"},"scripts":{"build":"tsc -p tsconfig.prod.json","commit":"git cz","coverage":"npm t -- --coverage --reporters=default --reporters=jest-junit","lint":"eslint src/**/*.ts --fix","test":"jest --detectOpenHandles","semantic-release":"semantic-release"},"license":"MIT","keywords":["passport","token","auth","authentication"],"bugs":{"url":"https://github.com/Lughino/passport-unique-token/issues"},"homepage":"https://github.com/Lughino/passport-unique-token","lint-staged":{"src/**/*.(ts|tsx)":["prettier --write","npm run lint","npm t -- --findRelatedTests","git add"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"husky":{"hooks":{"commit-msg":"commitlint -e $GIT_PARAMS","pre-commit":"lint-staged"}},"config":{"commitizen":{"path":"cz-customizable"},"cz-customizable":{"config":"config/cz-customizable/base.js"}},"jest-junit":{"output":"./coverage/test-results/junit/results.xml"},"gitHead":"f8a61e353689ece008fc02aae6a88e51da2b0dc2","_id":"passport-unique-token@1.0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-yXlajcHwX99h2M4buFxsR8UJPKbeqFGZZCZ6diQv3yfBOghr2zXRjDMnftS23izyzweAd/o9wJnmoaz+GgRTog==","shasum":"f9a28650f42306cf4d0eb40eddd6b8b9569f6e4c","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-1.0.0.tgz","fileCount":21,"unpackedSize":12775972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPaaUCRA9TVsSAnZWagAAJFoP/0s0eZuxIFQdDw+sjCKP\nQGu5Om2NnIPt3pQkIpcf70SbKldMrd7Qqx8KPLa642DgfWJ1qmP6McLN8wzY\nemSTRBvCXQv6OjxYc5xZ1C9+3efeBWXz8I4x00tWO5X9YUrxblovgFkdwT3i\ndppyUo9BuIJmkflf791RiU+6roqgAWnExOsCWXrS2bstFJSbKbEJH1sy9GeK\nI60EUwBX0auKFtqIUkOz86r/Grox4ogRaIEE+ogkzXtHrzm3vhsc+HOF7ZcE\nRDAO9pHJcgTAJ36tNNYuurf8fjto3nxfp7PitQK9sNBhmaZMAJDzP2SzfMpP\n7Oty6xlO4aac2CyTt0E3DRgSke2W0Jeo++/dzABwJmUtZofpcCQHGCkDHR6W\nzzK06I1Ig1s0n4yf3ZBvpzN2fdRTrmIfiT59KqDPPDdNvBbtxr6bKC2AzAuu\n+b1kmoAvkZAASu+ilyUtgPQlAfwM53KhYfejzhdDlTKfNQXCHJSxssk5w8Pa\nxqxjSks38UHFYM0OWEbwWOnbU3SaEzFCgMCQdfmPakTmGzogG7tsiGuzILeM\nin7kHnCWf4y3voaKeMfIGLszrKk48BNyIJWnw7xjmeBINsf7KzgPOOp5w18N\n3YWoq8FVMwNNwkK5Pia08pmSOaJ15Q+8KU6JE0lGPbLM2TuwuzRmldhXqufn\noOM9\r\n=hljJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3EKzKmgmKnvCReDufbsn1QCppzE6VwuWNjDHonVEckAiBLLtTpTBPKmYUs3lL5LCxz1FDa0pnWttg9IWdTkw80CQ=="}]},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-unique-token_1.0.0_1564321427402_0.2756554899901371"},"_hasShrinkwrap":false},"2.0.0":{"name":"passport-unique-token","version":"2.0.0","description":"Unique Token authentication strategy for Passport.","author":{"name":"Luca Pau","email":"luca.pau82@gmail.com","url":"http://github.com/lughino/"},"main":"dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/lughino/passport-unique-token.git"},"dependencies":{"passport-strategy":"^1.0.0"},"devDependencies":{"@commitlint/cli":"^11.0.0","@commitlint/config-conventional":"^11.0.0","@commitlint/prompt-cli":"^11.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.9","@types/jest":"^26.0.19","@types/node":"^14.14.19","@types/passport-strategy":"^0.2.35","@types/supertest":"^2.0.10","@typescript-eslint/eslint-plugin":"^4.11.1","@typescript-eslint/parser":"^4.11.1","body-parser":"^1.19.0","chai-passport-strategy":"^1.0.1","commitizen":"^4.2.2","cross-env":"^7.0.3","cz-customizable":"^6.3.0","eslint":"^7.17.0","eslint-config-prettier":"^7.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.3.0","express":"^4.17.1","husky":"^4.3.6","jest":"^26.6.3","jest-junit":"^12.0.0","lint-staged":"^10.5.3","passport":"^0.4.1","prettier":"^2.2.1","semantic-release":"^17.3.1","supertest":"^6.0.1","ts-jest":"^26.4.4","typescript":"^4.1.3"},"engines":{"node":">= 10.22.x"},"scripts":{"build":"tsc -p tsconfig.prod.json","commit":"git cz","coverage":"npm t -- --coverage --reporters=default --reporters=jest-junit","lint":"eslint src/**/*.ts --fix","prettier":"prettier . --write","test":"jest --detectOpenHandles","test:debug":"node --inspect-brk node_modules/.bin/jest --runInBand --detectOpenHandles","semantic-release":"semantic-release"},"license":"MIT","keywords":["passport","token","auth","authentication"],"bugs":{"url":"https://github.com/lughino/passport-unique-token/issues"},"homepage":"https://github.com/lughino/passport-unique-token","lint-staged":{"src/**/*.(ts|tsx)":["prettier --write","npm run lint","npm t -- --findRelatedTests"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"husky":{"hooks":{"commit-msg":"commitlint -e $GIT_PARAMS","pre-commit":"lint-staged"}},"config":{"commitizen":{"path":"cz-customizable"},"cz-customizable":{"config":"config/cz-customizable/base.js"}},"jest-junit":{"outputDirectory":"./coverage/test-results/junit","outputName":"results.xml"},"gitHead":"ebd1662304e6af7e978e55c21ee711ea8a5af37e","_id":"passport-unique-token@2.0.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.10","dist":{"integrity":"sha512-SVsNT7wZ6QboP1Lm94BWjbwghV3Qoo71w0SZ075e4kGp+ibnFmIywZf1DgoFa5l+eSDzgAjW3h4zWFQbTDEv2A==","shasum":"13c3e713b50154d27f7b5d3be351a7590e035e87","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-2.0.0.tgz","fileCount":13,"unpackedSize":21559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8PYSCRA9TVsSAnZWagAAJ3AP/2oOgFby7HkUMoB3FP0M\nTBico6g/cpOeRU+9yC8rrn1J/1NVhXevWRf0beMnvQsRwUvuqH/kyVhjWMyP\nbTdL2hKC6VY5iC7U2zGrdkRC1zzORuGCyZVWZj4jG0Wu1VAlICgzbdykZGsb\n6hrY9kqDNXVlFU/BeDSLiljZm76XXsT3w8ocADBrNV1jxwGpmjzTOag6SZ45\nvIe3y6SrejsrZNNXxz+KJXQ5eaHLddCRwNuyhHV12FJFNYPeFF+bjxDxACmX\n9/jl5FxUMPDZnqWs4mVRHp8+6x5xVHVDnMtwO/3RzxkR4s7Q3YOrnpR3aGNN\n74CvCVoB7rImMWaYttg2gRlpBG4i5II8pSHtX/2U2WvePuNn5bVvNoYXJ2bU\nxXO6rnlkahhke4laUBtuaeQgBd7puqYYE5NueSDVkn8ypULN0x/l8pjxzcJq\ndjjdKzORsQtkiOfFXKsDpquMYfPHb6/MJCjeSs+fUqjRA8VA36OVFvqpwsUq\nX/bA1KXrQpTzYfDKYc8TIcnhNIUDDxr4Us5x11fyk6rkQK9Ke8bSS9UeUIfh\ngKBTRTyyyixybzyrewCfs8J9RWje7i0CbQv/JBnJozfAB4v0gzF8mtWDrdIH\nI+HPszfelQKNjM/h7zyLxgu+CicSsQJs+gkbLNbTqAKIC/UZrGFSR6XQ+Kdx\nf1Ju\r\n=zItK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh92UvTfVHiDMSGMFfN2TK1NxHewlawryqpnE0EI6QdAiEAkwTkOcWaEEbfK27/XHsQNQF4D6JvZZJQpwtklQO1Qek="}]},"_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"directories":{},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-unique-token_2.0.0_1609627154410_0.3691698274676005"},"_hasShrinkwrap":false},"3.0.0":{"name":"passport-unique-token","version":"3.0.0","description":"Unique Token authentication strategy for Passport.","author":{"name":"Luca Pau","url":"http://github.com/lughino/"},"main":"dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/lughino/passport-unique-token.git"},"dependencies":{"passport-strategy":"^1.0.0"},"devDependencies":{"@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@commitlint/prompt-cli":"^12.1.4","@semantic-release/git":"^9.0.0","@types/express":"^4.17.13","@types/jest":"^26.0.24","@types/node":"^16.3.0","@types/passport-strategy":"^0.2.35","@types/supertest":"^2.0.11","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","body-parser":"^1.19.0","chai-passport-strategy":"^1.0.1","commitizen":"^4.2.4","cross-env":"^7.0.3","cz-customizable":"^6.3.0","eslint":"^7.30.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.4","eslint-plugin-prettier":"^3.4.0","express":"^4.17.1","husky":"^7.0.1","is-ci":"^3.0.0","jest":"^27.0.6","jest-junit":"^12.2.0","lint-staged":"^11.0.0","passport":"^0.4.1","prettier":"^2.3.2","semantic-release":"^17.4.4","supertest":"^6.1.3","ts-jest":"^27.0.3","typescript":"^4.3.5"},"engines":{"node":">= 12"},"scripts":{"build":"tsc -p tsconfig.prod.json","commit":"git cz","coverage":"npm t -- --coverage --reporters=default --reporters=jest-junit","lint":"eslint src/**/*.ts --fix","prepare":"is-ci || husky install","prettier":"prettier . --write","test":"jest --detectOpenHandles","test:debug":"node --inspect-brk node_modules/.bin/jest --runInBand --detectOpenHandles","semantic-release":"semantic-release"},"license":"MIT","keywords":["passport","token","auth","authentication","express","nest"],"bugs":{"url":"https://github.com/lughino/passport-unique-token/issues"},"homepage":"https://github.com/lughino/passport-unique-token","config":{"commitizen":{"path":"cz-customizable"},"cz-customizable":{"config":"config/cz-customizable/base.js"}},"jest-junit":{"outputDirectory":"./coverage/test-results/junit","outputName":"results.xml"},"gitHead":"172e3ae47fea6d1add0019b64fadd441637febfd","_id":"passport-unique-token@3.0.0","_nodeVersion":"16.4.2","_npmVersion":"7.19.1","dist":{"integrity":"sha512-BkSWODzwS1i8Z5ImmPQOWZ05dw9oS09VMBIZOogubKACrm3UO3wlJnwT/fCMQh5iTtFLYA+X4yWmtsqufftgXw==","shasum":"e8aac25a319453107b28f00a25e51f6030c97219","tarball":"https://registry.npmjs.org/passport-unique-token/-/passport-unique-token-3.0.0.tgz","fileCount":19,"unpackedSize":21715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6G0dCRA9TVsSAnZWagAANK0QAJLQQU9ksy9aCE9IuWzC\neFmWsGs7ZQRIW5uil5vhXy7H2+dGp54U2ap1o9EaTeO5b8sdfXSrnLPaNiqn\nBZt694WfjMXmy0g7T5ztElRUiM5IUKrI/ZImS3Xni/yXDOl1soYwkgj5JolE\nltdp4q+9sNDHYx9tqEaRNv0hLutQDgJmQ7YwOEFCNgGxk0gmWmccoS3Sydny\nfkY8rdvyWkwaDi65BSertYnsK2DwSQe9vEhTssBq5Axk+Bs3CtkXlzjnOkJi\n68gOY4iIhY8ilenMYAOePWrQzrlMn8VN8BGBSKMtLopGEtKWie0kTEyRd1O3\nsLFeFSfvq6IXevKC4VN/2/IRqcu86/LyZdTnGv71dzxZZ/EOrc/I8FYWDNCu\ncDXq8gyaQUiK4EDSZyW0jVACwWOjIu2ioDQhDxcvNz2Cwxo5jNcGPX7tpLEg\nv0gdmhgW6oCVktMr/+BXWYM2KPKWnRoPzPdppYfZwdRKxUbvNSD7Jp+Dv9zV\nRPZe0do7Eib27sDd0J9ZMWxX8NOP8YIYMwqhq9GSl1JUBjb3LU4Yk5o3ib/l\nbPy6YgVFjhRhzzyWF+F0T8PB+ubZEJ98cgLeD4ANQgxAApQn6UBxo3qNDGjz\nDAB7lBjRQntopKQAMZCAT98SIentHsNsu08s/PfKdShjIc0OJ/f9cQg+qaOs\nIyTx\r\n=hYi/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbwOT4dyTTzZfXMXqzBhoePb7yNo49YVYBa7EvbWceHgIhAKakUcX7LuJk02jZKEe/3AUqcNO53Cs3RneMdHWJr1PW"}]},"_npmUser":{"name":"lughino","email":"luca.pau82@gmail.com"},"directories":{},"maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-unique-token_3.0.0_1625845020913_0.5240278318598544"},"_hasShrinkwrap":false}},"readme":"# Passport Unique Token Strategy\n\n[![CircleCI](https://circleci.com/gh/lughino/passport-unique-token.svg?style=svg)](https://circleci.com/gh/lughino/passport-unique-token)\n[![Maintainability](https://api.codeclimate.com/v1/badges/6cbbdc635903006b578e/maintainability)](https://codeclimate.com/github/lughino/passport-unique-token/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/6cbbdc635903006b578e/test_coverage)](https://codeclimate.com/github/lughino/passport-unique-token/test_coverage)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a2ec6c1319b6497494303ee024e45cb5)](https://www.codacy.com/app/lughino/passport-unique-token?utm_source=github.com&utm_medium=referral&utm_content=lughino/passport-unique-token&utm_campaign=Badge_Grade)\n![npm](https://img.shields.io/npm/dm/passport-unique-token)\n![npm](https://img.shields.io/npm/v/passport-unique-token)\n![GitHub](https://img.shields.io/github/license/lughino/passport-unique-token)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![Known Vulnerabilities](https://snyk.io//test/github/lughino/passport-unique-token/badge.svg?targetFile=package.json)](https://snyk.io//test/github/lughino/passport-unique-token?targetFile=package.json)\n\nUnique token authentication strategy for Passport.\n\n## Installation\n\n```sh\nnpm install passport-unique-token\n```\n\n## Usage\n\nThe unique token authentication strategy authenticates users with a unique token.\nThe strategy requires a _verify_ callback,\nwhich accepts these credentials and calls done providing a user.\n\n```javascript\nconst { UniqueTokenStrategy } = require('passport-unique-token');\n\npassport.use(\n  new UniqueTokenStrategy((token, done) => {\n    User.findOne(\n      {\n        uniqueToken: token,\n        expireToken: { $gt: Date.now() },\n      },\n      (err, user) => {\n        if (err) {\n          return done(err);\n        }\n\n        if (!user) {\n          return done(null, false);\n        }\n\n        return done(null, user);\n      },\n    );\n  }),\n);\n```\n\nBy default `passport-unique-token` checks for `token` key credentials\nin either the params url or request body in these locations:\n\n| Type   | Default property |\n| ------ | :--------------: |\n| Url    |      token       |\n| Body   |      token       |\n| Query  |      token       |\n| Header |      token       |\n\n### Configure\n\nThese credential locations can be configured when defining the strategy as follows:\n\n```javascript\nconst { UniqueTokenStrategy } = require('passport-unique-token');\nconst strategyOptions = {\n  tokenQuery: 'custom-token',\n  tokenParams: 'custom-token',\n  tokenField: 'custom-token',\n  tokenHeader: 'custom-token',\n  failOnMissing: false\n};\n\npassport.use(new UniqueTokenStrategy(strategyOptions,\n  (token, done) => {\n    User.findOne({\n      uniqueToken: token,\n      expireToken: { $gt: Date.now() }\n    }, (err, user) => {\n      if (err) {\n        return done(err);\n      }\n\n      if (!user) {\n        return done(null, false);\n      }\n\n      return done(null, user);\n    });\n  }\n```\n\n`failOnMissing` option allows you to queue multiple strategy, customizing the behavior.\nBy default it's set to `true`, when it's set to `false`\nit lets move on to the next strategy on failure.\n\n## How to Authenticate\n\nUse `passport.authenticate()`, specifying the `token` strategy to authenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/) application:\n\n```javascript\napp.put('/animals/dogs', passport.authenticate('token'), (req, res) => {\n  // User authenticated and can be found in req.user\n});\n```\n\nIf authentication fails in the above example then a `401` response will be given.\nHowever there may be times you wish a bit more control and delegate\nthe failure to your application:\n\n```javascript\napp.put('/animals/dogs', authenticate, (req, res) => {\n  // User authenticated and can be found in req.user\n});\n\nfunction authenticate(req, res, next) {\n  passport.authenticate('token', (err, user, info) => {\n    if (err) {\n      return next(err);\n    }\n\n    if (!user) {\n      res.status(401).json({ message: 'Incorrect token credentials' });\n    }\n\n    req.user = user;\n    next();\n  })(req, res, next);\n}\n```\n\n## Api Reference\n\n- [`UniqueTokenStrategy()`](#UniqueTokenStrategy)\n- [`authenticate()`](#authenticate)\n\n### `UniqueTokenStrategy()`\n\nThe token authentication strategy authenticates requests based on the credentials\nsubmitted through standard request headers, body, querystring or params.\n\n```typescript\nnew UniqueTokenStrategy(\n  options?: {\n    // the token field name in the body request\n    tokenField?: string = 'token',\n    // the token field name in the query string request\n    tokenQuery?: string = 'token',\n    // the token field name in the param request\n    tokenParams?: string = 'token',\n    // the token field name in the header request\n    tokenHeader?: string = 'token',\n    // if `true` the express.Request is the first parameter of the verify callback\n    passReqToCallback?: false,\n    // if `true` the token key is case sensitive (e.g. res.body['uniqueToken'])\n    caseSensitive?: false,\n    // allows you to queue multiple strategy, customizing the behavior.\n    failOnMissing?: true\n  },\n  verify: (\n    req?: express.Request,\n    token: string,\n    done: (err: Error | null, user?: any, info?: any) => void\n  ) => void\n)\n```\n\n### `authenticate()`\n\nYou can optionally pass options to the `authenticate()` method.\nPlease refer to the [passport documentation](http://www.passportjs.org/docs/authenticate/)\nfor the different signature.\n\n```typescript\nauthenticate(\n  strategyName: string,\n  options?: { badRequestMessage: string },\n  callback?: { err: Error, user: any, info: any }\n);\n\n// Example:\n\napp.post('/login', passport.authenticate('token', {\n  badRequestMessage: 'custom error message'\n}));\n```\n\n## Credits\n\n[Luca Pau](http://github.com/lughino)\n","maintainers":[{"name":"lughino","email":"luca.pau82@gmail.com"}],"time":{"modified":"2022-06-23T13:41:58.585Z","created":"2014-05-29T15:59:41.934Z","0.1.0":"2014-05-29T15:59:41.934Z","0.1.1":"2014-05-29T16:01:54.154Z","0.1.2":"2014-06-01T15:50:44.482Z","0.1.3":"2015-06-26T14:22:05.484Z","0.1.4":"2015-12-25T01:10:06.710Z","1.0.0":"2019-07-28T13:43:47.772Z","2.0.0":"2021-01-02T22:39:14.570Z","3.0.0":"2021-07-09T15:37:01.096Z"},"homepage":"https://github.com/lughino/passport-unique-token","keywords":["passport","token","auth","authentication","express","nest"],"repository":{"type":"git","url":"git+https://github.com/lughino/passport-unique-token.git"},"author":{"name":"Luca Pau","url":"http://github.com/lughino/"},"bugs":{"url":"https://github.com/lughino/passport-unique-token/issues"},"readmeFilename":"README.md","users":{"lughino":true},"license":"MIT"}