{"_id":"express-dropbox-oauth","_rev":"39-9a4c67cbdcb3e5d54f36cd8d17707024","name":"express-dropbox-oauth","description":"Dropbox OAuth Middleware for express.","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.1":{"name":"express-dropbox-oauth","version":"0.0.1","description":"Dropbox OAuth Middleware for express.","author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"license":"MIT","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"homepage":"https://github.com/Xiphe/express-dropbox-oauth","scripts":{"test":"mocha --compilers coffee:coffee-script/register -R spec","watch":"mocha --compilers coffee:coffee-script/register --watch -R spec","coverage":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover node_modules/.bin/_mocha --report html -- -R spec -t 3000 -s 2000 && npm run clean","clean":"find src -iname '*.js' -delete && find test -iname '*.js' -delete","coveralls":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover _mocha --report lcovonly -- -R spec -t 3000 -s 2000 && cat ./coverage/lcov.info | coveralls"},"main":"lib/index.coffee","dependencies":{"dropbox":"Xiphe/dropbox-js#50cef4dfe1daf0f6c539bffe2c9256dd2fcefb12"},"devDependencies":{"coffee-script":"~1.7.1","express":"~4.4.3","nedb":"~0.10.5","mocha":"~1.20.1","sinon":"~1.10.2","chai":"~1.9.1","sinon-chai":"~2.5.0","supertest":"~0.13.0","minimist":"~1.1.0","istanbul":"~0.2.8","coveralls":"~2.10.0"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"_id":"express-dropbox-oauth@0.0.1","dist":{"shasum":"e465b9aeb3b20f1cae1f42e153ef5c31137d2a47","tarball":"https://registry.npmjs.org/express-dropbox-oauth/-/express-dropbox-oauth-0.0.1.tgz","integrity":"sha512-vlLGhtB4AOGBj65xDuVfNGBZzzV2oYj5U+m+JV5SfWNptm2OkpsgG8UTgiYK3fuH+AylUMoO/cKsqfaXsB/F7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFlP+mgfDt4yBfdr1yiEuQQzT5BrJZU1Nxo+Jjb8gmrAiEA1rtrty4TN7sZ6NZSLBljPUhF14RjfoIfG74h3o99OeE="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"xiphe","email":"hannes.diercks@jimdo.com"},"maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}]},"0.0.3":{"name":"express-dropbox-oauth","version":"0.0.3","description":"Dropbox OAuth Middleware for express.","author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"license":"MIT","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"homepage":"https://github.com/Xiphe/express-dropbox-oauth","scripts":{"test":"mocha --compilers coffee:coffee-script/register -R spec","watch":"mocha --compilers coffee:coffee-script/register --watch -R spec","coverage":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover node_modules/.bin/_mocha --report html -- -R spec -t 3000 -s 2000 && npm run clean","clean":"find src -iname '*.js' -delete && find test -iname '*.js' -delete","coveralls":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover _mocha --report lcovonly -- -R spec -t 3000 -s 2000 && cat ./coverage/lcov.info | coveralls","prepublish":"coffee -o lib/ src/"},"main":"lib/index.js","dependencies":{"dropbox":"Xiphe/dropbox-js#50cef4dfe1daf0f6c539bffe2c9256dd2fcefb12"},"devDependencies":{"coffee-script":"~1.7.1","express":"~4.4.3","nedb":"~0.10.5","mocha":"~1.20.1","sinon":"~1.10.2","chai":"~1.9.1","sinon-chai":"~2.5.0","supertest":"~0.13.0","minimist":"~1.1.0","istanbul":"~0.2.8","coveralls":"~2.10.0"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"_id":"express-dropbox-oauth@0.0.3","dist":{"shasum":"e4adf53fcb93b167e6196f7b704d2bd9250dae83","tarball":"https://registry.npmjs.org/express-dropbox-oauth/-/express-dropbox-oauth-0.0.3.tgz","integrity":"sha512-jBSz8zRKR14MhE7LFNkTkR9EdDv+HdD48idHUM8uCuf+G7Xio2yJvOW4JRNIZj/KO3kxO6vexKCXXfcYADvhLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuDUvS+RcZ/J+uNn4UWealabuaVCeoJapPT/Zy9acebgIgcddjJN4hRYYSm7v9cl25rthCUtpMYzfDgd+lwhQrdlE="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"xiphe","email":"hannes.diercks@jimdo.com"},"maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}]},"0.0.4":{"name":"express-dropbox-oauth","version":"0.0.4","description":"Dropbox OAuth Middleware for express.","author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"license":"MIT","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"homepage":"https://github.com/Xiphe/express-dropbox-oauth","scripts":{"test":"mocha --compilers coffee:coffee-script/register -R spec","watch":"mocha --compilers coffee:coffee-script/register --watch -R spec","coverage":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover node_modules/.bin/_mocha --report html -- -R spec -t 3000 -s 2000 && npm run clean","clean":"find src -iname '*.js' -delete && find test -iname '*.js' -delete","coveralls":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover _mocha --report lcovonly -- -R spec -t 3000 -s 2000 && cat ./coverage/lcov.info | coveralls","prepublish":"coffee -o lib/ src/","postinstall":"cd ./node_modules/dropbox && npm install"},"main":"lib/index.js","dependencies":{"dropbox":"dropbox/dropbox-js#dece3d13d49d89ea125f3bdc21a3ddcd56388807"},"devDependencies":{"coffee-script":"~1.7.1","express":"~4.4.3","nedb":"~0.10.5","mocha":"~1.20.1","sinon":"~1.10.2","chai":"~1.9.1","sinon-chai":"~2.5.0","supertest":"~0.13.0","minimist":"~1.1.0","istanbul":"~0.2.8","coveralls":"~2.10.0","idkeyvalue":"0.0.1"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"_id":"express-dropbox-oauth@0.0.4","dist":{"shasum":"23fed17a056c98e640f3c9c7dd93c5c58db681c8","tarball":"https://registry.npmjs.org/express-dropbox-oauth/-/express-dropbox-oauth-0.0.4.tgz","integrity":"sha512-ssz/rfRT5CBRGL8+yH+oJ9gg/vravqHzSZWAIy1AsYg1Ud4wPk4hSHwCj9Qusj/RtqQ9mrrR181iys/u6qZ2wA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHrsYzVPXcnrtEyr6WWx8OxNRqIZGfFSd9QRoSEbdYQAiEAmusa2osUaHRmtrIqS5CrHygX+FqGHB+qkCRqfUaa7mA="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"xiphe","email":"hannes.diercks@jimdo.com"},"maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}]},"0.0.5":{"name":"express-dropbox-oauth","version":"0.0.5","description":"Dropbox OAuth Middleware for express.","author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"license":"MIT","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"homepage":"https://github.com/Xiphe/express-dropbox-oauth","scripts":{"test":"mocha --compilers coffee:coffee-script/register -R spec","watch":"mocha --compilers coffee:coffee-script/register --watch -R spec","coverage":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover node_modules/.bin/_mocha --report html -- -R spec -t 3000 -s 2000 && npm run clean","clean":"find src -iname '*.js' -delete && find test -iname '*.js' -delete","coveralls":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover _mocha --report lcovonly -- -R spec -t 3000 -s 2000 && cat ./coverage/lcov.info | coveralls","prepublish":"rm -rf lib && coffee -o lib/ src/","postinstall":"cd ./node_modules/dropbox && npm install"},"main":"lib/index.js","dependencies":{"dropbox":"dropbox/dropbox-js#dece3d13d49d89ea125f3bdc21a3ddcd56388807"},"devDependencies":{"coffee-script":"~1.7.1","express":"~4.4.3","nedb":"~0.10.5","mocha":"~1.20.1","sinon":"~1.10.2","chai":"~1.9.1","sinon-chai":"~2.5.0","supertest":"~0.13.0","minimist":"~1.1.0","istanbul":"~0.2.8","coveralls":"~2.10.0","idkeyvalue":"0.0.1"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"_id":"express-dropbox-oauth@0.0.5","dist":{"shasum":"9d43cbffe6b248378cc1b61aad531e9ba9261082","tarball":"https://registry.npmjs.org/express-dropbox-oauth/-/express-dropbox-oauth-0.0.5.tgz","integrity":"sha512-fFIq9ko/fEON/Mb4hWX81XtOJrhJdSt3uOiGjHRKT7AcuH0aKOOUATGyHnG3CV6Zah1/+SvPSPbmZP2nZ8Hdsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANtq3Nia8/sghIajn69d8Tkk5+6sfJsHTlDnfwdl5mFAiBGKmf1yxuel+KBwhce4aXWjYr8UaKw8YqlIOLfGLc7/w=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"xiphe","email":"hannes.diercks@jimdo.com"},"maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}]},"0.0.6":{"name":"express-dropbox-oauth","version":"0.0.6","description":"Dropbox OAuth Middleware for express.","author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"license":"MIT","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"homepage":"https://github.com/Xiphe/express-dropbox-oauth","scripts":{"test":"mocha --compilers coffee:coffee-script/register -R spec","watch":"mocha --compilers coffee:coffee-script/register --watch -R spec","coverage":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover node_modules/.bin/_mocha --report html -- -R spec -t 3000 -s 2000 && npm run clean","clean":"find src -iname '*.js' -delete && find test -iname '*.js' -delete","coveralls":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover _mocha --report lcovonly -- -R spec -t 3000 -s 2000 && cat ./coverage/lcov.info | coveralls","prepublish":"rm -rf lib && coffee -o lib/ src/","postinstall":"cd ./node_modules/dropbox && npm install"},"main":"lib/index.js","dependencies":{"dropbox":"dropbox/dropbox-js#dece3d13d49d89ea125f3bdc21a3ddcd56388807"},"devDependencies":{"coffee-script":"~1.7.1","express":"~4.4.3","nedb":"~0.10.5","mocha":"~1.20.1","sinon":"~1.10.2","chai":"~1.9.1","sinon-chai":"~2.5.0","supertest":"~0.13.0","minimist":"~1.1.0","istanbul":"~0.2.8","coveralls":"~2.10.0","idkeyvalue":"0.0.1"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"_id":"express-dropbox-oauth@0.0.6","dist":{"shasum":"2fb695d8a67dd3a799ae3fbe494d4e9fc7b3066a","tarball":"https://registry.npmjs.org/express-dropbox-oauth/-/express-dropbox-oauth-0.0.6.tgz","integrity":"sha512-IcRm3/x6CzMHzxzhkQrzY4fQl+X3n7MWMy2nMRCRW6NUjJNsWlxRp8AlgYg2FDa+Ioxis7CNVcBp52dzO78Jgg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlazpqFWm9MecjePBA7i8enksuD4z6Mz95OhWPo1GF3wIgCZMdpr2nQM4LwcuMrDvfrPDAcQVHHwDEmKi5T2BcTBc="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"xiphe","email":"hannes.diercks@jimdo.com"},"maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}]},"0.0.7":{"name":"express-dropbox-oauth","version":"0.0.7","description":"Dropbox OAuth Middleware for express.","author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"license":"MIT","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"homepage":"https://github.com/Xiphe/express-dropbox-oauth","scripts":{"test":"mocha --compilers coffee:coffee-script/register -R spec","watch":"mocha --compilers coffee:coffee-script/register --watch -R spec","coverage":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover node_modules/.bin/_mocha --report html -- -R spec -t 3000 -s 2000 && npm run clean","clean":"find src -iname '*.js' -delete && find test -iname '*.js' -delete","coveralls":"coffee -o src/ src/ && coffee -o test/ test/ && istanbul cover _mocha --report lcovonly -- -R spec -t 3000 -s 2000 && cat ./coverage/lcov.info | coveralls","prepublish":"rm -rf lib && coffee -o lib/ src/","postinstall":"cd ./node_modules/dropbox && npm install"},"main":"lib/index.js","dependencies":{"dropbox":"dropbox/dropbox-js#dece3d13d49d89ea125f3bdc21a3ddcd56388807"},"devDependencies":{"coffee-script":"~1.7.1","express":"~4.4.3","nedb":"~0.10.5","mocha":"~1.20.1","sinon":"~1.10.2","chai":"~1.9.1","sinon-chai":"~2.5.0","supertest":"~0.13.0","minimist":"~1.1.0","istanbul":"~0.2.8","coveralls":"~2.10.0","idkeyvalue":"0.0.1"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"_id":"express-dropbox-oauth@0.0.7","dist":{"shasum":"8972a09ce5bf495c8a5edac12dd9c2986bb1a74b","tarball":"https://registry.npmjs.org/express-dropbox-oauth/-/express-dropbox-oauth-0.0.7.tgz","integrity":"sha512-kVhUj7Nvf+UOTy1hxBUwFVAxIG3dnPZqhJw7ckGxat4lIt7ohVnW6Fwen+D7BwIMoFkmhTWfK5Rv2YuCRYAejw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEjds3TpejBnCDLycSOUKK9qdXy7BXdROMR1UBidtQrwIhAO9biLk8Qg2G611aMv8Iu3MKh7xXbd+yUs3Dj/jQISA0"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"xiphe","email":"hannes.diercks@jimdo.com"},"maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}]}},"readme":"express-dropbox-oauth\n=====================\n\n[![Build Status](https://travis-ci.org/Xiphe/express-dropbox-oauth.svg)](https://travis-ci.org/Xiphe/express-dropbox-oauth)\n[![Coverage Status](https://coveralls.io/repos/Xiphe/express-dropbox-oauth/badge.png?branch=master)](https://coveralls.io/r/Xiphe/express-dropbox-oauth?branch=master)\n[![Dependency Status](https://david-dm.org/Xiphe/express-dropbox-oauth.svg)](https://david-dm.org/Xiphe/express-dropbox-oauth)\n\nDropbox OAuth Middleware for [express](http://expressjs.com/)\n\n  - [Install](#install)\n  - [Dropbox App](#dropbox-app)\n  - [Init](#init)\n  - [Use](#use)\n  - [Database](#database)\n  - [Database Adapters](#database-adapters)\n  - [Example InMemory Database](#example-inmemory-database)\n  - [Example App](#example-app)\n  - [License](#license)\n\n\n\nInstall\n-------\n\n```sh\nnpm install express-dropbox-oauth --save\n```\n\n\n\nDropbox App\n-----------\n\nCreate and Manage your Dropbox App here: [Dropbox App Console](https://www.dropbox.com/developers/apps).\n\n\n\nInit\n----\n\n```js\n// var app = [initiate app...]\n// var database = [initiate database...] see Database\n\nvar ExpressDropboxOAuth = require('express-dropbox-oauth');\nvar credentials = {\n  key: 'myAppKey',\n  secret: 'myAppSecret'\n};\nvar expressDropboxAuth = new ExpressDropboxOAuth(credentials, database);\n```\n\n\n\nUse\n---\n\nSee [Example App](#example-app)\n\n\n### Authenticate\n\nTry to create Auth-Token in Database.\n\n```js\nfunction errorRoute(err, req, res, next) {\n  res.send('Authentication failed with error: ' + err);\n}\napp.get('/authenticate', expressDropboxAuth.doAuth(errorRoute), function(req, res) {\n  res.send('Authentication succeeded!');\n});\n```\n\n### Check Auth\n\nCheck if Auth-Token exists and is working.\n\n```js\nfunction errorRoute(err, req, res, next) {\n  res.send('Restricted Area!');\n}\napp.get('/onlyAuthenticated', expressDropboxAuth.checkAuth(errorRoute), function(req, res) {\n  res.send('Hey Mate!');\n});\n```\n\n### Log Out\n\nRemove Auth-Token from Database and reset client.\n\n```js\nfunction errorRoute(err, req, res, next) {\n  res.send('Logout failed, please retry.');\n}\napp.get('/logout', expressDropboxAuth.logout(errorRoute), function(req, res) {\n  res.send('Bye...');\n});\n```\n\n### Dropbox Client\n\nUse [dropbox-js](https://github.com/dropbox/dropbox-js) for something fancy.\n\n```js\napp.get('/profile', expressDropboxAuth.checkAuth(), function(req, res) {\n  expressDropboxAuth.dropboxClient.getUserInfo(function(err, user) {\n    res.send('Hello ' + user.name);\n  });\n});\n```\n\n\n\nDatabase\n--------\n\nWe can use any Database adapter from [idkeyvalue](https://github.com/Xiphe/idkeyvalue).\n\nFor example [NeDB](https://github.com/louischatriot/nedb)\n\n```js\n// var userId = [initiate userId if needed. Leave empty for single user stuff]\nvar Datastore = require('nedb');\nvar NedbAdapter = require('idkeyvalue').NedbAdapter\n\n// See nedb documentation for In-Memory databases etc.\nvar database = new Datastore(filename: 'myDatabase.nedb', autoload: true);\nvar databaseAdapter = new NedbAdapter(database, userId);\nvar expressDropboxAuth = new ExpressDropboxAuth(credentials, databaseAdapter);\n\n// Do crazy stuff now! (see Use)\n```\n\n\n\nExample App\n-----------\n\nRun `coffee scripts/example.coffee --appKey=myAppKey --appSecret=myAppSecret`\n\nThis starts up an example server [http://localhost:3000]() with an in-memory database.\n\nOptions:\n\n```\n  --appKey        Required: The Key of our App\n  --appSecret     Required: The Secret of our App\n  --databaseFile  Use (and create) the given database file instead of just memory\n  --userId        Fake another user (requires --databaseFile)\n  --port          Use another port (Default: 3000)\n```\n\n\n\nLicense\n-------\n\n> The MIT License\n> \n> Copyright (c) 2014 Hannes Diercks\n> \n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n> \n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n> \n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n","maintainers":[{"name":"xiphe","email":"hannes.diercks@jimdo.com"}],"time":{"modified":"2022-06-17T22:15:37.014Z","created":"2014-08-23T01:48:26.113Z","0.0.1":"2014-08-23T01:48:28.516Z","0.0.2":"2014-08-23T20:48:42.411Z","0.0.3":"2014-08-23T20:56:17.241Z","0.0.4":"2014-08-25T21:24:42.724Z","0.0.5":"2014-08-29T15:09:47.907Z","0.0.6":"2014-08-31T21:42:40.893Z","0.0.7":"2014-08-31T21:48:22.310Z"},"readmeFilename":"README.md","homepage":"https://github.com/Xiphe/express-dropbox-oauth","keywords":["express","oauth","dropbox"],"repository":{"type":"git","url":"https://github.com/Xiphe/express-dropbox-oauth.git"},"author":{"name":"Hannes Diercks","email":"express-dropbox-oauth@xiphe.net"},"bugs":{"url":"https://github.com/Xiphe/express-dropbox-oauth/issues"},"license":"MIT"}