Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fiznool committed Nov 16, 2014
1 parent 9709675 commit 4fe8e3b
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 75 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
node_modules

*.log
171 changes: 99 additions & 72 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
0 info it worked if it ends with ok
1 verbose cli [ '/home/fiznool/.nvm/v0.10.33/bin/node',
1 verbose cli '/home/fiznool/.nvm/v0.10.33/bin/npm',
1 verbose cli 'publish',
1 verbose cli '0.1.1' ]
1 verbose cli 'publish' ]
2 info using npm@1.4.28
3 info using node@v0.10.33
4 verbose publish [ '0.1.1' ]
5 verbose cache add [ '0.1.1', null ]
6 verbose cache add name=undefined spec="0.1.1" args=["0.1.1",null]
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
Expand All @@ -17,70 +16,98 @@
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: '0.1.1',
7 verbose parsed url path: '0.1.1',
7 verbose parsed url href: '0.1.1' }
8 silly lockFile a73777f5-0-1-1 0.1.1
9 verbose lock 0.1.1 /home/fiznool/.npm/a73777f5-0-1-1.lock
10 silly lockFile a73777f5-0-1-1 0.1.1
11 silly lockFile a73777f5-0-1-1 0.1.1
12 verbose addNamed [ '0.1.1', '' ]
13 verbose addNamed [ null, '*' ]
14 silly lockFile f56946b3-0-1-1 0.1.1@
15 verbose lock 0.1.1@ /home/fiznool/.npm/f56946b3-0-1-1.lock
16 silly addNameRange { name: '0.1.1', range: '*', hasData: false }
17 verbose request where is /0.1.1
18 verbose request registry https://registry.npmjs.org/
19 verbose request id d7baab854cc8b9d6
20 verbose url raw /0.1.1
21 verbose url resolving [ 'https://registry.npmjs.org/', './0.1.1' ]
22 verbose url resolved https://registry.npmjs.org/0.1.1
23 verbose request where is https://registry.npmjs.org/0.1.1
24 info trying registry request attempt 1 at 09:12:33
25 http GET https://registry.npmjs.org/0.1.1
26 http 404 https://registry.npmjs.org/0.1.1
27 verbose headers { date: 'Sun, 16 Nov 2014 09:12:33 GMT',
27 verbose headers server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
27 verbose headers 'content-type': 'application/json',
27 verbose headers 'cache-control': 'max-age=0',
27 verbose headers 'content-length': '52',
27 verbose headers 'accept-ranges': 'bytes',
27 verbose headers via: '1.1 varnish',
27 verbose headers age: '0',
27 verbose headers 'x-served-by': 'cache-lcy1129-LCY',
27 verbose headers 'x-cache': 'MISS',
27 verbose headers 'x-cache-hits': '0',
27 verbose headers 'x-timer': 'S1416129153.516749,VS0,VE86',
27 verbose headers 'keep-alive': 'timeout=10, max=50',
27 verbose headers connection: 'Keep-Alive' }
28 silly registry.get cb [ 404,
28 silly registry.get { date: 'Sun, 16 Nov 2014 09:12:33 GMT',
28 silly registry.get server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
28 silly registry.get 'content-type': 'application/json',
28 silly registry.get 'cache-control': 'max-age=0',
28 silly registry.get 'content-length': '52',
28 silly registry.get 'accept-ranges': 'bytes',
28 silly registry.get via: '1.1 varnish',
28 silly registry.get age: '0',
28 silly registry.get 'x-served-by': 'cache-lcy1129-LCY',
28 silly registry.get 'x-cache': 'MISS',
28 silly registry.get 'x-cache-hits': '0',
28 silly registry.get 'x-timer': 'S1416129153.516749,VS0,VE86',
28 silly registry.get 'keep-alive': 'timeout=10, max=50',
28 silly registry.get connection: 'Keep-Alive' } ]
29 silly lockFile f56946b3-0-1-1 0.1.1@
30 silly lockFile f56946b3-0-1-1 0.1.1@
31 error 404 404 Not Found: 0.1.1
31 error 404
31 error 404 '0.1.1' is not in the npm registry.
31 error 404 You should bug the author to publish it
31 error 404
31 error 404 Note that you can also install from a
31 error 404 tarball, folder, or http url, or git url.
32 error System Linux 3.16.0-24-generic
33 error command "/home/fiznool/.nvm/v0.10.33/bin/node" "/home/fiznool/.nvm/v0.10.33/bin/npm" "publish" "0.1.1"
34 error cwd /home/fiznool/Code/libraries/passport-oauth2-refresh
35 error node -v v0.10.33
36 error npm -v 1.4.28
37 error code E404
38 verbose exit [ 1, true ]
7 verbose parsed url pathname: '.',
7 verbose parsed url path: '.',
7 verbose parsed url href: '.' }
8 silly lockFile 3a52ce78- .
9 verbose lock . /home/fiznool/.npm/3a52ce78-.lock
10 verbose tar pack [ '/home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package.tgz',
10 verbose tar pack '.' ]
11 verbose tarball /home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package.tgz
12 verbose folder .
13 info prepublish passport-oauth2-refresh@0.1.0
14 silly lockFile 1f1177db-tar tar://.
15 verbose lock tar://. /home/fiznool/.npm/1f1177db-tar.lock
16 silly lockFile 2e5e1581-oauth2-refresh-0-1-0-package-tgz tar:///home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package.tgz
17 verbose lock tar:///home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package.tgz /home/fiznool/.npm/2e5e1581-oauth2-refresh-0-1-0-package-tgz.lock
18 silly lockFile 1f1177db-tar tar://.
19 silly lockFile 1f1177db-tar tar://.
20 silly lockFile 2e5e1581-oauth2-refresh-0-1-0-package-tgz tar:///home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package.tgz
21 silly lockFile 2e5e1581-oauth2-refresh-0-1-0-package-tgz tar:///home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package.tgz
22 silly lockFile 162b9704-ort-oauth2-refresh-0-1-0-package /home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package
23 verbose lock /home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package /home/fiznool/.npm/162b9704-ort-oauth2-refresh-0-1-0-package.lock
24 silly lockFile 162b9704-ort-oauth2-refresh-0-1-0-package /home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package
25 silly lockFile 162b9704-ort-oauth2-refresh-0-1-0-package /home/fiznool/.npm/passport-oauth2-refresh/0.1.0/package
26 silly lockFile 3a52ce78- .
27 silly lockFile 3a52ce78- .
28 silly publish { name: 'passport-oauth2-refresh',
28 silly publish version: '0.1.0',
28 silly publish description: 'A passport.js add-on to provide automatic OAuth 2.0 token refreshing.',
28 silly publish main: 'lib/refresh.js',
28 silly publish directories: { test: 'test' },
28 silly publish scripts: { test: 'node_modules/mocha/bin/mocha test/refresh.spec.js' },
28 silly publish repository:
28 silly publish { type: 'git',
28 silly publish url: 'https://github.com/fiznool/passport-oauth-refresh.git' },
28 silly publish keywords: [ 'passport', 'oauth', 'oauth2', 'auth', 'authentication' ],
28 silly publish author:
28 silly publish { name: 'Tom Spencer',
28 silly publish email: 'fiznool@gmail.com',
28 silly publish url: 'https://github.com/fiznool' },
28 silly publish license: 'MIT',
28 silly publish bugs: { url: 'https://github.com/fiznool/passport-oauth-refresh/issues' },
28 silly publish homepage: 'https://github.com/fiznool/passport-oauth-refresh',
28 silly publish devDependencies: { chai: '*', mocha: '*', sinon: '*', 'sinon-chai': '*' },
28 silly publish engines: { node: '>=0.6.0' },
28 silly publish readme: '# Passport OAuth 2.0 Refresh\n\nAn add-on to the [Passport](http://passportjs.org) authentication library to provide a simple way to refresh your OAuth 2.0 access tokens.\n\n## Installation\n\n```\nnpm install passport-oauth2-refresh\n```\n\n## Usage\n\nWhen setting up your passport strategies, add a call to `refresh.use()` after `passport.use()`.\n\nAn example, using the Facebook strategy:\n\n``` js\nvar passport = require(\'passport\'),\n , refresh = require(\'passport-oauth2-refresh\')\n , FacebookStrategy = require(\'passport-facebook\').Strategy;\n\nvar strategy = new FacebookStrategy({\n clientID: FACEBOOK_APP_ID,\n clientSecret: FACEBOOK_APP_SECRET,\n callbackURL: "http://www.example.com/auth/facebook/callback"\n},\nfunction(accessToken, refreshToken, profile, done) {\n // Make sure you store the refreshToken somewhere!\n User.findOrCreate(..., function(err, user) {\n if (err) { return done(err); }\n done(null, user);\n });\n});\n\npassport.use(strategy);\nrefresh.use(strategy);\n```\n\nWhen you need to refresh the access token, call `requestNewAccessToken()`:\n\n```\nvar refresh = require(\'passport-oauth2-refresh\');\nrefresh.requestNewAccessToken(\'facebook\', \'some_refresh_token\', function(err, accessToken, refreshToken) {\n // You have a new access token, store it in the user object,\n // or use it to make a new request.\n // `refreshToken` may or may not exist, depending on the strategy you are using.\n // You probably don\'t need it anyway, as according to the OAuth 2.0 spec,\n // it should be the same as the initial refresh token.\n\n});\n\n```\n\n## Why?\n\nPassport is a library which doesn\'t deal in implementation-specific details. From the author:\n\n> Passport is a library for authenticating requests, and only that. It is not going to get involved in anything that is specific to OAuth, or any other authorization protocol.\n\nFair enough. Hence, this add-on was born as a way to help deal with refreshing OAuth 2.0 tokens.\n\nIt is particularly useful when dealing with Google\'s OAuth 2.0 implementation, which expires access tokens after 1 hour.\n\n## License\n\nMIT',
28 silly publish readmeFilename: 'README.md',
28 silly publish gitHead: '73c9add3e7537ea048d90160e46a44a1555c4c2a',
28 silly publish _id: 'passport-oauth2-refresh@0.1.0',
28 silly publish _shasum: 'b091214437b90494672bdadc142f39812bc22844',
28 silly publish _from: '.' }
29 verbose request where is /passport-oauth2-refresh
30 verbose request registry https://registry.npmjs.org/
31 verbose request id 151e29d658c98958
32 verbose url raw /passport-oauth2-refresh
33 verbose url resolving [ 'https://registry.npmjs.org/', './passport-oauth2-refresh' ]
34 verbose url resolved https://registry.npmjs.org/passport-oauth2-refresh
35 verbose request where is https://registry.npmjs.org/passport-oauth2-refresh
36 info trying registry request attempt 1 at 09:15:24
37 http PUT https://registry.npmjs.org/passport-oauth2-refresh
38 http 403 https://registry.npmjs.org/passport-oauth2-refresh
39 verbose headers { date: 'Sun, 16 Nov 2014 09:15:25 GMT',
39 verbose headers server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
39 verbose headers 'content-type': 'application/json',
39 verbose headers 'cache-control': 'max-age=60',
39 verbose headers 'content-length': '5345',
39 verbose headers 'accept-ranges': 'bytes',
39 verbose headers via: '1.1 varnish',
39 verbose headers 'x-served-by': 'cache-lcy1129-LCY',
39 verbose headers 'x-cache': 'MISS',
39 verbose headers 'x-cache-hits': '0',
39 verbose headers 'x-timer': 'S1416129324.777638,VS0,VE303',
39 verbose headers 'keep-alive': 'timeout=10, max=50',
39 verbose headers connection: 'Keep-Alive' }
40 error publish Failed PUT 403
41 error Error: forbidden cannot modify pre-existing version: 0.1.0
41 error old={"name":"passport-oauth2-refresh","version":"0.1.0","description":"A passport add-on to provide automatic OAuth 2.0 token refreshing.","main":"lib/refresh.js","directories":{"test":"test"},"scripts":{"test":"node_modules/mocha/bin/mocha test/refresh.spec.js"},"repository":{"type":"git","url":"https://github.com/fiznool/passport-oauth-refresh.git"},"keywords":["passport","oauth","oauth2","auth","authentication"],"author":{"name":"Tom Spencer","email":"fiznool@gmail.com","url":"https://github.com/fiznool"},"license":"MIT","bugs":{"url":"https://github.com/fiznool/passport-oauth-refresh/issues"},"homepage":"https://github.com/fiznool/passport-oauth-refresh","devDependencies":{"chai":"*","mocha":"*","sinon":"*","sinon-chai":"*"},"engines":{"node":">=0.6.0"},"gitHead":"02444ab09eccb6838e5cd78291e83253cd7b2e67","_id":"passport-oauth2-refresh@0.1.0","_shasum":"6c334095e5cba2afed7b3725ef989b82f0b85155","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"fiznool","email":"fiznool@gmail.com"},"maintainers":[{"name":"fiznool","email":"fiznool@gmail.com"}],"dist":{"shasum":"6c334095e5cba2afed7b3725ef989b82f0b85155","tarball":"http://registry.npmjs.org/passport-oauth2-refresh/-/passport-oauth2-refresh-0.1.0.tgz"}}
41 error new={"name":"passport-oauth2-refresh","version":"0.1.0","description":"A passport.js add-on to provide automatic OAuth 2.0 token refreshing.","main":"lib/refresh.js","directories":{"test":"test"},"scripts":{"test":"node_modules/mocha/bin/mocha test/refresh.spec.js"},"repository":{"type":"git","url":"https://github.com/fiznool/passport-oauth-refresh.git"},"keywords":["passport","oauth","oauth2","auth","authentication"],"author":{"name":"Tom Spencer","email":"fiznool@gmail.com","url":"https://github.com/fiznool"},"license":"MIT","bugs":{"url":"https://github.com/fiznool/passport-oauth-refresh/issues"},"homepage":"https://github.com/fiznool/passport-oauth-refresh","devDependencies":{"chai":"*","mocha":"*","sinon":"*","sinon-chai":"*"},"engines":{"node":">=0.6.0"},"readme":"# Passport OAuth 2.0 Refresh\u000a\u000aAn add-on to the [Passport](http://passportjs.org) authentication library to provide a simple way to refresh your OAuth 2.0 access tokens.\u000a\u000a## Installation\u000a\u000a```\u000anpm install passport-oauth2-refresh\u000a```\u000a\u000a## Usage\u000a\u000aWhen setting up your passport strategies, add a call to `refresh.use()` after `passport.use()`.\u000a\u000aAn example, using the Facebook strategy:\u000a\u000a``` js\u000avar passport = require('passport'),\u000a , refresh = require('passport-oauth2-refresh')\u000a , FacebookStrategy = require('passport-facebook').Strategy;\u000a\u000avar strategy = new FacebookStrategy({\u000a clientID: FACEBOOK_APP_ID,\u000a clientSecret: FACEBOOK_APP_SECRET,\u000a callbackURL: \"http://www.example.com/auth/facebook/callback\"\u000a},\u000afunction(accessToken, refreshToken, profile, done) {\u000a // Make sure you store the refreshToken somewhere!\u000a User.findOrCreate(..., function(err, user) {\u000a if (err) { return done(err); }\u000a done(null, user);\u000a });\u000a});\u000a\u000apassport.use(strategy);\u000arefresh.use(strategy);\u000a```\u000a\u000aWhen you need to refresh the access token, call `requestNewAccessToken()`:\u000a\u000a```\u000avar refresh = require('passport-oauth2-refresh');\u000arefresh.requestNewAccessToken('facebook', 'some_refresh_token', function(err, accessToken, refreshToken) {\u000a // You have a new access token, store it in the user object,\u000a // or use it to make a new request.\u000a // `refreshToken` may or may not exist, depending on the strategy you are using.\u000a // You probably don't need it anyway, as according to the OAuth 2.0 spec,\u000a // it should be the same as the initial refresh token.\u000a\u000a});\u000a\u000a```\u000a\u000a## Why?\u000a\u000aPassport is a library which doesn't deal in implementation-specific details. From the author:\u000a\u000a> Passport is a library for authenticating requests, and only that. It is not going to get involved in anything that is specific to OAuth, or any other authorization protocol.\u000a\u000aFair enough. Hence, this add-on was born as a way to help deal with refreshing OAuth 2.0 tokens.\u000a\u000aIt is particularly useful when dealing with Google's OAuth 2.0 implementation, which expires access tokens after 1 hour.\u000a\u000a## License\u000a\u000aMIT","readmeFilename":"README.md","gitHead":"73c9add3e7537ea048d90160e46a44a1555c4c2a","_id":"passport-oauth2-refresh@0.1.0","_shasum":"b091214437b90494672bdadc142f39812bc22844","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"fiznool","email":"fiznool@gmail.com"},"maintainers":[{"name":"fiznool","email":"fiznool@gmail.com"}],"dist":{"shasum":"b091214437b90494672bdadc142f39812bc22844","tarball":"http://registry.npmjs.org/passport-oauth2-refresh/-/passport-oauth2-refresh-0.1.0.tgz"}}: passport-oauth2-refresh
41 error at RegClient.<anonymous> (/home/fiznool/.nvm/v0.10.33/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)
41 error at Request._callback (/home/fiznool/.nvm/v0.10.33/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
41 error at Request.self.callback (/home/fiznool/.nvm/v0.10.33/lib/node_modules/npm/node_modules/request/request.js:236:22)
41 error at Request.emit (events.js:98:17)
41 error at Request.<anonymous> (/home/fiznool/.nvm/v0.10.33/lib/node_modules/npm/node_modules/request/request.js:1142:14)
41 error at Request.emit (events.js:117:20)
41 error at IncomingMessage.<anonymous> (/home/fiznool/.nvm/v0.10.33/lib/node_modules/npm/node_modules/request/request.js:1096:12)
41 error at IncomingMessage.emit (events.js:117:20)
41 error at _stream_readable.js:943:16
41 error at process._tickCallback (node.js:419:13)
42 error If you need help, you may report this *entire* log,
42 error including the npm and node versions, at:
42 error <http://github.com/npm/npm/issues>
43 error System Linux 3.16.0-24-generic
44 error command "/home/fiznool/.nvm/v0.10.33/bin/node" "/home/fiznool/.nvm/v0.10.33/bin/npm" "publish"
45 error cwd /home/fiznool/Code/libraries/passport-oauth2-refresh
46 error node -v v0.10.33
47 error npm -v 1.4.28
48 verbose exit [ 1, true ]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "passport-oauth2-refresh",
"version": "0.1.0",
"description": "A passport add-on to provide automatic OAuth 2.0 token refreshing.",
"version": "0.1.1",
"description": "A passport.js add-on to provide automatic OAuth 2.0 token refreshing.",
"main": "lib/refresh.js",
"directories": {
"test": "test"
Expand Down

0 comments on commit 4fe8e3b

Please sign in to comment.