{"id":21162256,"url":"https://github.com/http-auth/http-auth-passport","last_synced_at":"2025-07-09T14:32:24.758Z","repository":{"id":42933795,"uuid":"237835157","full_name":"http-auth/http-auth-passport","owner":"http-auth","description":"Passport.js integration for http-auth.","archived":false,"fork":false,"pushed_at":"2024-06-16T10:32:55.000Z","size":316,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T13:52:55.343Z","etag":null,"topics":["authentication","integrations","javascript","passport","passportjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/http-auth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-02T20:53:24.000Z","updated_at":"2023-01-27T10:11:55.000Z","dependencies_parsed_at":"2024-06-19T17:12:51.233Z","dependency_job_id":"293cfc32-6a55-4b2d-a301-2e16d316a6a5","html_url":"https://github.com/http-auth/http-auth-passport","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":0.4782608695652174,"last_synced_commit":"6a82fc39bf165849d8567cb6717b3d02d5d60dcd"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-auth%2Fhttp-auth-passport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-auth%2Fhttp-auth-passport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-auth%2Fhttp-auth-passport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-auth%2Fhttp-auth-passport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/http-auth","download_url":"https://codeload.github.com/http-auth/http-auth-passport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225563823,"owners_count":17488900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","integrations","javascript","passport","passportjs"],"created_at":"2024-11-20T13:24:16.317Z","updated_at":"2024-11-20T13:24:17.073Z","avatar_url":"https://github.com/http-auth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-auth-passport\n[Passport.js](http://www.passportjs.org/) integration with [http-auth](https://github.com/gevorg/http-auth) module.\n\n[![build](https://github.com/http-auth/http-auth-passport/workflows/build/badge.svg)](https://github.com/http-auth/http-auth-passport/actions/workflows/build.yml)\n\n## Installation\n\nVia git (or downloaded tarball):\n\n```bash\n$ git clone git://github.com/http-auth/http-auth-passport.git\n```\nVia [npm](http://npmjs.org/):\n\n```bash\n$ npm install http-auth-passport\n```    \n\n## Usage\n```javascript\n// Express module.\nconst express = require(\"express\");\n\n// Authentication module.\nconst auth = require(\"http-auth\");\nconst authPassport = require(\"http-auth-passport\");\nconst basic = auth.basic({\n  realm: \"Simon Area.\",\n  file: __dirname + \"/../data/users.htpasswd\" // gevorg:gpass, Sarah:testpass\n});\n\n// Application setup.\nconst app = express();\n\n// Passport.\nconst passport = require(\"passport\");\npassport.use(authPassport(basic));\n\n// Setup route.\napp.get(\"/\", passport.authenticate(\"http\", { session: false }), (req, res) =\u003e {\n  res.end(`Welcome to private area - ${req.user}!`);\n});\n\n// Start server.\napp.listen(1337, () =\u003e {\n  // Log URL.\n  console.log(\"Server running at http://127.0.0.1:1337/\");\n});\n```\n\n\n## Running tests\n\nIt uses [mocha](https://mochajs.org/), so just run following command in package directory:\n\n```bash\n$ npm test\n```\n\n## License\n\nThe MIT License (MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttp-auth%2Fhttp-auth-passport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttp-auth%2Fhttp-auth-passport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttp-auth%2Fhttp-auth-passport/lists"}