{"_id":"nqm-restify-oauth","_rev":"29-8c2f62e1bcbb7fee639fb6663b7a7186","name":"nqm-restify-oauth","dist-tags":{"latest":"0.5.22"},"versions":{"0.1.0":{"name":"nqm-restify-oauth","version":"0.1.0","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.0","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"homepage":"https://github.com/nqminds/nqm-restify-oauth#readme","bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"1a9be73cdd014b52a14c4a0ba703f2d2d9ad13e1","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.0.tgz","integrity":"sha512-FOx/KOIWW83VDIcrDH2z1cSQzwqt97YrQljfDJGB4fQaQTS4xbdMyn3FGKsU/Irphckf/0IYsR5c4/QIotzyvA==","signatures":[{"sig":"MEQCIAG6+Kh144mYWMKkX9qd0o4/AqoSThZULbnMtotMdFi+AiAKYPHKx0RtcCZZcM78cL7YKUldWgk+Jh/tenIvVlr91Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"1a9be73cdd014b52a14c4a0ba703f2d2d9ad13e1","gitHead":"29c0a9c4191da8bb834d4fecc685df79b58bbcbb","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"git://github.com/nqminds/nqm-restify-oauth.git","type":"git"},"_npmVersion":"2.15.11","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"4.7.3","dependencies":{"underscore":"1.x"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.0.tgz_1494340346919_0.1627309254836291","host":"packages-18-east.internal.npmjs.com"}},"0.1.1":{"name":"nqm-restify-oauth","version":"0.1.1","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.1","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"homepage":"https://github.com/nqminds/nqm-restify-oauth#readme","bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"552472fd13b38256ceeaa2d996546f971c9cd32b","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.1.tgz","integrity":"sha512-ZrkzOrjooVvJiFW8cKYgFZwL5AIKKdFVH4pqqMEJfNFqzaw7wTCDbGjpFo81smsxa5oF/6rR+WspfeCvQPqudA==","signatures":[{"sig":"MEYCIQCXGBm2J8bt3/7AuSFoEMP2K/40GSvkIzl9do6bDSaM2AIhAPw8pNw3M6OYqqaExZxfNuuaC5Gr2I7fK+foIiqacGi7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"552472fd13b38256ceeaa2d996546f971c9cd32b","gitHead":"55b6d09cb15e641dc5b3bb694e895e1a0c56ae5f","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"git://github.com/nqminds/nqm-restify-oauth.git","type":"git"},"_npmVersion":"2.15.11","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"4.7.3","dependencies":{"underscore":"1.x"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.1.tgz_1494394345710_0.1814807285554707","host":"packages-12-west.internal.npmjs.com"}},"0.1.2":{"name":"nqm-restify-oauth","version":"0.1.2","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.2","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"5f6678f6c0b9b8b048a89329af55ba78eae87078","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.2.tgz","integrity":"sha512-h+/TxLsLVJtlP8ZSA3ZmXQ+zQlFnjAuypT18XBK9V3uj33hKSFhnsJlFj4KeVLBrec9UGNkvlLezwyrVZlggvQ==","signatures":[{"sig":"MEUCIQC+h5otJm6Fx0/sswWk/w4OC2F/hgIdzUTO/r/zjvV0tAIgMbmzpoM/xo7OiObW+m/kRJYGQwfMjWkDuO7CKqe6Jsw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"5f6678f6c0b9b8b048a89329af55ba78eae87078","gitHead":"dc8b6e9c38837c7e4e1c8b5906d1b70baf5e142e","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqminds/tree/master/core/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.2.tgz_1505849939418_0.6404697927646339","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"nqm-restify-oauth","version":"0.1.3","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.3","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"a92801c9905ae0ff14b2bcf3c6d86a56393e5f10","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.3.tgz","integrity":"sha512-BhEU/g0ii51wZhSrDuU3ra/iagJsjbotOdeGeHMekXAUe4LvzONawX5w+zcoroUCnTUL7fjD3h4GROMowmTghw==","signatures":[{"sig":"MEYCIQCePstcWJtnm1LGbauG/00llk2mysWtQqFYNBZojDotrgIhAPaQr7N2+OUcEvzA7Li2BCTDvYV+yUUVeeJkcfklSs7S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"a92801c9905ae0ff14b2bcf3c6d86a56393e5f10","gitHead":"dc8b6e9c38837c7e4e1c8b5906d1b70baf5e142e","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqminds/tree/master/core/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.3.tgz_1505924078125_0.3593301691580564","host":"s3://npm-registry-packages"}},"0.1.4":{"name":"nqm-restify-oauth","version":"0.1.4","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.4","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"72fc645093be9ec58325c2c242355c8b956bd8e6","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.4.tgz","integrity":"sha512-zAR/lqRG1bpUJK+872SP+0S0q4lQWdyYmQ6RqctVyRk20ROdG4DVc7T7HWQiknft2zByu2YaylN0M+WwWUMPCw==","signatures":[{"sig":"MEYCIQDzfMB2IVnakh6hMQ3/+iOcyXELXCwKrn8LJCi1ZjPTBQIhAICHMkUBZ96TosZGuztmUOM8MhAn/cqE0z7CHeD48b8z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"72fc645093be9ec58325c2c242355c8b956bd8e6","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqminds/tree/master/core/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.4.tgz_1505927165648_0.5399917408358306","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"nqm-restify-oauth","version":"0.1.5","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.5","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"838bce509fc21aea319c415ff5c3628633de7f62","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.5.tgz","integrity":"sha512-wLPBiB2kejuixBF89oBfn+Tpjygek3wt4pgx5SJoiJ3m0Pa10oT7/Uxj4SF7ulInDGg9K1HFo0fWZ9FJ1+2F8w==","signatures":[{"sig":"MEQCIC1tMbCPNOl3m9vxQXvVMaT1pWrBFG7C6wpV3evHdnglAiB34j2Ur65sfcq3Qir0VnqbSdzfs9xyaE5L5ayRN8UfXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"838bce509fc21aea319c415ff5c3628633de7f62","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqminds/tree/master/core/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.5.tgz_1506070827362_0.062100561102852225","host":"s3://npm-registry-packages"}},"0.1.6":{"name":"nqm-restify-oauth","version":"0.1.6","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.6","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"dab7dc24d5983b407a1bf050cf01614e8d791170","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.6.tgz","integrity":"sha512-7oFzPjEdGQ2A6DbGOvz96KgcyQY45nymoOoGVYNkaqaJghE42gOMWZbmr0lGFDwyUJZEoACyUtZk+cvvS6Bp8Q==","signatures":[{"sig":"MEUCIQDs+O+heuKLeKwDzT2/TLDGxuTeRY4WtJDmPp+lzvdljwIgcPuTcNiMhRhK1zC5LGbkMZmfEwQlXriG+pSYZPihDl4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"dab7dc24d5983b407a1bf050cf01614e8d791170","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqminds/tree/master/core/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.6.tgz_1506097603497_0.754402999067679","host":"s3://npm-registry-packages"}},"0.1.7":{"name":"nqm-restify-oauth","version":"0.1.7","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.7","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"606dcfcd997dc97c5814c4ee155e499edea31c54","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.7.tgz","integrity":"sha512-litatwsjZ41gF2w35F6UsnBDB9CUoBv6eUjJCPD9HutJJFFFXuJFvrxGnzxyfaaecYPWIaTbUFnXjwJ9yoOm2Q==","signatures":[{"sig":"MEUCIBYzpk0TbxXUrgzTTjz+YanZ0jQ6EL8Xc4i39z03mW9lAiEA3bmZADM+kERl8U2SPbnfqfJSs4Te0Vf0tViBzbdCj50=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"606dcfcd997dc97c5814c4ee155e499edea31c54","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqminds/tree/master/core/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.7.tgz_1506240013437_0.4824454241897911","host":"s3://npm-registry-packages"}},"0.1.8":{"name":"nqm-restify-oauth","version":"0.1.8","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.1.8","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"8216395864452e6f9fe75b4904d886189d0c385e","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.1.8.tgz","integrity":"sha512-p2KlYAr63GJAkORrgSKZ41a4kLDE5mpCNx/EnwaJ3GwhTBR4ZxfgcqfTokBWubUK3ueuY3QSfnZEOedngSyMIg==","signatures":[{"sig":"MEQCID5ljEB2nwp8vhneaCudh7UfszBjZLNDcLuETpbYLLDMAiBFYA6Pve5T07oMy5MqgoYkr15QcS80nts2Waxc28Q8IQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"8216395864452e6f9fe75b4904d886189d0c385e","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqm-tdx/tree/master/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.1.8.tgz_1506426853048_0.50096853566356","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"nqm-restify-oauth","version":"0.4.1","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.4.1","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"f7d7e1d9d478a75fd75610a03d75a723988ffe3e","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.4.1.tgz","integrity":"sha512-4HItGr8O9PI6+/Wt4GJspI5ytN2XbHJvtCpeym0ye5VDLgbU5YDSBHpNlP7FHT2rVWV78GzmqIsWErJO4hNqSQ==","signatures":[{"sig":"MEYCIQCd5XiD8nhvFVOqp3T/ilqimanbeFKzQcJ4CQqIGfx20QIhAKDJ814Uyju0IKa/+NPEq8efaEgGiZZjgx/qnJWtHZAz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"f7d7e1d9d478a75fd75610a03d75a723988ffe3e","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqm-tdx/tree/master/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"3.10.10","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"6.11.3","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth-0.4.1.tgz_1516101226461_0.9792473518755287","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"nqm-restify-oauth","version":"0.5.2","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.5.2","maintainers":[{"name":"nqminds","email":"nqminds@gmail.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"6550615b93526948f9dfc5dd78e816f515ca0a7c","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.5.2.tgz","fileCount":14,"integrity":"sha512-uFmg9YVFYEjJi8LuDLIn3kEO/uIRG0N6wBLTbL0zDlALl6welEjk1G7my5C/ofHMfZPk2+zRHWUL5ON5JdHGuQ==","signatures":[{"sig":"MEQCIB3fau2d+clmo1Gn5Pl+GgDthnxNN5yPJ/2ze7clECyIAiBeysu8+onDY7VEwbM5wXi8FrlbXCMiiNGuNY0AztPEow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRyfrCRA9TVsSAnZWagAAwa4P/3wBf5KCTNL7WzhJYRO7\nr8j4TLOEK7f0HBOJitTJRc7bzX4QFXBu3KbC/hyjU9hZxeja+eqyVRQwSeaa\nruqUCBaFudI/+QLeZfdXJsA6fxxzVGG2GZBb3I1Hmpswmal2rSzcjnfP2WuB\nIrQ/ZFvWRcFHqmDRE+R628/riil2/Jf4NUWKuKf9Vsk0M/pgzvmSdRMyt7jt\n4OtJVT7Aiuz4+Bl1NmrCbZqM5a2LK5PCcjxLo/dE9Jl6uWWGR/uJGT47wGtK\n/ntcBOeUfgOGLDY1ZmGrDB+e1Q/aF+35ddT93fh6HphHTQbkKB2G+NUvxy3r\nC8h26i+9Mo5OAbnHWG+WOC63gTRIcUNULiWiLSBLMNNhhzMiTbRIBpdp+FTR\nGdPYZ+E3eQs5FMDmvNuqZyM4vwYSsBQcTud1iLfXEIuR/cjfj6oG7lxn+f47\nilhZ/CDIKeN2NGm/xGzuwJLXKjQj8Z2PArwLOK0s4xBcL0u9epO2YWh7Fy57\nAbjEgKtCm71qM9RbU0lHQBGtGI3L5j+cijQM7wcubX6m+VXDBJX8klu6fYUD\nKErzDRRRXGB9kfi2rBVoRd5AKYfG/2qVXIe/TTq7BCDxJJjGAKVaFCNKXGXN\nd7bRq9sMa18vyNdat0qaIg0wcYlEkf5Zy0Qqj7yjpcIUbwTmdUCrHZ3+0jGY\ntRLb\r\n=XzYN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"185db551d0d5a1a819940f9b4deb5b0afe4ab8d5","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqm-tdx/tree/master/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.15.3+x64 (darwin)","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"10.15.3","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth_0.5.2_1564944363179_0.14776387924656254","host":"s3://npm-registry-packages"}},"0.5.22":{"name":"nqm-restify-oauth","version":"0.5.22","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","_id":"nqm-restify-oauth@0.5.22","maintainers":[{"name":"nqminds-org","email":"nqminds@gmail.com"},{"name":"iglautier","email":"ivan@nquiringminds.com"},{"name":"mereacre","email":"mereacre@gmail.com"},{"name":"antmcc","email":"anthony@nquiringminds.com"},{"name":"toby.ealden","email":"toby.ealden@gmail.com"},{"name":"aloisklink","email":"alois.klink@gmail.com"},{"name":"cbrafter","email":"craig@nquiringminds.com"},{"name":"ashleysetter","email":"ash@nquiringminds.com"}],"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"dist":{"shasum":"739f4e27496ad4077dcf9c52b6bbaea3a3dd0ce6","tarball":"https://registry.npmjs.org/nqm-restify-oauth/-/nqm-restify-oauth-0.5.22.tgz","fileCount":14,"integrity":"sha512-9DYmi5ucefDklgcG3ipYrRzP1YPSwZHpjjQ80cFOuZPum2zcAPOTuyC/kR4frAvOctLmFRNW3USc/Hp5SKTiWA==","signatures":[{"sig":"MEYCIQCCTObkVQ5bMNIQPpKVrMJiWQS8M0PXKe31jY54K83JbwIhAJer/n4ngs2pEw4jCa1rDaUZ1goJGVREFXMvy5a0qNka","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkB/tCRA9TVsSAnZWagAAP88QAJswBWCrxW53zlsnAEz3\neYjlr1lCoB2rHstsMRn7ZlLmif15shMoQlw/xEm3GRziUPcA+K2mNeZK/7Ox\nzynRLL2IXgx7ILmWPrJvc2hjvYi91WN6vr5AmBWK4Z5QPN6EOrYrfr6R2XMJ\nzTVv+GXD8DWTcvq1LJAlsA+wUrgN1pLPMbUh4eRqpRabBsVOn5wCDQcfdXMy\n5/mX3dEDX94ILmBRJCpGOkVb+iMtCNUHskZjbIz4rOgkxGVTSlMQGGt8U8BV\ndE5J8D23LOFvyxH0Ce7NXRgRUrsGg0jC8LrOXrWzltZ1nMmqahlI3XFxgntD\nGPJirbooLn9wODve9R6SNslDS4SLw1R6IDrZ3W/DJwJ+mDhlm/VFxfyyF6qh\nUeutKHTs80RPQYFHREd+Sd2RRU8xEkdjlCOhMD23U8WfJ0Xv0TYm4sn6DuAo\nYiaO997X/rPdKghDvUCcJDf1Tyr7MrUloePIq23pZOI5NHcDBI+i8SHvIZMp\n1IBhnDUH6fz9v7SXZVCY/PcCN+kNg+R/HlG+IfAiGPnfaULEP4Ne3kOxNKU2\n28XWTaqa6dTNAUCw37ZAKzeBq6fZSy5xuLrBnJQTbmwb2OhYlOb2WiHZzH+q\nw+MklM4/9wtDw418kRRt6ArjiBCSEXw5VZFZGljgwDN4aVNWgM2h5yxMx2d6\nK99J\r\n=LaF2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"lint":"jshint lib && jshint examples","test":"npm run test-ropc-unit && npm run test-cc-unit && npm run test-ropc-integration && npm run test-cc-integration && npm run test-cc-with-scopes-integration","test-cc-unit":"mocha test/cc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-ropc-unit":"mocha test/ropc-unit.coffee --reporter spec --compilers coffee:coffee-script/register","test-cc-integration":"vows test/cc-integration.coffee --spec","test-ropc-integration":"vows test/ropc-integration.coffee --spec","test-cc-with-scopes-integration":"vows test/cc-with-scopes-integration.coffee --spec"},"_npmUser":{"name":"nqminds-org","email":"nqminds@gmail.com"},"repository":{"url":"https://github.com/nqminds/nqm-tdx/tree/master/packages/nqm-restify-oauth","type":"git"},"_npmVersion":"6.14.12","description":"A simple OAuth 2 endpoint for Restify","directories":{},"_nodeVersion":"12.22.1","dependencies":{"underscore":"1.x","restify-errors":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.2.0","vows":"^0.8.1","mocha":"^2.2.5","sinon":"^1.16.1","jshint":"^2.8.0","restify":"^4.0","api-easy":"^0.4.0","sinon-chai":"^2.8.0","coffee-script":"^1.9.3"},"peerDependencies":{"restify":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nqm-restify-oauth_0.5.22_1620058092713_0.36971685739839333","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-05-09T14:32:28.397Z","modified":"2024-09-05T11:14:37.550Z","0.1.0":"2017-05-09T14:32:28.397Z","0.1.1":"2017-05-10T05:32:27.551Z","0.1.2":"2017-09-19T19:39:00.438Z","0.1.3":"2017-09-20T16:14:39.133Z","0.1.4":"2017-09-20T17:06:06.740Z","0.1.5":"2017-09-22T09:00:28.374Z","0.1.6":"2017-09-22T16:26:44.426Z","0.1.7":"2017-09-24T08:00:14.468Z","0.1.8":"2017-09-26T11:54:14.145Z","0.4.1":"2018-01-16T11:13:47.680Z","0.5.2":"2019-08-04T18:46:03.288Z","0.5.22":"2021-05-03T16:08:12.854Z"},"bugs":{"url":"http://github.com/nqminds/nqm-restify-oauth/issues"},"author":{"url":"http://domenic.me/","name":"Domenic Denicola","email":"domenic@domenicdenicola.com"},"license":"WTFPL","keywords":["restify","oauth","oauth2","rest","authorization","authentication","api"],"repository":{"url":"https://github.com/nqminds/nqm-tdx/tree/master/packages/nqm-restify-oauth","type":"git"},"description":"A simple OAuth 2 endpoint for Restify","maintainers":[{"email":"ionut@nquiringminds.com","name":"ionut_nqm"},{"email":"npm-bot@nquiringminds.com","name":"nqminds-bot"},{"email":"nqminds@gmail.com","name":"nqminds-org"},{"email":"mereacre@gmail.com","name":"mereacre"},{"email":"antmcc49@gmail.com","name":"antmcc"},{"email":"toby.ealden@gmail.com","name":"toby.ealden"},{"email":"ash@nquiringminds.com","name":"ashleysetter"}],"readme":"# OAuth 2 Endpoints for Restify\n\nThis package provides a *very simple* OAuth 2.0 endpoint for the [Restify][] framework. In particular, it implements\nthe [Client Credentials][cc] and [Resource Owner Password Credentials][ropc] flows only.\n\n## What You Get\n\nIf you provide Restify–OAuth2 with the appropriate hooks, it will:\n\n* Set up a [token endpoint][], which returns [access token responses][token-endpoint-success] or\n  [correctly-formatted error responses][token-endpoint-error].\n* For all other resources, when an access token is [sent via the `Authorization` header][send-token], it will validate\n  it:\n  * If the token fails validation, it will send [an appropriate 400 or 401 error response][token-usage-error], with a\n    [`WWW-Authenticate`][www-authenticate] header and a [`Link`][web-linking] [`rel=\"oauth2-token\"`][oauth2-token-rel]\n    header pointing to the token endpoint.\n  * Otherwise, you can use your `authenticateToken` and `grantScopes` hooks to set properties on the request object for\n    your routes to check later.\n* If no access token is sent, it ensures that `req.username` is set to `null`; furthermore, none of your hooks are\n  called, so you can be sure that no properties that they set are present.\n  * You can then check for these conditions whenever there is a resource you want to protect.\n  * If the user tries to access a protected resource, you can use Restify–OAuth2's `res.sendUnauthenticated()` to send\n    appropriate 401 errors with helpful `WWW-Authenticate` and `Link` headers, or its `res.sendUnauthorized()` to send\n    appropriate 403 errors with similar headers.\n\n## Use and Configuration\n\nTo use Restify–OAuth2, you'll need to pass it your server plus some options, including the hooks discussed below.\nRestify–OAuth2 also depends on the built-in `authorizationParser` and `bodyParser` plugins, the latter with `mapParams`\nset to `false`. So in short, it looks like this:\n\n```js\nvar restify = require(\"restify\");\nvar restifyOAuth2 = require(\"restify-oauth2\");\n\nvar server = restify.createServer({ name: \"My cool server\", version: \"1.0.0\" });\nserver.use(restify.authorizationParser());\nserver.use(restify.bodyParser({ mapParams: false }));\n\nrestifyOAuth2.cc(server, options);\n// or\nrestifyOAuth2.ropc(server, options);\n```\n\nUnfortunately, Restify–OAuth2 can't be a simple Restify plugin. It needs to install a route for the token\nendpoint, whereas plugins simply run on every request and don't modify the server's routing table.\n\n## Options\n\nThe options you pass to Restify–OAuth2 depend heavily on which of the two flows you are choosing. There are some\noptions common to both flows, but the `options.hooks` hash will vary depending on the flow. Once you provide the\nappropriate hooks, you get an OAuth 2 implementation for free.\n\n### Client Credentials Hooks\n\nThe idea behind this very simple OAuth 2 flow is that your API clients identify themselves with client IDs and secrets,\nand if those values authenticate, you grant them an access token they can use for further requests. The advantage of\nthis over simply requiring basic access authentication headers on every request is that now you can set those tokens to\nexpire, or revoke them if they fall in to the wrong hands.\n\nTo install Restify–OAuth2's client credentials flow into your infrastructure, you will need to provide it with the\nfollowing hooks in the `options.hooks` hash. You can see some [example CC hooks][] in the demo application.\n\n#### `grantClientToken({ clientId, clientSecret }, req, cb)`\n\nChecks that the API client is authorized to use your API, and has the correct secret. It should call back with a new\ntoken for that client if so, or `false` if the credentials are incorrect. It can also call back with an error if there\nwas some internal server error while validating the credentials.\n\n#### `authenticateToken(token, req, cb)`\n\nChecks that a token is valid, i.e. that it was granted in the past by `grantClientToken`. It should call back with\n`true` if so, or `false` if the token is invalid. It can also call back with an error if there was some internal\nserver error while looking up the token. If the token is valid, it is likely useful to set a property on the request\nobject indicating that so that your routes can check it later, e.g. `req.authenticated = true` or\n`req.clientId = lookupClientIdFrom(token)`.\n\n### Resource Owner Password Credentials Hooks\n\nThe idea behind this OAuth 2 flow is that your API clients will prompt the user for their username and password, and\nsend those to your API in exchange for an access token. This has some advantages over simply sending the user's\ncredentials to the server directly. For example, it obviates the need for the client to store the credentials, and\nallows expiration and revocation of tokens. However, it does imply that you trust your API clients, since they will\nhave at least one-time access to the user's credentials.\n\nTo install Restify–OAuth2's resource owner password credentials flow into your infrastructure, you will need to\nprovide it with the following hooks in the `options.hooks` hash. You can see some [example ROPC hooks][] in the demo\napplication.\n\n#### `validateClient({ clientId, clientSecret }, req, cb)`\n\nChecks that the API client is authorized to use your API, and has the correct secret. It should call back with `true`\nor `false` depending on the result of the check. It can also call back with an error if there was some internal server\nerror while doing the check.\n\n#### `grantUserToken({ clientId, clientSecret, username, password }, req, cb)`\n\nChecks that the API client is authenticating on behalf of a real user with correct credentials. It should call back\nwith a new token for that user if so, or `false` if the credentials are incorrect. It can also call back with an error\nif there was some internal server error while validating the credentials.\n\n#### `authenticateToken(token, req, cb)`\n\nChecks that a token is valid, i.e. that it was granted in the past by `grantUserToken`. It should call back with\n`true` if so, or `false` if the token is invalid. It can also call back with an error if there was some internal\nserver error while looking up the token. If the token is valid, it is likely useful to set a property on the request\nobject indicating that so that your routes can check it later, e.g. `req.authenticated = true` or\n`req.username = lookupUsernameFrom(token)`.\n\n### Scope-Granting Hook\n\nOptionally, it is possible to limit the [scope][] of the issued tokens, so that you can implement an authorization\nsystem in your application in addition to simple authentication.\n\n#### `grantScopes(credentials, scopesRequested, req, cb)`\n\nThis hook is called after the token has been granted by `authenticateToken`. In the client credentials flow,\n`credentials` will be `{ clientId, clientSecret, token }`; in the resource owner password credentials flow, it will be\n`{ clientId, clientSecret, username, password, token }`. In both cases, `scopesRequested` will be an array of the\nrequested scopes.\n\nThis hook can respond in several ways:\n\n* It can call back with `true` to grant all of the requested scopes.\n* It can call back with `false` to indicate that the requested scopes are invalid, unknown, or exceed the set of scopes\n  that should be granted to the given credentials.\n* It can call back with an array to grant a different set of scopes.\n* It can call back with an error if there was some internal server error while granting scopes.\n\nIn the cases of `false` or an internal server error, you should probably revoke the token before calling back, as the\nserver will send the user an error response, instead of a successful token grant.\n\n### Other Options\n\nThe `hooks` hash is the only required option, but the following are also available for tweaking:\n\n* `tokenEndpoint`: the location at which the token endpoint should be created. Defaults to `\"/token\"`.\n* `wwwAuthenticateRealm`: the value of the \"Realm\" challenge in the `WWW-Authenticate` header. Defaults to\n  `\"Who goes there?\"`.\n* `tokenExpirationTime`: the value returned for the `expires_in` component of the response from the token endpoint.\n  Note that this is *only* the value reported; you are responsible for keeping track of token expiration yourself and\n  calling back with `false` from `authenticateToken` when the token expires. Defaults to `Infinity`.\n\n## What Does That Look Like?\n\nOK, let's try something a bit more concrete. If you check out the [example servers][] used in the integration tests,\nyou'll see our setup. Here we'll walk you through the more complicated resource owner password credentials example,\nbut the idea for the client credentials example is very similar.\n\n## /\n\nThe initial resource, at which people enter the server.\n\n* If a valid token is supplied in the `Authorization` header, `req.username` is truthy, and the app responds with\n  links to `/public` and `/secret`.\n* If no token is supplied, the app responds with links to `/token` and `/public`.\n* If an invalid token is supplied, Restify–OAuth2 intercepts the request before it gets to the application, and sends\n  an appropriate 400 or 401 error.\n\n## /token\n\nThe token endpoint, managed entirely by Restify–OAuth2. It generates tokens for a given client ID/client\nsecret/username/password combination.\n\nThe client validation and token-generation logic is provided by the application, but none of the ceremony necessary for\nOAuth 2 conformance, error handling, etc. is present in the application code: Restify–OAuth2 takes care of all of that.\n\n## /public\n\nA public resource anyone can access.\n\n* If a valid token is supplied in the Authorization header, `req.username` contains the username, and the app uses\n  that to send a personalized response.\n* If no token is supplied, `req.username` is `null`. The app still sends a response, just without personalizing.\n* If an invalid token is supplied, Restify–OAuth2 intercepts the request before it gets to the application, and sends\n  an appropriate 400 or 401 error.\n\n## /secret\n\nA secret resource that only authenticated users can access.\n\n* If a valid token is supplied in the Authorization header, `req.username` is truthy, and the app sends the secret\n  data.\n* If no token is supplied, `req.username` is `null`, so the application uses `res.sendUnauthenticated()` to send a nice\n  401 error with `WWW-Authenticate` and `Link` headers.\n* If an invalid token is supplied, Restify–OAuth2 intercepts the request before it gets to the application, and sends\n  an appropriate 400 or 401 error.\n\n[Restify]: http://mcavage.github.com/node-restify/\n[cc]: http://tools.ietf.org/html/rfc6749#section-1.3.4\n[ropc]: http://tools.ietf.org/html/rfc6749#section-1.3.3\n[token endpoint]: http://tools.ietf.org/html/rfc6749#section-3.2\n[token-endpoint-success]: http://tools.ietf.org/html/rfc6749#section-5.1\n[token-endpoint-error]: http://tools.ietf.org/html/rfc6749#section-5.2\n[send-token]: http://tools.ietf.org/html/rfc6750#section-2.1\n[token-usage-error]: http://tools.ietf.org/html/rfc6750#section-3.1\n[oauth2-token-rel]: http://tools.ietf.org/html/draft-wmills-oauth-lrdd-07#section-3.2\n[web-linking]: http://tools.ietf.org/html/rfc5988\n[www-authenticate]: http://tools.ietf.org/html/rfc2617#section-3.2.1\n[scope]: http://tools.ietf.org/html/rfc6749#section-3.3\n[example ROPC hooks]: https://github.com/domenic/restify-oauth2/blob/master/examples/ropc/hooks.js\n[example CC hooks]: https://github.com/domenic/restify-oauth2/blob/master/examples/cc/hooks.js\n[example servers]: https://github.com/domenic/restify-oauth2/tree/master/examples\n","readmeFilename":"README.md"}