{"id":36545258,"url":"https://github.com/houseagency/sessionist-middleware","last_synced_at":"2026-01-12T06:00:01.184Z","repository":{"id":57356907,"uuid":"80603081","full_name":"houseagency/sessionist-middleware","owner":"houseagency","description":"Sessionist header middleware for restify","archived":false,"fork":false,"pushed_at":"2017-05-08T08:05:13.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T02:18:18.822Z","etag":null,"topics":["authorization","restify"],"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/houseagency.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-02-01T08:52:20.000Z","updated_at":"2017-02-01T08:54:26.000Z","dependencies_parsed_at":"2022-09-26T16:32:02.682Z","dependency_job_id":null,"html_url":"https://github.com/houseagency/sessionist-middleware","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/houseagency/sessionist-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houseagency%2Fsessionist-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houseagency%2Fsessionist-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houseagency%2Fsessionist-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houseagency%2Fsessionist-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houseagency","download_url":"https://codeload.github.com/houseagency/sessionist-middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houseagency%2Fsessionist-middleware/sbom","scorecard":{"id":469698,"data":{"date":"2025-08-11","repo":{"name":"github.com/houseagency/sessionist-middleware","commit":"f2b47fe3acfe962331715158217e7915ab302204"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-19T13:32:21.321Z","repository_id":57356907,"created_at":"2025-08-19T13:32:21.321Z","updated_at":"2025-08-19T13:32:21.321Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":["authorization","restify"],"created_at":"2026-01-12T05:59:58.109Z","updated_at":"2026-01-12T06:00:01.179Z","avatar_url":"https://github.com/houseagency.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Sessionist Middleware for Restify\n\n[![Build Status](https://semaphoreci.com/api/v1/houseagency/sessionist-middleware/branches/master/shields_badge.svg)](https://semaphoreci.com/houseagency/sessionist-middleware)\n\n## How to use\n\nThis middleware is actually not one middleware, but two. The \n`parseAuthorizationMiddleware` should be used before `bodyParser`, and the\n`settleAuthorizationMiddleware` should be used after `bodyParser`.\n\n\tconst sessionistMiddleware = require('sessionist-middleware');\n\n\tconst keyfn = (keyid, callback) =\u003e {\n\t\t// This function should resolve the key id to a secret key,\n\t\t// and return it using the callback function.\n\n\t\tif (keyid == '12345678') return callback(null, 'topsecretkey');\n\t\tcallback(new Error('No such key ID.'));\n\t};\n\n\tserver.use(sessionistMiddleware.parseAuthorizationMiddleware(keyfn));\n\tserver.use(restify.bodyParser()); // Should be in between.\n\tserver.use(sessionistMiddleware.settleAuthorizationMiddleware());\n\n\t// If the header is invalid, a 401 Unauthorized will be rendered.\n\t// If the header is valid, a sessionist_keyid string will be added to\n\t// the request object.\n\nIf you don't need `bodyParser` in your app, you can skip that middleware.\nHowever, you still have to use both our two middlewares, in the proper order:\n\n\tserver.use(sessionistMiddleware.parseAuthorizationMiddleware(keyfn));\n\tserver.use(sessionistMiddleware.settleAuthorizationMiddleware());\n\n### Why two middlewares?\n\nTo verify the `Authorization:` header, we need to make a hash of the full body\npayload. To do that, we have to listen to the same data events as\n`bodyParser` is listening to. So, the `parseAuthorizationMiddleware` sets up\nthe listeners and does the hashing, and then `settleAuthorizationMiddleware`\nwill act on that hash.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhouseagency%2Fsessionist-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhouseagency%2Fsessionist-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhouseagency%2Fsessionist-middleware/lists"}