-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
66 lines (66 loc) · 3.85 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
{
"name": "passport-github",
"version": "0.1.5",
"description": "GitHub authentication strategy for Passport.",
"keywords": [
"passport",
"github",
"auth",
"authn",
"authentication",
"identity"
],
"repository": {
"type": "git",
"url": "http://github.com/jaredhanson/passport-github.git"
},
"bugs": {
"url": "http://github.com/jaredhanson/passport-github/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-github",
"dependencies": {
"pkginfo": "0.2.x",
"passport-oauth": "0.1.x"
},
"devDependencies": {
"vows": "0.6.x"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
},
"engines": {
"node": ">= 0.4.0"
},
"readme": "# Passport-GitHub\n\n[Passport](http://passportjs.org/) strategy for authenticating with [GitHub](https://github.com/)\nusing the OAuth 2.0 API.\n\nThis module lets you authenticate using GitHub in your Node.js applications.\nBy plugging into Passport, GitHub 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## Install\n\n $ npm install passport-github\n\n## Usage\n\n#### Configure Strategy\n\nThe GitHub authentication strategy authenticates users using a GitHub account\nand OAuth 2.0 tokens. The strategy requires a `verify` callback, which accepts\nthese credentials and calls `done` providing a user, as well as `options`\nspecifying a client ID, client secret, and callback URL.\n\n passport.use(new GitHubStrategy({\n clientID: GITHUB_CLIENT_ID,\n clientSecret: GITHUB_CLIENT_SECRET,\n callbackURL: \"http://127.0.0.1:3000/auth/github/callback\"\n },\n function(accessToken, refreshToken, profile, done) {\n User.findOrCreate({ githubId: profile.id }, function (err, user) {\n return done(err, user);\n });\n }\n ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'github'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n app.get('/auth/github',\n passport.authenticate('github'));\n\n app.get('/auth/github/callback', \n passport.authenticate('github', { 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 [login example](https://github.com/jaredhanson/passport-github/tree/master/examples/login).\n\n## Tests\n\n $ npm install --dev\n $ make test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/passport-github.png)](http://travis-ci.org/jaredhanson/passport-github)\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\n",
"_id": "passport-github@0.1.5",
"dist": {
"shasum": "258ebb75af40cdc4e3af11be3a138b75c1f865c1",
"tarball": "http://registry.npmjs.org/passport-github/-/passport-github-0.1.5.tgz"
},
"_npmVersion": "1.1.62",
"_npmUser": {
"name": "jaredhanson",
"email": "jaredhanson@gmail.com"
},
"maintainers": [
{
"name": "jaredhanson",
"email": "jaredhanson@gmail.com"
}
],
"directories": {},
"_shasum": "258ebb75af40cdc4e3af11be3a138b75c1f865c1",
"_from": "passport-github@^0.1.5",
"_resolved": "https://registry.npmjs.org/passport-github/-/passport-github-0.1.5.tgz"
}