{"_id":"passport-client-cert","_rev":"11-e31a6208181e8956b729080d3001e5e3","name":"passport-client-cert","description":"Passport.js strategy for TLS client certificate authentication","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"passport-client-cert","version":"1.0.0","description":"Passport.js strategy for TLS client certificate authentication","main":"src","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/ripjar/passport-client-cert"},"keywords":["pki","passport","ssl","tls","certificate","cert","authentication"],"author":{"name":"Joe Whitfield-Seed"},"license":"MIT","bugs":{"url":"https://github.com/ripjar/passport-client-cert/issues"},"homepage":"https://github.com/ripjar/passport-client-cert","dependencies":{"passport":"^0.2.0"},"devDependencies":{"chai":"^1.9.1","colors":"^0.6.2","express":"3.*","mocha":"^1.20.1"},"gitHead":"b08aeac42146427ff2b0a2d97a198f7ee1599181","_id":"passport-client-cert@1.0.0","_shasum":"405849503e1a655296b240a4e2ca65f82fb875c5","_from":".","_npmVersion":"1.4.27","_npmUser":{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"},"maintainers":[{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"}],"dist":{"shasum":"405849503e1a655296b240a4e2ca65f82fb875c5","tarball":"https://registry.npmjs.org/passport-client-cert/-/passport-client-cert-1.0.0.tgz","integrity":"sha512-15zdOnVYq19L/YIgP311mji85orBJlTaWO1hgDZFi7ZV3fLaQuYGKJXh25LLOs7NzLJDWdAuGlenHgWX9NB5SQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSJqnt92zy6ElWf2VWzxXMKqmcAG5klbNpnUfDGlUrzgIhAMpyfmWlZ66hLI/UJm5YxXJySdvvPk+7zIcKWAD9jWIu"}]}},"1.0.1":{"name":"passport-client-cert","version":"1.0.1","description":"Passport.js strategy for TLS client certificate authentication","main":"src","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/ripjar/passport-client-cert"},"keywords":["pki","passport","ssl","tls","certificate","cert","authentication"],"author":{"name":"Joe Whitfield-Seed"},"license":"MIT","bugs":{"url":"https://github.com/ripjar/passport-client-cert/issues"},"homepage":"https://github.com/ripjar/passport-client-cert","dependencies":{"passport-strategy":"1.*"},"devDependencies":{"passport":"^0.2.0","chai":"^1.9.1","colors":"^0.6.2","express":"3.*","mocha":"^1.20.1"},"_id":"passport-client-cert@1.0.1","dist":{"shasum":"ce97bfb7e27a97eee8d3a442e26fbbd64f62e9a5","tarball":"https://registry.npmjs.org/passport-client-cert/-/passport-client-cert-1.0.1.tgz","integrity":"sha512-DUFPmw4ekQJbvDskWqwqereupFHKG1DeGofpZEYBdi+5weC0a4AreNCjalGKfpkdxoM97wQjZ9WGoHCoF4vBRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB3z//fuYYPzigPw39gOu2G2FCtDq5Cu5oalrqqpQ0waAiEAjT3dQEhG2lIFzRxDs+bsZWFtln9ZgxAUxSy7X+nwtsM="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"},"maintainers":[{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"}]},"1.1.0":{"name":"passport-client-cert","version":"1.1.0","description":"Passport.js strategy for TLS client certificate authentication","main":"src","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/ripjar/passport-client-cert.git"},"keywords":["pki","passport","ssl","tls","certificate","cert","authentication"],"author":{"name":"Joe Whitfield-Seed"},"license":"MIT","bugs":{"url":"https://github.com/ripjar/passport-client-cert/issues"},"homepage":"https://github.com/ripjar/passport-client-cert","dependencies":{"passport-strategy":"^1.0.0"},"devDependencies":{"chai":"^3.3.0","colors":"^1.1.2","express":"^4.13.3","mocha":"^2.3.3","passport":"^0.3.0"},"gitHead":"ff2d5787b3e557d02a3ccae436895b75ac57ba7d","_id":"passport-client-cert@1.1.0","_shasum":"472f0d8c3394f7b47cbd1e6fcd6f54c47e5cdb91","_from":".","_npmVersion":"2.12.0","_nodeVersion":"0.10.31","_npmUser":{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"},"maintainers":[{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"}],"dist":{"shasum":"472f0d8c3394f7b47cbd1e6fcd6f54c47e5cdb91","tarball":"https://registry.npmjs.org/passport-client-cert/-/passport-client-cert-1.1.0.tgz","integrity":"sha512-YzJc3du+VXOx7z6cf6Ou7ykGjzhdnjOl0CaOFhjhK0rmjZ0rhOg/kcl+1t6q7qaW7Kty/BYqEcnQgbwrkI07nw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGiDzA+gB11UuMvsiVmeZ6gBxpEjUjflrMmrBtAf3OaFAiEA+5nI7gtwzUsvplCWbYh8aGtjU0qcAp/G569wSt5rlUg="}]}},"2.0.0":{"name":"passport-client-cert","version":"2.0.0","description":"Passport.js strategy for TLS client certificate authentication","main":"src","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/ripjar/passport-client-cert.git"},"keywords":["pki","passport","ssl","tls","certificate","cert","authentication"],"author":{"name":"Joe Whitfield-Seed"},"license":"MIT","bugs":{"url":"https://github.com/ripjar/passport-client-cert/issues"},"homepage":"https://github.com/ripjar/passport-client-cert","dependencies":{"passport-strategy":"^1.0.0"},"devDependencies":{"chai":"^3.3.0","colors":"^1.1.2","connect":"^3.4.1","mocha":"^2.3.3","passport":"^0.3.2","request":"^2.69.0"},"gitHead":"748f9447818de177a3a1c54f45f5afb55a90d2bf","_id":"passport-client-cert@2.0.0","_shasum":"689982d41e01209d68a1abe6363174eb53ac7e78","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"},"dist":{"shasum":"689982d41e01209d68a1abe6363174eb53ac7e78","tarball":"https://registry.npmjs.org/passport-client-cert/-/passport-client-cert-2.0.0.tgz","integrity":"sha512-khcnPU8PsfrnjhIgi9ELgAf8eQiHKG3WIo6Pu7viAG6EfN+wqyG8rlH0KWZ8kCyptEJEl9fSAg2cotJrrUsqxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOTWmf9FaONqkuqwHFHkvxLzk2QZQEDPXHE5HBwtUkigIgVgfzU9iw4Srxio93HysSOz6mGeJO5U81edfzb/IL3V4="}]},"maintainers":[{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/passport-client-cert-2.0.0.tgz_1456252786167_0.5120096788741648"}},"2.1.0":{"name":"passport-client-cert","version":"2.1.0","description":"Passport.js strategy for TLS client certificate authentication","main":"src","typings":"src/index.d.ts","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/ripjar/passport-client-cert.git"},"keywords":["pki","passport","ssl","tls","certificate","cert","authentication"],"author":{"name":"Joe Whitfield-Seed"},"license":"MIT","bugs":{"url":"https://github.com/ripjar/passport-client-cert/issues"},"homepage":"https://github.com/ripjar/passport-client-cert","dependencies":{"passport-strategy":"^1.0.0"},"devDependencies":{"@types/express":"^4.0.36","chai":"^3.3.0","colors":"^1.1.2","connect":"^3.4.1","mocha":"^2.3.3","passport":"^0.3.2","request":"^2.69.0"},"gitHead":"90e185cafcbe0f88c8ebedf52274a4fff94265fd","_id":"passport-client-cert@2.1.0","_shasum":"25cb47a0b8f183eb5c8348266a9c8656c981283b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"},"dist":{"shasum":"25cb47a0b8f183eb5c8348266a9c8656c981283b","tarball":"https://registry.npmjs.org/passport-client-cert/-/passport-client-cert-2.1.0.tgz","integrity":"sha512-HaE+9ZD2euK0ht8w4aj6dAjSNg77BlZtBZIN9s4nAqmtoIT8RKNU1ZSMlCQlYT8ZAyql7mRi7Ll2sYhcejZTfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP2ptwj6ItVzNP7RYsQz673xr3Hs/fNhm1UtcBWJREWQIgXU1iv1AM/RHzXdd5ywvoZbiF4bzTef9FiqN183XDBn0="}]},"maintainers":[{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-client-cert-2.1.0.tgz_1498939798057_0.45019082445651293"}}},"readme":"# passport-client-cert\n\n[![Build](https://travis-ci.org/ripjar/passport-client-cert.svg?branch=master)](https://travis-ci.org/ripjar/passport-client-cert)\n\n[passport.js](http://passportjs.org/) strategy for TLS client certificate authentication and authorisation.\n\npassport-client-cert is for TLS connections direct to a Node.js application.\n\n## Usage\nThe strategy constructor requires a verify callback, which will be executed on each authenticated request. It is responsible for checking the validity of the certificate and user authorisation.\n\n### Options\n\n* `passReqToCallback` - optional. Causes the request object to be supplied to the verify callback as the first parameter.\n\nThe verify callback is passed with the [client certificate object](https://nodejs.org/api/tls.html#tls_tlssocket_getpeercertificate_detailed) and a `done` callback. The `done` callback must be called as per the [passport.js documentation](http://passportjs.org/guide/configure/).\n\n````javascript\nvar passport = require('passport');\nvar ClientCertStrategy = require('passport-client-cert').Strategy;\n\npassport.use(new ClientCertStrategy(function(clientCert, done) {\n  var cn = clientCert.subject.cn,\n      user = null;\n      \n  // The CN will typically be checked against a database\n  if(cn === 'test-cn') {\n    user = { name: 'Test User' }\n  }\n  \n  done(null, user);\n}));\n````\n\nThe verify callback can be supplied with the `request` object by setting the `passReqToCallback` option to `true`, and changing callback arguments accordingly.\n\n````javascript\npassport.use(new ClientCertStrategy({ passReqToCallback: true }, function(req, clientCert, done) {\n  var cn = clientCert.subject.cn,\n      user = null;\n      \n  // The CN will typically be checked against a database\n  if(cn === 'test-cn') {\n    user = { name: 'Test User' }\n  }\n  \n  done(null, user);\n}));\n````\n\n## Examples\n\nInstall and start the example server app:\n\n    $ npm install\n    $ cd example\n    $ node example-server.js\n\nSubmit a request with a client certificate:\n\n    $ curl -k --cert certs/joe.crt --key certs/joe.key --cacert certs/ca.crt https://localhost:3443\n\nIf `curl` fails and you are using OSX Mavericks or newer (where [support for ad-hoc CA certifcates is broken](http://curl.haxx.se/mail/archive-2013-10/0036.html), try `wget` instead:\n\n    $ wget -qSO - --no-check-certificate --certificate=certs/joe.crt --private-key=certs/joe.key --ca-certificate=certs/ca.crt https://localhost:3443/\n\nRequests submitted with `joe.crt` are authorised because `joe` is in the list of valid users. Requests submitted without a certificate, or with `bob.crt` will fail with a HTTP `401`.\n\n## Test\n\n    $ npm install\n    $ npm test\n\n\n## Licence\n\n[The MIT Licence](http://opensource.org/licenses/MIT)\n","maintainers":[{"name":"jwhitfieldseed","email":"joeseed86@gmail.com"}],"time":{"modified":"2022-06-23T12:23:57.191Z","created":"2015-03-08T11:53:25.850Z","1.0.0":"2015-03-08T11:53:25.850Z","1.0.1":"2015-03-08T12:39:14.462Z","1.1.0":"2015-09-29T19:20:13.121Z","2.0.0":"2016-02-23T18:39:51.472Z","2.1.0":"2017-07-01T20:09:59.092Z"},"homepage":"https://github.com/ripjar/passport-client-cert","keywords":["pki","passport","ssl","tls","certificate","cert","authentication"],"repository":{"type":"git","url":"git+https://github.com/ripjar/passport-client-cert.git"},"author":{"name":"Joe Whitfield-Seed"},"bugs":{"url":"https://github.com/ripjar/passport-client-cert/issues"},"license":"MIT","readmeFilename":"README.md"}