{"_id":"auth-header","_rev":"19-629e88e3f0d990f0a0c7ac73c276cd96","name":"auth-header","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"auth-header","version":"0.1.0","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"https://github.com/izaakschroeder/auth-header.git"},"main":"lib/header.js","scripts":{"test":"npm run lint && npm run spec && npm run coverage","spec":"NODE_PATH=lib NODE_ENV=test istanbul cover node_modules/.bin/_mocha -- -r test/helpers/chai -R spec test/spec","lint":"eslint --ignore-path .gitignore .","coverage":"istanbul check-coverage --statement 100 --branch 100 --function 100"},"dependencies":{"lodash":"^2.4.1"},"devDependencies":{"eslint":"^0.10.0","eslint-plugin-nodeca":"^1.0.3","mocha":"^2.0.1","istanbul":"^0.3.2","chai":"^1.10.0"},"gitHead":"f35c073ffedc482dfe92bcfffc9e2a43189cda56","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.1.0","_shasum":"4cb506da9b8be993d8a3b23fcccfffa3c7efe56b","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"dist":{"shasum":"4cb506da9b8be993d8a3b23fcccfffa3c7efe56b","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.1.0.tgz","integrity":"sha512-SORTMK7sGfXNO/cZDOryRHydwZC6zVNzXWif8O7F2nMn01oa3GESENtBCgb64ldkAI3QyMCpuc0tUtF6paYulQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgAkxWLMExsTCfk5dd7Re8J0gMBTRcOCfto34X3aqQNQIgeldtULJty2Y400Fxdqguej6mzAQvqapvlcDlhdtmyE0="}]},"directories":{}},"0.1.1":{"name":"auth-header","version":"0.1.1","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"https://github.com/izaakschroeder/auth-header.git"},"main":"lib/header.js","scripts":{"test":"npm run lint && npm run spec && npm run coverage","spec":"NODE_PATH=lib NODE_ENV=test istanbul cover node_modules/.bin/_mocha -- -r test/helpers/chai -R spec test/spec","lint":"eslint --ignore-path .gitignore .","coverage":"istanbul check-coverage --statement 100 --branch 100 --function 100"},"dependencies":{"lodash":"^2.4.1"},"devDependencies":{"eslint":"^0.10.0","eslint-plugin-nodeca":"^1.0.3","mocha":"^2.0.1","istanbul":"^0.3.2","chai":"^1.10.0"},"gitHead":"d7e1df1453e9d63977b4f0f0ec42f03a1a392823","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.1.1","_shasum":"1c46a41791fafa920397800b025809ec4bf87a3b","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"dist":{"shasum":"1c46a41791fafa920397800b025809ec4bf87a3b","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.1.1.tgz","integrity":"sha512-lycThxNpq1f++tv4DaJNSPH4ObSx3p7Jti6/xivCxTodG3+xdnQq/Lk501JiQwj4X2VSakLZcZjER3zewslvLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE9j4ato2Ceo+7xz7oi/gb1lzcsF14D9v847bJipmKSmAiEA0cduoppVsCQgJ41W4DT8tKK4Jr1tCq0O3LwW0Qg1KJw="}]},"directories":{}},"0.2.0":{"name":"auth-header","version":"0.2.0","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"https://github.com/izaakschroeder/auth-header.git"},"main":"lib/header.js","scripts":{"test":"npm run lint && npm run spec && npm run coverage","spec":"NODE_PATH=lib NODE_ENV=test istanbul cover node_modules/.bin/_mocha -- -r test/helpers/chai -R spec test/spec","lint":"eslint --ignore-path .gitignore .","coverage":"istanbul check-coverage --statement 100 --branch 100 --function 100"},"dependencies":{"lodash":"^2.4.1"},"devDependencies":{"eslint":"^0.10.0","eslint-plugin-nodeca":"^1.0.3","mocha":"^2.0.1","istanbul":"^0.3.2","chai":"^1.10.0"},"gitHead":"7316716d3fb5df8d9c64464d10029e4047822d7a","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.2.0","_shasum":"daf9d9c6d7da384522ec7802fac2d64cba635687","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"dist":{"shasum":"daf9d9c6d7da384522ec7802fac2d64cba635687","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.2.0.tgz","integrity":"sha512-Ebzc7yuX9SJrvBGFVqRGXMpaqN4qxY3xYPmEO9JoQOqWDbfVxcGuNkb4ubp/SEPtQ7L0foXeO+jZyZeqLJKkkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPRV5gmpmzNE/F2tKkvVTeDTzoqxTpMGkqTiEVePfPnAIhALRiVn/cx1lVEM1g0p6TDUanB7xjj8mnKWsMDL2X4MGp"}]},"directories":{}},"0.2.1":{"name":"auth-header","version":"0.2.1","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"https://github.com/izaakschroeder/auth-header.git"},"main":"lib/header.js","scripts":{"test":"npm run lint && npm run spec && npm run coverage","spec":"NODE_PATH=lib NODE_ENV=test istanbul cover node_modules/.bin/_mocha -- -r test/helpers/chai -R spec test/spec","lint":"eslint --ignore-path .gitignore .","coverage":"istanbul check-coverage --statement 100 --branch 100 --function 100"},"dependencies":{"lodash":"^2.4.1"},"devDependencies":{"eslint":"^0.10.0","eslint-plugin-nodeca":"^1.0.3","mocha":"^2.0.1","istanbul":"^0.3.2","chai":"^1.10.0"},"gitHead":"471dbee798bad772f3951534984cf30f00b1a9bb","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.2.1","_shasum":"3d4c3c940d38082f4e9055e7bd0048d949708b26","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"dist":{"shasum":"3d4c3c940d38082f4e9055e7bd0048d949708b26","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.2.1.tgz","integrity":"sha512-4ud1/MLRUbznf+OwEXu52lYOsfUtUZxr5yWCDCYzeTOhOWgP0Uk9L3Uplomp7GVUs8T5GKHxWOQSdx8HHiKahg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvKnVcvHjTYyiPveU1WF3jOIx/dV9wzBL2dB/6w5nbVQIhAOyDgzmy4nem6Mju/FAB0YdM/LiZU238zAy9DupNeEXU"}]},"directories":{}},"0.2.2":{"name":"auth-header","version":"0.2.2","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"https://github.com/izaakschroeder/auth-header.git"},"main":"lib/header.js","scripts":{"test":"npm run lint && npm run spec && npm run coverage","spec":"NODE_PATH=lib NODE_ENV=test istanbul cover node_modules/.bin/_mocha -- -r test/helpers/chai -R spec test/spec","lint":"eslint --ignore-path .gitignore .","coverage":"istanbul check-coverage --statement 100 --branch 100 --function 100"},"dependencies":{"lodash":"^2.4.1"},"devDependencies":{"eslint":"^0.10.0","eslint-plugin-nodeca":"^1.0.3","mocha":"^2.0.1","istanbul":"^0.3.2","chai":"^1.10.0"},"gitHead":"0bd0af5946bd5e7e7612aa7d78a8cdfe47851cd5","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.2.2","_shasum":"ac0e98f55a92a5c33b607041abe697bf294e6e79","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"dist":{"shasum":"ac0e98f55a92a5c33b607041abe697bf294e6e79","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.2.2.tgz","integrity":"sha512-8gmq+0lU7vYF2Bl6iOhzJ5q6YTQxJr8pqAVW1ihS90ZXRi7OYVNy0j4i0/0iBn0AnAqtbrwvDBC9Uuxbp7dr6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMOZMMAX4h0Y2VATKcWuc0gilCnOpFz1S/xOvCEsuFOwIgAlCEXAIRY2tz/9IwMN20uxbHRAHoE3RsCrGROEVePtU="}]},"directories":{}},"0.3.0":{"name":"auth-header","version":"0.3.0","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"git+https://github.com/izaakschroeder/auth-header.git"},"main":"dist/index.js","scripts":{"test":"npm run lint && npm run spec","prepublish":"babel -s -d dist src","spec":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register -r adana-dump -R spec test/spec","lint":"eslint --ignore-path .gitignore ."},"dependencies":{"babel-core":"^6.4.5"},"devDependencies":{"adana-cli":"^0.1.1","adana-dump":"^0.1.0","adana-format-lcov":"^0.1.1","babel-cli":"^6.4.5","babel-core":"^6.4.5","babel-preset-metalab":"^0.2.0","eslint":"^1.10.3","eslint-config-metalab":"^2.0.0-beta.1","eslint-plugin-filenames":"^0.2.0","eslint-plugin-import":"^0.12.1","eslint-plugin-react":"^3.16.0","mocha":"^2.3.4","chai":"^3.4.1"},"gitHead":"b0fdbab542f6195429a7b22083efc011e72f7a7a","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.3.0","_shasum":"0229166f37582c928c58700a5415bde0a847d138","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"dist":{"shasum":"0229166f37582c928c58700a5415bde0a847d138","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.3.0.tgz","integrity":"sha512-6dHkf4QuGVnnAJhB07QEuh+unmAqGssYcVuvNw7TCBDxyGcidQscKOACd0DClPmDrfcoCJRZgZ2AQHZF0P0VKg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnSZsb90qRyXPsXFDDLdi5rMp17NuuF8apO/ge2qAy+AiEA/3Y7ZyDxbbOLlahCRIXMB0wCQKe9D3v3OjWDfOXtlxU="}]},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"directories":{}},"0.3.1":{"name":"auth-header","version":"0.3.1","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"git+https://github.com/izaakschroeder/auth-header.git"},"main":"dist/index.js","scripts":{"test":"npm run lint && npm run spec","prepublish":"babel -s -d dist src","spec":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register -r adana-dump -R spec test/spec","lint":"eslint --ignore-path .gitignore ."},"dependencies":{"babel-core":"^6.4.5"},"devDependencies":{"adana-cli":"^0.1.1","adana-dump":"^0.1.0","adana-format-lcov":"^0.1.1","babel-cli":"^6.4.5","babel-core":"^6.4.5","babel-preset-metalab":"^0.2.0","eslint":"^1.10.3","eslint-config-metalab":"^2.0.0-beta.1","eslint-plugin-filenames":"^0.2.0","eslint-plugin-import":"^0.12.1","eslint-plugin-react":"^3.16.0","mocha":"^2.3.4","chai":"^3.4.1"},"gitHead":"d287f8b5fa5982f3e343b569204af79e00e9fa94","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@0.3.1","_shasum":"44007ed69644cc9eab068ec4c8c495deee64697f","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"dist":{"shasum":"44007ed69644cc9eab068ec4c8c495deee64697f","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-0.3.1.tgz","integrity":"sha512-FjiJHn5EBMVdswmpUnYzFzXBojylXZO87cyLWoa5Cdv02J2EzWRqOgIaPgihc0JD+1KxjiB4qxcF5mGuz3MVZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB/bILwoeBAMScoMMaNJRGlk3a4jB7D2TV1vLSBcDuZyAiA+MoQbQ3LL+0ZpQ3XbKXACuLWWixPQ5GmjYGcp+z2w8A=="}]},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/auth-header-0.3.1.tgz_1461346994282_0.46169076045043766"},"directories":{}},"1.0.0":{"name":"auth-header","version":"1.0.0","description":"For HTTP `Authorization` and `WWW-Authenticate` headers.","author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"keywords":["http","express","basic","auth","authorization"],"license":"CC0-1.0","homepage":"https://github.com/izaakschroeder/auth-header","repository":{"type":"git","url":"git+https://github.com/izaakschroeder/auth-header.git"},"main":"dist/index.js","files":["dist","src"],"scripts":{"clean":"rimraf dist","test":"npm run lint && npm run spec && npm run flow","prepublish":"npm run clean && ./node_modules/.bin/babel -s -d dist src","spec":"NODE_ENV=test ./node_modules/.bin/jest --coverage --runInBand=${JEST_SERIAL:-$CI}","lint":"eslint .","flow":"flow check"},"devDependencies":{"@babel/cli":"^7.0.0-beta.51","@babel/core":"^7.0.0-beta.51","@babel/preset-env":"^7.0.0-beta.51","@babel/preset-flow":"^7.0.0-beta.51","@babel/register":"^7.0.0-beta.51","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.0.1","eslint":"^4.6.0","eslint-config-metalab":"^9.0.1","flow-bin":"^0.70.0","jest":"^23.1.0","ncp":"^2.0.0","prettier":"^1.13.5","rimraf":"^2.6.1"},"gitHead":"a42d99ac570aeef574241055b4c1c9cc3bc5f822","bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"_id":"auth-header@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"},"dist":{"integrity":"sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA==","shasum":"ea24fdc5588e1eb8b750df8655a396aa48fc9076","tarball":"https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz","fileCount":14,"unpackedSize":21592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe4YQCRA9TVsSAnZWagAA6SYQAIuVhziR+6t+aU1+kJqf\nzmTy1MUWyO2GPhLJparnVOBOcJvbVzR8jPnH8BtpxmyvfES/JeBUjP6N8F+O\nZc+rsWAFti+b05+K4+hYzX/+lictMujNmUk7dmwiSASDexgAx2VvVZ1p5kkB\nNWLE8+i/mGpSFcdGzc31c7m38zHUbuJo6dseIqfxDLc/1bkjxmQxRXlIsPz6\nPCT4yJ/Vy7SlvXJTOCZCT7qWBPo4rBpnqzHK5fpDFEatuTtoK+UWA4qBwQ5W\nAwzuN1gf8v6+11awZosC1eG2KzvD7711weKz2AXaHsAxbNeQyTVHQ6yHG3/q\nCRiLpsgiXmrL64/jRIEK58/pyaq3qHh74x36trLVJbIP7NN1QIrhibkjfxX2\nE8trA5YoqIHaFPkAm2QSSKfbYCP9NNDANHXE5PA7BOcpVfMq7DpX7WRc2OCz\nxbC+qUVZ3DmaQYp5PUBTf8TXFeVBA4YjONnCxCVW1sUhNoHDVodSjTm8uwsN\nHS3Yq+e5YyL+ammOTucS5ShDtUdQQJilGp3FEAWfNQXPYYG/G/o9tXOD72iA\nMEzMXL7h8QNN+xfokXZcd6YhYsVOTvj3kaCCwz2OgaIwSJ2f+wpA4Z2x9FCN\nDM4MOUKyEvkyC1Olrr40lIX8ljFLWWxUgYRJn6lMkNO256WKVkZn2ObaQ+RJ\nmI70\r\n=EWWv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzmnC5gARKt0uX4joRHYUrmUOCRQMPHhNcEQSiRN9W+AIgW0cPn2CVFxL77pimyUGdWM3kOQf1za8ITkGuZzPlTT0="}]},"maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth-header_1.0.0_1534821903585_0.25657732615115103"},"_hasShrinkwrap":false}},"readme":"# auth-header\n\nDeal with obscene HTTP `Authorization` and `WWW-Authenticate` headers.\n\n![build status](http://img.shields.io/travis/izaakschroeder/auth-header.svg?style=flat&branch=master)\n![coverage](http://img.shields.io/coveralls/izaakschroeder/auth-header.svg?style=flat&branch=master)\n![license](http://img.shields.io/npm/l/auth-header.svg?style=flat&branch=master)\n![version](http://img.shields.io/npm/v/auth-header.svg?style=flat&branch=master)\n![downloads](http://img.shields.io/npm/dm/auth-header.svg?style=flat&branch=master)\n\n| Type          | Parse   | Format  |\n| ------------- | ------- | ------- |\n| Basic         |    ✓    |    ✓    |\n| Digest        |    ✓    |    ✓    |\n| AWS           |    ✓    |    ✓    |\n| Bearer/OAuth  |    ✓    |    ✓    |\n| [RFC7235]     |    ✓    |    ✓    |\n\n***Note***: If you're looking for an all-on-one solution to do authentication against these headers check out [express-authentication-header] which uses this library behind the scenes.\n\nThe HTTP `Authorization` and `WWW-Authenticate` family of headers are both pretty nightmareish; there has been, up until recently, no wide consensus about how they should be formatted and so parsing them is lots of fun if fun is pulling your hair out.\n\nThis library provides an implementation of [RFC7235] which allows for the parsing of many known existing authorization headers (like Basic and Digest) as well as any future ones which follow the standard. Noteably, this library is less strict than it could be to parse some of these legacy formats.\n\nIn addition to the format of the header itself being in flux, WWW-Authenticate has its own nasty surprise: sometimes multiple authentication prompts can appear in one header, sometimes they can appear in multiple headers; we _ONLY_ support the latter case since trying to disambiguate between a second prompt and parameters for the first is just about impossible.\n\n```javascript\nimport * as authorization from 'auth-header';\nimport express from 'express';\n\nconst app = express();\n\napp.get('/', function(req, res) {\n\n\t// Something messed up.\n\tfunction fail() {\n\t\tres.set('WWW-Authenticate', authorization.format('Basic'));\n\t\tres.status(401).send();\n\t}\n\n\t// Get authorization header.\n\tvar auth = authorization.parse(req.get('authorization'));\n\n\t// No basic authentication provided.\n\tif (auth.scheme !== 'Basic') {\n\t\treturn fail();\n\t}\n\n\t// Get the basic auth component.\n\tvar [un, pw] = Buffer(auth.token, 'base64').toString().split(':', 2);\n\n\t// Verify authentication.\n\tif (pw !== 'admin') {\n\t\treturn fail();\n\t}\n\n\t// We've reached the promise land.\n\tres.send('Hello world.');\n});\n```\n\n[RFC7235]: https://tools.ietf.org/html/rfc7235\n[express-authentication-header]: https://github.com/izaakschroeder/express-authentication-header\n","maintainers":[{"name":"izaakschroeder","email":"izaak.schroeder@gmail.com"}],"time":{"modified":"2022-06-13T03:46:47.244Z","created":"2014-12-02T09:51:30.220Z","0.1.0":"2014-12-02T09:51:30.220Z","0.1.1":"2014-12-15T02:23:50.122Z","0.2.0":"2015-01-06T23:59:04.089Z","0.2.1":"2015-01-07T09:09:07.467Z","0.2.2":"2015-01-08T05:21:53.708Z","0.3.0":"2016-01-30T11:19:35.629Z","0.3.1":"2016-04-22T17:43:16.613Z","1.0.0":"2018-08-21T03:25:03.714Z"},"homepage":"https://github.com/izaakschroeder/auth-header","keywords":["http","express","basic","auth","authorization"],"repository":{"type":"git","url":"git+https://github.com/izaakschroeder/auth-header.git"},"author":{"name":"Izaak Schroeder","email":"izaak.schroeder@gmail.com"},"bugs":{"url":"https://github.com/izaakschroeder/auth-header/issues"},"license":"CC0-1.0","readmeFilename":"README.md","users":{"r3nya":true,"456wyc":true,"leonardorb":true}}