-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
49 lines (49 loc) · 4.39 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"name": "passport-google",
"version": "0.3.0",
"description": "Google (OpenID) authentication strategy for Passport.",
"keywords": [
"passport",
"google",
"auth",
"authn",
"authentication",
"identity"
],
"repository": {
"type": "git",
"url": "git://github.com/jaredhanson/passport-google.git"
},
"bugs": {
"url": "http://github.com/jaredhanson/passport-google/issues"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"author": {
"name": "Jared Hanson",
"email": "jaredhanson@gmail.com",
"url": "http://www.jaredhanson.net/"
},
"main": "./lib/passport-google",
"dependencies": {
"pkginfo": "0.2.x",
"passport-openid": "0.3.x"
},
"devDependencies": {
"vows": "0.6.x"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
},
"engines": {
"node": ">= 0.6.0"
},
"readme": "# Passport-Google\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Google](http://www.google.com/)\nusing OpenID 2.0.\n\nThis module lets you authenticate using Google in your Node.js applications.\nBy plugging into Passport, Google authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Installation\n\n $ npm install passport-google\n\n## Usage\n\n#### Configure Strategy\n\nThe Google authentication strategy authenticates users using a Google account,\nwhich is also an OpenID 2.0 identifier. The strategy requires a `validate`\ncallback, which accepts this identifier and calls `done` providing a user.\nAdditionally, options can be supplied to specify a return URL and realm.\n\n passport.use(new GoogleStrategy({\n returnURL: 'http://localhost:3000/auth/google/return',\n realm: 'http://localhost:3000/'\n },\n function(identifier, done) {\n User.findByOpenID({ openId: identifier }, function (err, user) {\n return done(err, user);\n });\n }\n ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'google'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n app.get('/auth/google',\n passport.authenticate('google'),\n function(req, res){\n // The request will be redirected to Google for authentication, so\n // this function will not be called.\n });\n\n app.get('/auth/google/callback', \n passport.authenticate('google', { failureRedirect: '/login' }),\n function(req, res) {\n // Successful authentication, redirect home.\n res.redirect('/');\n });\n\n## Examples\n\nFor a complete, working example, refer to the [signon example](https://github.com/jaredhanson/passport-google/tree/master/examples/signon).\n\n## Tests\n\n $ npm install --dev\n $ make test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/passport-google.png)](http://travis-ci.org/jaredhanson/passport-google)\n\n## Credits\n\n - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 Jared Hanson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"readmeFilename": "README.md",
"_id": "passport-google@0.3.0",
"_from": "passport-google@0.3.0"
}