{"id":22096535,"url":"https://github.com/uphold/koa-instance-digest","last_synced_at":"2025-10-06T14:48:29.573Z","repository":{"id":40633461,"uuid":"103548255","full_name":"uphold/koa-instance-digest","owner":"uphold","description":"A middleware to verify HTTP digest headers as described in RFC-3230","archived":false,"fork":false,"pushed_at":"2023-04-19T03:59:19.000Z","size":340,"stargazers_count":0,"open_issues_count":8,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-01-29T07:30:44.316Z","etag":null,"topics":["digest","headers","http","koajs","rfc-3230"],"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/uphold.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-09-14T15:17:25.000Z","updated_at":"2019-10-04T17:16:15.000Z","dependencies_parsed_at":"2025-01-29T07:40:02.751Z","dependency_job_id":null,"html_url":"https://github.com/uphold/koa-instance-digest","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fkoa-instance-digest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fkoa-instance-digest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fkoa-instance-digest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fkoa-instance-digest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/koa-instance-digest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191639,"owners_count":20575248,"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":["digest","headers","http","koajs","rfc-3230"],"created_at":"2024-12-01T04:11:31.592Z","updated_at":"2025-10-06T14:48:24.522Z","avatar_url":"https://github.com/uphold.png","language":"JavaScript","readme":"# koa-instance-digest\nA middleware to handle verification of HTTP digest headers as described in [RFC-3230](https://tools.ietf.org/html/rfc3230) \"Instance Digests in HTTP\".\n\nNote that, as per the _RFC_, this module provides:\n\n  - Digest coverage for entire instances communicated via HTTP.\n  - Support for multiple digest algorithms.\n  - Negotiation of the use of digests.\n\nHowever, it does _NOT_ provide:\n\n  - header integrity\n  - authentication\n  - privacy\n  - authorization\n\n## Status\n\n[![npm version][npm-image]][npm-url] [![build status][travis-image]][travis-url]\n\n## Installation\n\nInstall the package via `yarn`:\n\n```sh\n❯ yarn add koa-instance-digest\n```\n\nor via `npm`:\n\n```sh\n❯ npm install koa-instance-digest --save\n```\n\n### Available algorithms\n\nThe following algorithms are available: `md5`, `sha`, `sha-256`, `sha-512`.\n\n### Configuration\n\nThe middleware can be configured with the following parameters:\n\n- `algorithms`: List of supported algorithms (all by default).\n- `required`: Whether to set a digest header as mandatory (`false` by default).\n\nYou can change the defaults by doing:\n\n```javascript\nmiddleware({\n  algorithms: ['sha-256'],\n  required: true\n});\n```\n\n## Usage\n\n```javascript\nconst { middleware } = require('koa-instance-digest');\nconst Koa = require('koa');\n\nconst app = new Koa();\n\napp.post('/', middleware(), async ctx =\u003e {\n  // Your code here ...\n});\n\napp.listen(3000);\n```\n\n### Request\n\nThe `Digest` header can be provided as follows:\n\n```javascript\n'Digest: \u003calgorithm\u003e=\u003cvalue\u003e'\n```\n\n### Response\n\nIf the header is missing the following header will be added to the response:\n\n```javascript\n'Want-Digest: \u003clist-of-accepted-algorithms\u003e'\n```\n\n## Tests\n\n```sh\n❯ yarn test\n```\n\n## Release\n\n```sh\n❯ npm version [\u003cnew version\u003e | major | minor | patch] -m \"Release %s\"\n```\n\n[npm-image]: https://img.shields.io/npm/v/koa-instance-digest.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/koa-instance-digest\n[travis-image]: https://img.shields.io/travis/uphold/koa-instance-digest.svg?style=flat-square\n[travis-url]: https://travis-ci.org/uphold/koa-instance-digest\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fkoa-instance-digest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fkoa-instance-digest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fkoa-instance-digest/lists"}