{"_id":"@bukalapak/express-bearer-token","_rev":"8-e9bd9e52e2e8a9f76cfe604a37762d95","name":"@bukalapak/express-bearer-token","description":"Bearer token middleware for express.","dist-tags":{"latest":"3.0.1"},"versions":{"3.0.0":{"name":"@bukalapak/express-bearer-token","description":"Bearer token middleware for express.","version":"3.0.0","homepage":"https://github.com/bukalapak/express-bearer-token","authors":["Tyler Kellen <tyler@sleekcode.net>","Alif Rachmawadi <subosito@bukalapak.com>"],"repository":{"type":"git","url":"git://github.com/bukalapak/express-bearer-token.git"},"bugs":{"url":"https://github.com/bukalapak/express-bearer-token/issues"},"licenses":[{"type":"MIT","url":"https://github.com/bukalapak/express-bearer-token/blob/master/LICENSE"}],"main":"index.js","engines":{"node":">= 0.10.0"},"scripts":{"test":"mocha -R spec test"},"devDependencies":{"chai":"1.9.1","mocha":"1.18.2"},"keywords":["bearer token","bearer token middleware","express token","authorization bearer"],"gitHead":"bb154990a4b018fe07660cd785312416070a1453","_id":"@bukalapak/express-bearer-token@3.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"subosito","email":"subosito@gmail.com"},"dist":{"integrity":"sha512-qSbUPqjOUfWoiRm8TP6StH4BH1tTOGUqNZOKm2m9TPx5dVtVAjrgrVwFcn5pUfHyAHlr1j4qGADVoAMBqbJmlA==","shasum":"fb83cec81e3d98c95792e2b1d3dcef95f75d9f5e","tarball":"https://registry.npmjs.org/@bukalapak/express-bearer-token/-/express-bearer-token-3.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDO7VnZGcGJxpIhLnug4Bhn7OTlDAVKzcQ/epZGpNKgAiAcfcIChhAVecDJFcT61ZOSV8UlWE0R/4S59uePg9LFMQ=="}]},"maintainers":[{"name":"subosito","email":"subosito@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-bearer-token-3.0.0.tgz_1508916551595_0.5191500980872661"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.0.1":{"name":"@bukalapak/express-bearer-token","description":"Bearer token middleware for express.","version":"3.0.1","homepage":"https://github.com/bukalapak/express-bearer-token","authors":["Tyler Kellen <tyler@sleekcode.net>","Alif Rachmawadi <subosito@bukalapak.com>"],"repository":{"type":"git","url":"git://github.com/bukalapak/express-bearer-token.git"},"bugs":{"url":"https://github.com/bukalapak/express-bearer-token/issues"},"licenses":[{"type":"MIT","url":"https://github.com/bukalapak/express-bearer-token/blob/master/LICENSE"}],"main":"index.js","engines":{"node":">= 0.10.0"},"scripts":{"test":"mocha -R spec test"},"devDependencies":{"chai":"1.9.1","mocha":"1.18.2"},"keywords":["bearer token","bearer token middleware","express token","authorization bearer"],"gitHead":"8a661129dfaada1d9c9e5eaefbd7ba144b40f95a","_id":"@bukalapak/express-bearer-token@3.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"subosito","email":"subosito@gmail.com"},"dist":{"integrity":"sha512-9aOn20DrqsL9bljSXCx+eG1YQXTSuQ+AkM61eCUzu/9iRo7tXOliDvgwVwQu4XeK3m+JgFwWv/VmKcRR6TVZkg==","shasum":"ab89f680bf434b2e2fd5f5c4ba8b5b11307b7f93","tarball":"https://registry.npmjs.org/@bukalapak/express-bearer-token/-/express-bearer-token-3.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmoD+aiA1JuDcg3wRd/mhrmI3+2PKJ+xv9DgvtwnW0/AiAca9/tV5CCLPbH9FzjtDJltiLwuyuIvklqb5GAPw32oQ=="}]},"maintainers":[{"name":"subosito","email":"subosito@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-bearer-token-3.0.1.tgz_1508917226446_0.21907642483711243"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# express-bearer-token\n[![Build Status](https://travis-ci.org/bukalapak/express-bearer-token.svg?branch=master)](https://travis-ci.org/bukalapak/express-bearer-token)\n\n> Bearer token middleware for express.\n\n[![NPM](https://nodei.co/npm/@bukalapak/express-bearer-token.png)](https://nodei.co/npm/@bukalapak/express-bearer-token/)\n\n## What?\n\nPer [RFC6750] this module will attempt to extract a bearer token from a request from these locations:\n\n* The key `access_token` in the request body.\n* The key `access_token` in the request params.\n* The value from the header `Authorization: Bearer <token>`. The header key is case insensitive.\n\nIf a token is found, it will be stored on `req.token`.  If one has been provided in more than one location, this will abort the request immediately by sending code 400 (per [RFC6750]).\n\n```js\nconst express = require('express');\nconst bearerToken = require('express-bearer-token');\nconst app = express();\n\napp.use(bearerToken());\napp.use(function (req, res) {\n  res.send('Token '+req.token);\n});\napp.listen(8000);\n```\n\nFor APIs which are not compliant with [RFC6750], the key for the token in each location is customizable, as is the key the token is bound to on the request (default configuration shown):\n```js\napp.use(bearerToken({\n  bodyKey: 'access_token',\n  queryKey: 'access_token',\n  headerKey: 'Bearer',\n  reqKey: 'token'\n}));\n```\n\n[RFC6750]: https://xml.resource.org/html/rfc6750\n","maintainers":[{"email":"core-communication-platform@bukalapak.com","name":"bukalapak-npm"},{"email":"widatama@gmail.com","name":"widatama"},{"email":"ramadimasatria@gmail.com","name":"ramadimasatria"},{"email":"angel.lynz95@gmail.com","name":"angelynz95"}],"time":{"modified":"2022-06-09T08:58:43.510Z","created":"2017-10-25T07:29:11.685Z","3.0.0":"2017-10-25T07:29:11.685Z","3.0.1":"2017-10-25T07:40:26.590Z"},"homepage":"https://github.com/bukalapak/express-bearer-token","keywords":["bearer token","bearer token middleware","express token","authorization bearer"],"repository":{"type":"git","url":"git://github.com/bukalapak/express-bearer-token.git"},"bugs":{"url":"https://github.com/bukalapak/express-bearer-token/issues"},"readmeFilename":"README.md"}