{"id":17209351,"url":"https://github.com/de-vri-es/jws","last_synced_at":"2025-07-06T21:06:58.675Z","repository":{"id":46620903,"uuid":"163038967","full_name":"de-vri-es/jws","owner":"de-vri-es","description":"JSON Web Signature for Rust","archived":false,"fork":false,"pushed_at":"2025-01-01T15:00:12.000Z","size":78,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T18:54:31.374Z","etag":null,"topics":["hacktoberfest","json-web-signature","jws","rust-library","web"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/de-vri-es.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":"2018-12-25T02:39:56.000Z","updated_at":"2025-01-01T15:00:15.000Z","dependencies_parsed_at":"2024-10-15T02:51:27.295Z","dependency_job_id":null,"html_url":"https://github.com/de-vri-es/jws","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":0.01851851851851849,"last_synced_commit":"3e504aeaf6685091d9ecdf033997c6590b9500ed"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fjws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fjws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fjws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fjws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/de-vri-es","download_url":"https://codeload.github.com/de-vri-es/jws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248792126,"owners_count":21162322,"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":["hacktoberfest","json-web-signature","jws","rust-library","web"],"created_at":"2024-10-15T02:51:23.761Z","updated_at":"2025-04-13T22:36:10.546Z","avatar_url":"https://github.com/de-vri-es.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation](https://docs.rs/jws/badge.svg)](https://docs.rs/jws)\n[![crates.io](https://img.shields.io/crates/v/jws.svg)](https://crates.io/crates/jws)\n[![tests](https://github.com/de-vri-es/jws/actions/workflows/rust.yml/badge.svg)](https://github.com/de-vri-es/jws/actions/workflows/rust.yml)\n\n# jws\n\nThis library provides JSON Web Signature encoding, decoding, signing and verification\nas described in [RFC 7515](https://tools.ietf.org/html/rfc7515).\n\nCurrently, encoding and decoding is available only for the JWS Compact Serialization scheme in the\n[`compact`] module.\n\nSigning and verifying is done through the [`Signer`] and [`Verifier`] traits.\nThe [`hmac`] module contains implementations for these traits that support the HMAC-SHA2 family of algorithms.\n\n## Example:\n```rust\nuse jws::{JsonObject, JsonValue};\nuse jws::compact::{decode_verify, encode_sign};\nuse jws::hmac::{Hs512Signer, HmacVerifier};\n\nfn encode_decode() -\u003e jws::Result\u003c()\u003e {\n  // Add custom header parameters.\n  let mut header = JsonObject::new();\n  header.insert(String::from(\"typ\"), JsonValue::from(\"text/plain\"));\n\n  // Encode and sign the message.\n  let encoded = encode_sign(header, b\"payload\", \u0026Hs512Signer::new(b\"secretkey\"))?;\n\n  // Decode and verify the message.\n  let decoded = decode_verify(encoded.data().as_bytes(), \u0026HmacVerifier::new(b\"secretkey\"))?;\n\n  assert_eq!(decoded.payload, b\"payload\");\n  assert_eq!(decoded.header.get(\"typ\").and_then(|x| x.as_str()), Some(\"text/plain\"));\n\n  Ok(())\n}\n\n```\n\n[`compact`]: https://docs.rs/jws/latest/jws/compact/index.html\n[`Signer`]: https://docs.rs/jws/latest/jws/trait.Signer.html\n[`Verifier`]: https://docs.rs/jws/latest/jws/trait.Verifier.html\n[`hmac`]: https://docs.rs/jws/latest/jws/hmac/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fde-vri-es%2Fjws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fde-vri-es%2Fjws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fde-vri-es%2Fjws/lists"}