{"id":25932748,"url":"https://github.com/cosium/standard-webhooks-consumer","last_synced_at":"2025-03-04T00:39:03.725Z","repository":{"id":274335820,"uuid":"922596485","full_name":"Cosium/standard-webhooks-consumer","owner":"Cosium","description":"https://www.standardwebhooks.com/ consumer side java library","archived":false,"fork":false,"pushed_at":"2025-02-24T13:55:02.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T17:41:47.807Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Cosium.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-01-26T16:25:11.000Z","updated_at":"2025-02-24T13:54:56.000Z","dependencies_parsed_at":"2025-01-26T17:43:27.524Z","dependency_job_id":null,"html_url":"https://github.com/Cosium/standard-webhooks-consumer","commit_stats":null,"previous_names":["cosium/standard-webhooks-consumer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fstandard-webhooks-consumer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fstandard-webhooks-consumer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fstandard-webhooks-consumer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fstandard-webhooks-consumer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cosium","download_url":"https://codeload.github.com/Cosium/standard-webhooks-consumer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241763759,"owners_count":20016161,"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":"2025-03-04T00:39:02.829Z","updated_at":"2025-03-04T00:39:03.695Z","avatar_url":"https://github.com/Cosium.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/Cosium/standard-webhooks-consumer/actions/workflows/ci.yml/badge.svg)](https://github.com/Cosium/standard-webhooks-consumer/actions/workflows/ci.yml)\n[![Maven Central Version](https://img.shields.io/maven-central/v/com.cosium.standard_webhooks_consumer/standard-webhooks-consumer)](https://central.sonatype.com/artifact/com.cosium.standard_webhooks_consumer/standard-webhooks-consumer)\n\n\n# Standard Webhooks Consumer\n\nhttps://www.standardwebhooks.com/ consumer side java library.\n\n# Maven dependency\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.cosium.standard_webhooks_consumer\u003c/groupId\u003e\n  \u003cartifactId\u003estandard-webhooks-consumer\u003c/artifactId\u003e\n  \u003cversion\u003e${standard-webhooks-consumer.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Signature verification\n\n```java\npublic class App {\n\n  public void verifySymmetricSignature() throws WebhookSignatureVerificationException {\n\n    WebhookSignatureVerifier verifier =\n        WebhookSignatureVerifier.builder(\"whsec_b6Ovv5eS7H5seJrGSStBYDivs8v2/KrFjfMaVZYsi7w=\")\n            .build();\n    HttpHeaders httpHeaders =\n        createHttpHeaders(\n            Map.of(\n                \"webhook-id\",\n                \"7a2486b3-31cf-4bd3-a460-df8845d16cd5\",\n                \"webhook-timestamp\",\n                String.valueOf(1737987215),\n                \"webhook-signature\",\n                \"v1,iayM3VaiYCEDP/CxWUFWcxUCJk2YmBDQHtHTsaHzrwo=\"));\n    verifier.verify(httpHeaders, \"{\\\"greetings\\\": \\\"Hello World\\\"}\");\n  }\n\n  public void verifyAsymmetricSignature() throws WebhookSignatureVerificationException {\n\n    WebhookSignatureVerifier verifier =\n        WebhookSignatureVerifier.builder(\n                \"whpk_MCowBQYDK2VwAyEAkp3dScDPIzT1CwUFUMdzyPbWOAQaCF9z4ucuKuZD7Io=\")\n            .build();\n\n    HttpHeaders httpHeaders =\n        createHttpHeaders(\n            Map.of(\n                \"webhook-id\",\n                \"7a2486b3-31cf-4bd3-a460-df8845d16cd5\",\n                \"webhook-timestamp\",\n                String.valueOf(1737987215),\n                \"webhook-signature\",\n                \"v1a,XVbiOe+IzCKsXBuhb52iHLroqxFJofJNMQRL80I2kWO0+kXu2gcqgXAzontxDDgpMDw6SMh4sjzr+67EmUUzDg==\"));\n\n    verifier.verify(httpHeaders, \"{\\\"greetings\\\": \\\"Hello World\\\"}\");\n  }\n\n  private HttpHeaders createHttpHeaders(Map\u003cString, String\u003e headers) {\n    return HttpHeaders.of(\n        headers.entrySet().stream()\n            .map(entry -\u003e Map.entry(entry.getKey(), List.of(entry.getValue())))\n            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)),\n        (s, s2) -\u003e true);\n  }\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosium%2Fstandard-webhooks-consumer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosium%2Fstandard-webhooks-consumer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosium%2Fstandard-webhooks-consumer/lists"}