{"id":24383423,"url":"https://github.com/firstandthird/hapi-strategy-loader","last_synced_at":"2025-09-04T19:37:37.011Z","repository":{"id":57261117,"uuid":"59613956","full_name":"firstandthird/hapi-strategy-loader","owner":"firstandthird","description":"Load multiple hapi strategies from json","archived":false,"fork":false,"pushed_at":"2017-12-28T20:49:49.000Z","size":25,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-09T07:39:08.455Z","etag":null,"topics":["hapi-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firstandthird.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-24T22:52:00.000Z","updated_at":"2017-12-20T01:13:22.000Z","dependencies_parsed_at":"2022-09-13T03:24:41.340Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/hapi-strategy-loader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/firstandthird/hapi-strategy-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-strategy-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-strategy-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-strategy-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-strategy-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/hapi-strategy-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-strategy-loader/sbom","scorecard":{"id":401099,"data":{"date":"2025-08-11","repo":{"name":"github.com/firstandthird/hapi-strategy-loader","commit":"c6d909b146c17f461bdb4695e0c7cb34f06f45bc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":4,"reason":"Found 4/10 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T20:06:59.247Z","repository_id":57261117,"created_at":"2025-08-18T20:06:59.248Z","updated_at":"2025-08-18T20:06:59.248Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273663316,"owners_count":25146270,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hapi-plugin"],"created_at":"2025-01-19T10:14:26.969Z","updated_at":"2025-09-04T19:37:36.928Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hapi-strategy-loader  [![Build Status](https://travis-ci.org/firstandthird/hapi-strategy-loader.svg?branch=master)](https://travis-ci.org/firstandthird/hapi-strategy-loader)\n\n### A [Hapi server](http://hapijs.com/) plugin to configure your authentication strategies\n\n## Usage:\n\nTo use hapi-strategy-loader, you will need to have at least one [authentication strategy](http://hapijs.com/tutorials/auth) registered with your hapi server.  This example will use [hapi-auth-cookie](https://github.com/hapijs/hapi-auth-cookie) to manage session authentication.\n\n### Install\nAt the command line do:\n\n\u003e npm install hapi-strategy-loader\n\n\n### Set up your server and register an authentication strategy:\n```js\nconst Hapi = require('hapi');\nconst hapiCookie = require('hapi-auth-cookie');\n\nconst server = new Hapi.Server({ });\nserver.connection({ port: 8080 });\n// register your authentication strategies with hapi\n// don't worry about the config options yet:\nserver.register(hapiCookie, () =\u003e {\n});\n```\n\n### Register the hapi-strategy-loader plugin with config options for your strategies:\n```js\n// these are options recognized by hapi-auth-cookie:\n  const hapiCookieOptions = {\n    cookie: 'some-cookie-identifier',\n    ttl: 60 * 1000,\n    domain: 'example.com',\n  };\n  server.register({\n    register: require('hapi-strategy-loader'),\n    // pass any options to hapi-strategy-loader here:\n    options: {\n      // set verbose to true to print hapi-strategy-loader debug info:\n      verbose: true,\n      // list the strategies to load:\n      strategies: {\n        session: {\n          // the 'cookie' scheme was made available when we registered hapi-auth-cookie:\n          scheme: 'cookie',\n          mode: 'try',\n          // pass the options recognized by hapi-auth-cookie,\n          // hapi-strategy-loader does not read them\n          options: hapiCookieOptions\n        }\n      }\n    }\n  });\n```\n\n### You can now use the new auth scheme in your server's routes:\n```js\n// this route will return 401 if the user's session isn't authenticated:\n  server.route({\n    method: 'GET',\n    path: '/',\n    config: {\n      auth: 'session',\n      handler: (request, reply) =\u003e {\n        reply('hello!');\n      }\n    }\n  });\n  // you can use this route to authenticate the user's session:\n  server.route({\n    method: 'GET', path: '/login/{user}',\n    config: {\n      auth: { mode: 'try' },\n      handler: (request, reply) =\u003e {\n        // cookieAuth was provided by hapi-auth-cookie:\n        request.cookieAuth.set({ user: request.params.user });\n        return reply(request.params.user);\n      }\n    }\n  });\n```\n\n\n   See the __test/__ folder for more working examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-strategy-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fhapi-strategy-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-strategy-loader/lists"}