{
  "name": "passport",
  "version": "0.1.17",
  "description": "Simple, unobtrusive authentication for Node.js.",
  "keywords": [
    "express",
    "connect",
    "auth",
    "authn",
    "authentication"
  ],
  "homepage": "http://passportjs.org/",
  "repository": {
    "type": "git",
    "url": "git://github.com/jaredhanson/passport.git"
  },
  "bugs": {
    "url": "http://github.com/jaredhanson/passport/issues"
  },
  "author": {
    "name": "Jared Hanson",
    "email": "jaredhanson@gmail.com",
    "url": "http://www.jaredhanson.net/"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "http://www.opensource.org/licenses/MIT"
    }
  ],
  "main": "./lib/passport",
  "dependencies": {
    "pkginfo": "0.2.x",
    "pause": "0.0.1"
  },
  "devDependencies": {
    "vows": "0.6.x"
  },
  "scripts": {
    "test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js test/**/*-test.js test/context/http/*-test.js"
  },
  "engines": {
    "node": ">= 0.4.0"
  },
  "readme": "# Passport\n\nPassport is [Express](http://expressjs.com/)-compatible authentication\nmiddleware for [Node.js](http://nodejs.org/).\n\nPassport's sole purpose is to authenticate requests, which it does through an\nextensible set of plugins known as _strategies_.  Passport does not mount\nroutes or assume any particular database schema, which maximizes flexiblity and\nallows application-level decisions to be made by the developer.  The API is\nsimple: you provide Passport a request to authenticate, and Passport provides\nhooks for controlling what occurs when authentication succeeds or fails.\n\n## Install\n\n    $ npm install passport\n\n## Usage\n\n#### Strategies\n\nPassport uses the concept of strategies to authenticate requests.  Strategies\ncan range from verifying username and password credentials, delegated\nauthentication using [OAuth](http://oauth.net/) (for example, via [Facebook](http://www.facebook.com/)\nor [Twitter](http://twitter.com/)), or federated authentication using [OpenID](http://openid.net/).\n\nBefore authenticating requests, the strategy (or strategies) used by an\napplication must be configured.\n\n    passport.use(new LocalStrategy(\n      function(username, password, done) {\n        User.findOne({ username: username, password: password }, function (err, user) {\n          done(err, user);\n        });\n      }\n    ));\n\n#### Sessions\n\nPassport will maintain persistent login sessions.  In order for persistent\nsessions to work, the authenticated user must be serialized to the session, and\ndeserialized when subsequent requests are made.\n\nPassport does not impose any restrictions on how your user records are stored.\nInstead, you provide functions to Passport which implements the necessary\nserialization and deserialization logic.  In a typical application, this will be\nas simple as serializing the user ID, and finding the user by ID when\ndeserializing.\n\n    passport.serializeUser(function(user, done) {\n      done(null, user.id);\n    });\n\n    passport.deserializeUser(function(id, done) {\n      User.findById(id, function (err, user) {\n        done(err, user);\n      });\n    });\n\n#### Middleware\n\nTo use Passport in an [Express](http://expressjs.com/) or\n[Connect](http://senchalabs.github.com/connect/)-based application, configure it\nwith the required `passport.initialize()` middleware.  If your application uses\npersistent login sessions (recommended, but not required), `passport.session()`\nmiddleware must also be used.\n\n    app.configure(function() {\n      app.use(express.static(__dirname + '/../../public'));\n      app.use(express.cookieParser());\n      app.use(express.bodyParser());\n      app.use(express.session({ secret: 'keyboard cat' }));\n      app.use(passport.initialize());\n      app.use(passport.session());\n      app.use(app.router);\n    });\n\n#### Authenticate Requests\n\nPassport provides an `authenticate()` function, which is used as route\nmiddleware to authenticate requests.\n\n    app.post('/login', \n      passport.authenticate('local', { failureRedirect: '/login' }),\n      function(req, res) {\n        res.redirect('/');\n      });\n\n## Examples\n\nFor a complete, working example, refer to the [login example](https://github.com/jaredhanson/passport-local/tree/master/examples/login)\nincluded in [passport-local](https://github.com/jaredhanson/passport-local).\n\n## Strategies\n\nPassport has a comprehensive set of **over 120** authentication strategies\ncovering social networking, enterprise integration, API services, and more.\nThe [complete list](https://github.com/jaredhanson/passport/wiki/Strategies) is\navailable on the [wiki](https://github.com/jaredhanson/passport/wiki).\n\nThe following table lists commonly used strategies:\n\n|Strategy                                                       | Protocol                 |Developer                                       |\n|---------------------------------------------------------------|--------------------------|------------------------------------------------|\n|[Local](https://github.com/jaredhanson/passport-local)         | HTML form                |[Jared Hanson](https://github.com/jaredhanson)  |\n|[OpenID](https://github.com/jaredhanson/passport-openid)       | OpenID                   |[Jared Hanson](https://github.com/jaredhanson)  |\n|[BrowserID](https://github.com/jaredhanson/passport-browserid) | BrowserID                |[Jared Hanson](https://github.com/jaredhanson)  |\n|[Facebook](https://github.com/jaredhanson/passport-facebook)   | OAuth 2.0                |[Jared Hanson](https://github.com/jaredhanson)  |\n|[Google](https://github.com/jaredhanson/passport-google)       | OpenID                   |[Jared Hanson](https://github.com/jaredhanson)  |\n|[Google](https://github.com/jaredhanson/passport-google-oauth) | OAuth / OAuth 2.0        |[Jared Hanson](https://github.com/jaredhanson)  |\n|[Twitter](https://github.com/jaredhanson/passport-twitter)     | OAuth                    |[Jared Hanson](https://github.com/jaredhanson)  |\n\n## Related Modules\n\n- [Locomotive](https://github.com/jaredhanson/locomotive) — Powerful MVC web framework\n- [OAuthorize](https://github.com/jaredhanson/oauthorize) — OAuth service provider toolkit\n- [OAuth2orize](https://github.com/jaredhanson/oauth2orize) — OAuth 2.0 authorization server toolkit\n- [connect-ensure-login](https://github.com/jaredhanson/connect-ensure-login)  — middleware to ensure login sessions\n\nThe [modules](https://github.com/jaredhanson/passport/wiki/Modules) page on the\n[wiki](https://github.com/jaredhanson/passport/wiki) lists other useful modules\nthat build upon or integrate with Passport.\n\n## Tests\n\n    $ npm install --dev\n    $ make test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/passport.png)](http://travis-ci.org/jaredhanson/passport)\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2011-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n",
  "readmeFilename": "README.md",
  "_id": "passport@0.1.17",
  "_from": "passport@>= 0.1.17"
}
