{"id":18728846,"url":"https://github.com/rubyonworld/http-signatures-ruby","last_synced_at":"2025-07-17T22:36:25.463Z","repository":{"id":174007938,"uuid":"542157549","full_name":"RubyOnWorld/http-signatures-ruby","owner":"RubyOnWorld","description":"Ruby implementation of HTTP Signatures draft specification; cryptographically sign and verify HTTP requests and responses.","archived":false,"fork":false,"pushed_at":"2022-09-27T17:38:08.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T04:09:38.881Z","etag":null,"topics":["http","signature"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-09-27T15:28:05.000Z","updated_at":"2022-09-27T17:48:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7596f04-4557-4dc4-bb44-3bb90be41ff7","html_url":"https://github.com/RubyOnWorld/http-signatures-ruby","commit_stats":null,"previous_names":["rubyonworld/http-signatures-ruby"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/http-signatures-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhttp-signatures-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhttp-signatures-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhttp-signatures-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhttp-signatures-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/http-signatures-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhttp-signatures-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265672372,"owners_count":23808845,"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":["http","signature"],"created_at":"2024-11-07T14:24:31.459Z","updated_at":"2025-07-17T22:36:25.442Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","readme":"# HTTP Signatures\n\nRuby implementation of [HTTP Signatures][draft03] draft specification;\ncryptographically sign and verify HTTP requests and responses.\n\nSee also:\n\n* https://github.com/99designs/http-signatures-php\n\n\n## Usage\n\nAdd [`http_signatures`][gem] to your `Gemfile`.\n\nConfigure a context with your algorithm, keys, headers to sign. In Rails,\nthis is best placed in an initializer.\n\n```rb\nrequire \"http_signatures\"\n\n$context = HttpSignatures::Context.new(\n  keys: {\"examplekey\" =\u003e \"secret-key-here\"},\n  algorithm: \"hmac-sha256\",\n  headers: [\"(request-target)\", \"Date\", \"Content-Length\"],\n)\n```\n\nIf there's only one key in the `keys` hash, that will be used for signing.\nOtherwise, specify one via `signing_key_id: \"examplekey\"`.\n\n### Messages\n\nA message is an HTTP request or response. A subset of the interface of\nRuby's Net::HTTPRequest and Net::HTTPResponse is expected; the ability to\nset/read headers via `message[\"name\"]`, and for requests, the presence\nof `message#method` and `message#path` for `(request-target)` support.\n\n```rb\nrequire \"net/http\"\nrequire \"time\"\n\nmessage = Net::HTTP::Get.new(\n  \"/path?query=123\",\n  \"Date\" =\u003e Time.now.rfc822,\n  \"Content-Length\" =\u003e \"0\",\n)\n```\n\n### Signing a message\n\n```rb\n$context.signer.sign(message)\n```\n\nNow `message` contains the signature headers:\n\n```rb\nmessage[\"Signature\"]\n# keyId=\"examplekey\",algorithm=\"hmac-sha256\",headers=\"...\",signature=\"...\"\n\nmessage[\"Authorization\"]\n# Signature keyId=\"examplekey\",algorithm=\"hmac-sha256\",headers=\"...\",signature=\"...\"\n```\n\n### Verifying a signed message\n\n```rb\n$context.verifier.valid?(message)  # =\u003e true or false\n```\n\n\n## Contributing\n\nPull Requests are welcome.\n\n\n[draft03]: http://tools.ietf.org/html/draft-cavage-http-signatures-03\n[gem]: http://rubygems.org/gems/http_signatures\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fhttp-signatures-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fhttp-signatures-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fhttp-signatures-ruby/lists"}