Changeset 489 for Dev/trunk/src/node_modules/passport
- Timestamp:
- 03/08/14 11:41:10 (11 years ago)
- Location:
- Dev/trunk/src/node_modules/passport
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/node_modules/passport/.travis.yml
r484 r489 1 1 language: "node_js" 2 2 node_js: 3 - 0.4 4 - 0.6 5 - 0.8 3 - "0.4" 4 - "0.6" 5 - "0.8" 6 - "0.10" -
Dev/trunk/src/node_modules/passport/README.md
r484 r489 14 14 15 15 $ npm install passport 16 17 ###### Donate 18 19 Using Passport in your project? [Donations](https://www.gittip.com/jaredhanson/) 20 are greatly appreciated and help support development of this and other quality 21 modules. 16 22 17 23 ## Usage … … 86 92 }); 87 93 88 ## Examples89 90 For a complete, working example, refer to the [login example](https://github.com/jaredhanson/passport-local/tree/master/examples/login)91 included in [passport-local](https://github.com/jaredhanson/passport-local).92 93 94 ## Strategies 94 95 95 Passport has a comprehensive set of **over 1 20** authentication strategies96 Passport has a comprehensive set of **over 140** authentication strategies 96 97 covering social networking, enterprise integration, API services, and more. 97 98 The [complete list](https://github.com/jaredhanson/passport/wiki/Strategies) is … … 109 110 |[Google](https://github.com/jaredhanson/passport-google-oauth) | OAuth / OAuth 2.0 |[Jared Hanson](https://github.com/jaredhanson) | 110 111 |[Twitter](https://github.com/jaredhanson/passport-twitter) | OAuth |[Jared Hanson](https://github.com/jaredhanson) | 112 113 ## Examples 114 115 - For a complete, working example, refer to the [login example](https://github.com/jaredhanson/passport-local/tree/master/examples/login) 116 included in [passport-local](https://github.com/jaredhanson/passport-local). 117 - Please refer to this [tutorial](http://mherman.org/blog/2013/11/10/social-authentication-with-passport-dot-js/) on setting up various social authentication strategies, including a working example found on this [repo](https://github.com/mjhea0/passport-examples). 111 118 112 119 ## Related Modules -
Dev/trunk/src/node_modules/passport/lib/passport/index.js
r484 r489 236 236 */ 237 237 Passport.prototype.authorize = function(strategy, options, callback) { 238 var fwAuthorize = this._framework && (this._framework.authorize || this._framework.authenticate); 239 238 240 options = options || {}; 239 241 options.assignProperty = 'account'; 242 243 if (fwAuthorize) { 244 return fwAuthorize(strategy, options, callback).bind(this); 245 } 240 246 241 247 return authenticate(strategy, options, callback).bind(this); -
Dev/trunk/src/node_modules/passport/node_modules/pause/package.json
r484 r489 17 17 "readmeFilename": "Readme.md", 18 18 "_id": "pause@0.0.1", 19 "dist": { 20 "shasum": "dc3b2287742f3f6249f2d228e74cff5a3f9fe8da" 21 }, 22 "_from": "pause@0.0.1", 23 "_resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz" 19 "_from": "pause@0.0.1" 24 20 } -
Dev/trunk/src/node_modules/passport/node_modules/pkginfo/package.json
r484 r489 31 31 "url": "https://github.com/indexzero/node-pkginfo/issues" 32 32 }, 33 "homepage": "https://github.com/indexzero/node-pkginfo", 33 34 "_id": "pkginfo@0.2.3", 34 35 "dist": { -
Dev/trunk/src/node_modules/passport/package.json
r484 r489 1 1 { 2 2 "name": "passport", 3 "version": "0.1.1 7",3 "version": "0.1.18", 4 4 "description": "Simple, unobtrusive authentication for Node.js.", 5 5 "keywords": [ … … 35 35 }, 36 36 "devDependencies": { 37 "vows": " 0.6.x"37 "vows": "~0.7.0" 38 38 }, 39 39 "scripts": { … … 43 43 "node": ">= 0.4.0" 44 44 }, 45 "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[](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",45 "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###### Donate\n\nUsing Passport in your project? [Donations](https://www.gittip.com/jaredhanson/)\nare greatly appreciated and help support development of this and other quality\nmodules.\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## Strategies\n\nPassport has a comprehensive set of **over 140** 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## Examples\n\n- For 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- Please refer to this [tutorial](http://mherman.org/blog/2013/11/10/social-authentication-with-passport-dot-js/) on setting up various social authentication strategies, including a working example found on this [repo](https://github.com/mjhea0/passport-examples).\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[](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", 46 46 "readmeFilename": "README.md", 47 "_id": "passport@0.1.1 7",47 "_id": "passport@0.1.18", 48 48 "dist": { 49 "shasum": "7 743a467789ec0ed38be04e8820104cbadded67c"49 "shasum": "7ef09b02754a0b69704b26974f28c7e28f5e97c8" 50 50 }, 51 "_from": "passport@ ",52 "_resolved": "https://registry.npmjs.org/passport/-/passport-0.1.1 7.tgz"51 "_from": "passport@0.1.18", 52 "_resolved": "https://registry.npmjs.org/passport/-/passport-0.1.18.tgz" 53 53 }
Note: See TracChangeset
for help on using the changeset viewer.