{"_id":"badge","_rev":"20-46a7ce833cf239acd304f3d0fc48eed5","name":"badge","description":"Stateless GitHub authentication for Hapi.","dist-tags":{"latest":"1.0.3"},"versions":{"0.0.0":{"name":"badge","version":"0.0.0","description":"Stateless GitHub authentication for Hapi.","main":"lib/","scripts":{"test":"node --harmony gulpfile.js"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1"},"dependencies":{"lodash":"^2.4.1"},"_id":"badge@0.0.0","_shasum":"2ed833817c8d8487b6e43bb875bd12a153bbb6c6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"2ed833817c8d8487b6e43bb875bd12a153bbb6c6","tarball":"https://registry.npmjs.org/badge/-/badge-0.0.0.tgz","integrity":"sha512-apV75ZgHoxsdqjd5mOlr/8Gq1hNzROIz7KqHb+zUy/aVD+iXpSaSw8soVo0yGxWztDXOyFddDpbPtPOQEzSM/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2JPAeuCFlMH2lJNSye3+yx5L+3cFC9M8XwDgVtLIc+gIhAMVO+s0bIP6nOp6/NvVU7vDY1BDHQ/Xgd42pN4ZWrcUP"}]}},"0.1.0":{"name":"badge","version":"0.1.0","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"_id":"badge@0.1.0","dist":{"shasum":"1a7e061959dccb75e737f22e45231643748f4747","tarball":"https://registry.npmjs.org/badge/-/badge-0.1.0.tgz","integrity":"sha512-eitgzTRtfVCcLUDxMzB9I0MiHOoc/SdSI07zSjwBXkR4yWrN0RvZPNwcJaUn0iHMUJ98ScQ8+xKr5559qRT3Gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnSXvb3Pp8IESQblrKd/MKmvK4wMEfMdZO4dZGeRqMnAiEA+ReIotOLUkXYF6Ts47BZIOlmGQPk+iKFqYxmxubymY0="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}]},"0.1.1":{"name":"badge","version":"0.1.1","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"gitHead":"a01666551fec9f8dbcb20d2e83396db2e4365ac5","_id":"badge@0.1.1","_shasum":"4c6e2e5d033d577882f71a7fe0ca8d2f186b172d","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"4c6e2e5d033d577882f71a7fe0ca8d2f186b172d","tarball":"https://registry.npmjs.org/badge/-/badge-0.1.1.tgz","integrity":"sha512-iHpaZeG+hDdkpsRRZ/EuaJT5bbbwB+KFVXdbytelqLtd5ylU1+0pwqDlmkYdahkch8hMOc8RlH0dVFz1XXj2sQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKRZGG5peAHLacwAuV1mWyxvvaHWxaCKebkJKa3kWb+QIgGbgfJh1bpafRgp/M1BYT2sP6DIJynn8qHwexdRGr6Io="}]}},"0.2.0":{"name":"badge","version":"0.2.0","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"_id":"badge@0.2.0","_shasum":"f49d345241a437c9ede7c9c6127869646afa8c83","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"f49d345241a437c9ede7c9c6127869646afa8c83","tarball":"https://registry.npmjs.org/badge/-/badge-0.2.0.tgz","integrity":"sha512-HilplEuUCRBuc5wDx616qJBnzYddHjYuZGxs9dzAiaFLs5MMtZOLO/dZzqaTvtDACH7oJQY0mdMWnmgyP5x7pg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCp5S9O2RYQJOqNEiR5pKWj3xMxH8Y9CS4EzU84J7wNowIgesMY7v3y13e5bGgZ9LwfcFcYOSAie7gnqkJhLAx0dQw="}]}},"0.2.1":{"name":"badge","version":"0.2.1","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"gitHead":"0a3e9677636ae723b4eb586cf2da8a3d5518c59f","_id":"badge@0.2.1","_shasum":"af62d9d376d1a5fafaaf045608d1a1ef661f50ef","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"af62d9d376d1a5fafaaf045608d1a1ef661f50ef","tarball":"https://registry.npmjs.org/badge/-/badge-0.2.1.tgz","integrity":"sha512-j3g0/dhU1tsRnPMHgWQxE+0/T5o+0XMXs8wtLkUujLwF86a0QOLaXdH/tNja2StKSlZjQDvXG9S73HNrJ1JKRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7aYaFO/OHnH3uRUuTXInb7G/1YjET9QzcPPJLl/0TXAIhALfd4MnzJKgvaIR2piGVGQ9nt06ymYzNXWVR2/MY9FEd"}]}},"1.0.0":{"name":"badge","version":"1.0.0","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","joi":"^4.6.2","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"gitHead":"c8229e5fa8d612fa4994d8702693c6a250ed3ede","_id":"badge@1.0.0","_shasum":"b79045092c5d1df7e5ded5103ca50a9581235c36","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"b79045092c5d1df7e5ded5103ca50a9581235c36","tarball":"https://registry.npmjs.org/badge/-/badge-1.0.0.tgz","integrity":"sha512-306hoHDoI+fDbsUSHcedU0Hd9wu2kZ3IjCh4xlsbfrNtg1ql8gzZb4ly4PfYLoUDw3zAS1wOz8+XDOxC+52kNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPiKf45KE0v4+ZABHCbO7XOwOL9F6zaBDeL9ZkJ+4AxQIhAL5uQiwf5TLypZOtXU/eh+2QFMqqi6C48rQbyWMNhk3i"}]}},"1.0.1":{"name":"badge","version":"1.0.1","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","joi":"^4.6.2","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"gitHead":"196e0f1db8b1de15de40ec49248a52b221eef8bb","_id":"badge@1.0.1","_shasum":"b20346e2300266b89fc504e8e583233f59617342","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"b20346e2300266b89fc504e8e583233f59617342","tarball":"https://registry.npmjs.org/badge/-/badge-1.0.1.tgz","integrity":"sha512-QqHkjPTc5ILXvqTqWAekhOZBXsSiOXO+w7Ld+iQ1XJj2kIUkB25HmN9fMohWG2+wL40+KjxoaZ5iYdGa92/N/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3HvISKnSvzcf+gQbsU9ULh1cXiSWAuzaaWRFwF5x/kAIhANKTiuUOREDbzruiYBcWLZDVSCPkXQqpacetY5NPpxLL"}]}},"1.0.2":{"name":"badge","version":"1.0.2","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","joi":"^4.6.2","lodash":"^2.4.1","nipple":"^2.5.3","q":"^1.0.1"},"gitHead":"974a97563a4f17eebf22f319cd93069783912b6d","_id":"badge@1.0.2","_shasum":"5e2a91ed3db454449603678cfffe4c68d7799963","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"5e2a91ed3db454449603678cfffe4c68d7799963","tarball":"https://registry.npmjs.org/badge/-/badge-1.0.2.tgz","integrity":"sha512-8560hTOu1J7d6IOjff7HQryB7z8iDnq4rvV+M2jYN58+upeEnvxVEGmNj8Z3vXuhTAbWjaqS2PLzoUw51v3lIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5kSim8ojlx/m7Feahr/d5tFM62jO22Pyln4LANO4D9AiEA9PxiVcNYlWuSNXK4O0KXz8VAIM+xsYkrj9DdK5nBV+k="}]}},"1.0.3":{"name":"badge","version":"1.0.3","description":"Stateless GitHub authentication for Hapi.","main":"lib/github","scripts":{"coverage":"gulp coverage && xdg-open coverage.html || open coverage.html","test":"gulp"},"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"keywords":["hapi","github","auth"],"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jagoda/badge/issues"},"homepage":"https://github.com/jagoda/badge","devDependencies":{"gulp":"^3.8.6","gulp-jshint":"^1.7.1","gulp-lab":"0.0.10","jshint-stylish":"^0.4.0","lab":"^3.2.1","nock":"^0.42.2","sinon":"^1.10.3"},"dependencies":{"hapi":"^6.2.1","joi":"^4.6.2","lodash":"^2.4.1","lru-cache":"^2.5.0","nipple":"^2.5.3","q":"^1.0.1"},"_id":"badge@1.0.3","_shasum":"51942b5f9cb1712d3625884b69107e246e0638c5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"},"maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"dist":{"shasum":"51942b5f9cb1712d3625884b69107e246e0638c5","tarball":"https://registry.npmjs.org/badge/-/badge-1.0.3.tgz","integrity":"sha512-H6CzqjabGrVbjiOl2nuk9NNj6q3M+thSXdXoOYC89zYk37l2HohoG7Gs0ex+A1+EIvuvEszmHqiKNfswKo8ydw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHPcnS7fD4Vtb2zBerxUyJAnFBR7COMqApppCEXaaRaoAiEApFFxL/rRiaWVsyRSCKnthAkofJP/hMcHSLGIXp1/GeY="}]}}},"readme":"badge\n=====\n\n[![Build Status](https://travis-ci.org/jagoda/badge.svg?branch=master)](https://travis-ci.org/jagoda/badge)\n\n> Stateless GitHub auth for [Hapi][hapi].\n\n## Overview\n\nThis plugin provides two authentication schemes for [Hapi][hapi]: `github-basic`\nand `github-token`. The basic scheme accepts GitHub usernames and passwords\nas HTTP Basic Auth credentials. The token scheme accepts GitHub application\ntokens via headers of the form `Authorization: token <token>`. The basic scheme\nis also capable of generating access tokens if configured with a client ID and\nsecret. Similarly, the token scheme is capable of verifying that a token owner\nbelongs to a specified organization.\n\n## Basic Auth\n\n### Pass Through Mode\n\nBy default, the basic auth scheme will pass the `Authentication` header through\nto GitHub and add the authenticated `username` to the `credentials` object if\naccepted.\n\n\tserver.auth.strategy(\"basic\", \"github-basic\");\n\n### Token Generation\n\nIf the basic scheme is configured with a client ID and secret, then a valid\nlogin attempt will generate a new token that is added to the `artifacts` object\nreturned by [Hapi][hapi].\n\n\tserver.auth.strategy(\"generate-token\", \"github-basic\", {\n\t\tapplication : {\n\t\t\tclientId     : <client ID>,\n\t\t\tclientSecret : <client secret>,\n\t\t\tnote         : <a description>,\n\t\t\tscopes       : <desired scopes>,\n\t\t\turl          : <a note URL>\n\t\t}\n\t});\n\n### Organization Membership\n\nIf the basic scheme is configured with an organization name, then authenticated\nusers will be required to be a member of the specified organization. When\ngenerating tokens, the token will only be requested if the user has been\nauthenticated and also belongs to the specified organization.\n\n\tserver.auth.strategy(\"basic-org\", \"github-basic\", {\n\t\torganization : <org name>\n\t});\n\n## Token Auth\n\n### Simple Validation\n\nBy default, the token scheme will simply verify that the supplied token is\nvalid.\n\n\tserver.auth.strategy(\"token\", \"github-token\", {\n\t\tclientId     : <client ID>,\n\t\tclientSecret : <client secret>\n\t});\n\n### Organization Membership\n\nIf the token scheme is configured with an organization name, then any valid\ntokens will also be required to be authorized with the specified organization.\n\n\tserver.auth.strategy(\"token-org\", \"github-token\", {\n\t\tclientId     : <client ID>,\n\t\tclientSecret : <client secret>,\n\t\torganization : <org name>\n\t});\n\n## Realms\n\nBoth authentication methods are capable of including a realm with the\nauthentication challenge. To include a realm, simply supply a realm as part of\nthe strategy configuration:\n\n\tserver.auth.strategy(\"realm\", \"github-basic\", {\n\t\trealm : <realm>\n\t});\n\n[Hapi]: https://github.com/spumko/hapi \"Hapi\"\n","maintainers":[{"name":"jagoda","email":"jeffrey.jagoda@gmail.com"}],"time":{"modified":"2022-06-13T04:12:51.920Z","created":"2014-07-24T15:59:18.123Z","0.0.0":"2014-07-24T15:59:18.123Z","0.1.0":"2014-07-28T18:52:24.070Z","0.1.1":"2014-08-04T19:29:46.034Z","0.2.0":"2014-08-05T20:22:17.480Z","0.2.1":"2014-08-06T14:21:06.225Z","1.0.0":"2014-08-06T15:31:55.424Z","1.0.1":"2014-08-06T16:41:42.310Z","1.0.2":"2014-08-06T17:08:17.523Z","1.0.3":"2014-08-07T14:39:24.856Z"},"homepage":"https://github.com/jagoda/badge","keywords":["hapi","github","auth"],"repository":{"type":"git","url":"https://github.com/jagoda/badge"},"author":{"name":"Jeff Jagoda","email":"jeffrey.jagoda@gmail.com"},"bugs":{"url":"https://github.com/jagoda/badge/issues"},"license":"MIT","readmeFilename":"README.md"}