{"id":22096532,"url":"https://github.com/uphold/http-request-signature","last_synced_at":"2025-07-24T22:32:08.861Z","repository":{"id":24804662,"uuid":"102489034","full_name":"uphold/http-request-signature","owner":"uphold","description":"An HTTP signature parser and generator","archived":false,"fork":false,"pushed_at":"2023-07-11T01:00:33.000Z","size":1326,"stargazers_count":3,"open_issues_count":17,"forks_count":3,"subscribers_count":59,"default_branch":"master","last_synced_at":"2024-04-15T02:08:13.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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}},"created_at":"2017-09-05T14:06:40.000Z","updated_at":"2023-09-28T10:44:12.000Z","dependencies_parsed_at":"2023-01-14T01:38:29.454Z","dependency_job_id":null,"html_url":"https://github.com/uphold/http-request-signature","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fhttp-request-signature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fhttp-request-signature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fhttp-request-signature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fhttp-request-signature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/http-request-signature/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227482485,"owners_count":17779968,"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":[],"created_at":"2024-12-01T04:11:31.314Z","updated_at":"2024-12-01T04:11:31.912Z","avatar_url":"https://github.com/uphold.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-request-signature\nAn HTTP signature parser and generator fully compliant with the proposed \"Signing HTTP Messages\" [Internet Draft](https://www.ietf.org/id/draft-cavage-http-signatures-07.txt).\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 `npm`:\n\n```sh\nnpm install http-request-signature --save\n```\n\nInstall the package via `yarn`:\n\n```sh\nyarn add http-request-signature\n```\n\n## Usage\n\n### Signing an HTTP message\n\n```js\nconst { sign } = require('http-request-signature');\nconst signature = sign({\n  headers: {\n    '(request-target)': 'post /foo',\n    date: '2017-09-01T15:04:17.555Z',\n    digest: 'SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE='\n  },\n  keyId: 'primary',\n  secretKey: '96aa9ec42242a9a62196281045705196a64e12b15e9160bbb630e38385b82700e7876fd5cc3a228dad634816f4ec4b80a258b2a552467e5d26f30003211bc45d'\n}, { algorithm: 'ed25519' });\n\n// Result: `keyId=\"primary\",algorithm=\"ed25519\",headers=\"(request-target) date digest\",signature=\"MSd6OVEG4bZ/ClBSKApzqC1UbUkPclq9PyLwWv1//Br2YouqOb1T6izcOPWPY9scxWSfLHR4m6d/HThm7MX7Dw==\"`\n```\n\n### Verifying an HTTP message\n\n```js\nconst { verify } = require('http-request-signature');\nconst result = verify({\n  headers: {\n    '(request-target)': 'post /foo',\n    date: '2017-09-01T15:04:17.555Z',\n    digest: 'SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE='\n    signature: 'keyId=\"primary\",algorithm=\"ed25519\",headers=\"(request-target) date digest\",signature=\"MSd6OVEG4bZ/ClBSKApzqC1UbUkPclq9PyLwWv1//Br2YouqOb1T6izcOPWPY9scxWSfLHR4m6d/HThm7MX7Dw==\"'\n  },\n  publicKey: 'e7876fd5cc3a228dad634816f4ec4b80a258b2a552467e5d26f30003211bc45d'\n}, { algorithm: 'ed25519' });\n\n// Result:\n// {\n//   algorithm: 'ed25519',\n//   headers: ['(request-target)', 'date', 'digest'],\n//   keyId: 'primary',\n//   signature: 'MSd6OVEG4bZ/ClBSKApzqC1UbUkPclq9PyLwWv1//Br2YouqOb1T6izcOPWPY9scxWSfLHR4m6d/HThm7MX7Dw==',\n//   verified: true\n// }\n```\n\n## Supported algorithms\n\nOnly the `ed25519` algorithm is supported at this time.\n\n## Release\n\n```sh\nnpm version [\u003cnew-version\u003e | major | minor | patch] -m \"Release %s\"\n```\n\n## License\n\nMIT\n\n\n[npm-image]: https://img.shields.io/npm/v/http-request-signature.svg\n[npm-url]: https://npmjs.org/package/http-request-signature\n[travis-image]: https://travis-ci.org/uphold/http-request-signature.svg?branch=master\n[travis-url]: https://travis-ci.org/uphold/http-request-signature","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fhttp-request-signature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fhttp-request-signature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fhttp-request-signature/lists"}