-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
69 lines (69 loc) · 5.02 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"name": "passport-oauth2",
"version": "1.1.1",
"description": "OAuth 2.0 authentication strategy for Passport.",
"keywords": [
"passport",
"auth",
"authn",
"authentication",
"authz",
"authorization",
"oauth",
"oauth2"
],
"repository": {
"type": "git",
"url": "git://github.com/jaredhanson/passport-oauth2.git"
},
"bugs": {
"url": "http://github.com/jaredhanson/passport-oauth2/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",
"dependencies": {
"passport-strategy": "1.x.x",
"oauth": "0.9.x",
"uid2": "0.0.x"
},
"devDependencies": {
"mocha": "1.x.x",
"chai": "1.x.x",
"chai-passport-strategy": "0.1.x"
},
"engines": {
"node": ">= 0.4.0"
},
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js"
},
"testling": {
"browsers": [
"chrome/latest"
],
"harness": "mocha",
"files": [
"test/bootstrap/testling.js",
"test/*.test.js",
"test/**/*.test.js"
]
},
"readme": "# passport-oauth2\n\n[![Build](https://travis-ci.org/jaredhanson/passport-oauth2.png)](http://travis-ci.org/jaredhanson/passport-oauth2)\n[![Coverage](https://coveralls.io/repos/jaredhanson/passport-oauth2/badge.png)](https://coveralls.io/r/jaredhanson/passport-oauth2)\n[![Dependencies](https://david-dm.org/jaredhanson/passport-oauth2.png)](http://david-dm.org/jaredhanson/passport-oauth2)\n\nGeneral-purpose OAuth 2.0 authentication strategy for [Passport](http://passportjs.org/).\n\nThis module lets you authenticate using OAuth 2.0 in your Node.js applications.\nBy plugging into Passport, OAuth 2.0 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\nNote that this strategy provides generic OAuth 2.0 support. In many cases, a\nprovider-specific strategy can be used instead, which cuts down on unnecessary\nconfiguration, and accommodates any provider-specific quirks. See the\n[list](https://github.com/jaredhanson/passport/wiki/Strategies) for supported\nproviders.\n\nDevelopers who need to implement authentication against an OAuth 2.0 provider\nthat is not already supported are encouraged to sub-class this strategy. If you\nchoose to open source the new provider-specific strategy, please add it to the\nlist so other people can find it.\n\n## Install\n\n $ npm install passport-oauth2\n\n## Usage\n\n#### Configure Strategy\n\nThe OAuth 2.0 authentication strategy authenticates users using a third-party\naccount and OAuth 2.0 tokens. The provider's OAuth 2.0 endpoints, as well as\nthe client identifer and secret, are specified as options. The strategy\nrequires a `verify` callback, which receives an access token and profile,\nand calls `done` providing a user.\n\n passport.use(new OAuth2Strategy({\n authorizationURL: 'https://www.example.com/oauth2/authorize',\n tokenURL: 'https://www.example.com/oauth2/token',\n clientID: EXAMPLE_CLIENT_ID,\n clientSecret: EXAMPLE_CLIENT_SECRET,\n callbackURL: \"http://localhost:3000/auth/example/callback\"\n },\n function(accessToken, refreshToken, profile, done) {\n User.findOrCreate({ exampleId: profile.id }, function (err, user) {\n return done(err, user);\n });\n }\n ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'oauth2'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n app.get('/auth/example',\n passport.authenticate('oauth'));\n\n app.get('/auth/example/callback',\n passport.authenticate('oauth', { failureRedirect: '/login' }),\n function(req, res) {\n // Successful authentication, redirect home.\n res.redirect('/');\n });\n\n## Related Modules\n\n- [passport-oauth1](https://github.com/jaredhanson/passport-oauth1) — OAuth 1.0 authentication strategy\n- [passport-http-bearer](https://github.com/jaredhanson/passport-http-bearer) — Bearer token authentication strategy for APIs\n- [OAuth2orize](https://github.com/jaredhanson/oauth2orize) — OAuth 2.0 authorization server toolkit\n\n## Tests\n\n $ npm install\n $ npm test\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-oauth2@1.1.1",
"dist": {
"shasum": "a90ab4efdd9239e5cb180bb9b21450ad7051493e"
},
"_from": "passport-oauth2@1.x.x",
"_resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.1.1.tgz"
}