{"id":22302618,"url":"https://github.com/dataoneorg/jwttool","last_synced_at":"2026-05-01T10:32:12.868Z","repository":{"id":74058843,"uuid":"263796390","full_name":"DataONEorg/jwttool","owner":"DataONEorg","description":"Simple tool for creating and validating JWT tokens","archived":false,"fork":false,"pushed_at":"2024-10-11T01:48:18.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-26T00:28:03.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataONEorg.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":"2020-05-14T02:36:05.000Z","updated_at":"2024-10-11T01:48:22.000Z","dependencies_parsed_at":"2024-03-05T19:39:12.076Z","dependency_job_id":"c1cdd79b-ea04-49f1-b16d-60aceff01178","html_url":"https://github.com/DataONEorg/jwttool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DataONEorg/jwttool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fjwttool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fjwttool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fjwttool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fjwttool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataONEorg","download_url":"https://codeload.github.com/DataONEorg/jwttool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fjwttool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32494270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-03T18:40:02.078Z","updated_at":"2026-05-01T10:32:12.848Z","avatar_url":"https://github.com/DataONEorg.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jwttool\n\nA simple tool for creating and managing JWT tokens for DataONE.\n\n## Example usage\n\n### To create a token\n(storing it in the environment variable `token`):\n\n```sh\ntoken=`./jwttool -s \"http://orcid.org/0000-0003-0077-4738\" -n \"Matthew B. Jones\" --ttl 86400 --key privkey.pem`\n```\n\n### To create a token using a private key that requires a passphrase\n(assuming the environment variable `${PASS}` already contains the passphrase):\n\n```sh\ntoken=`./jwttool -s \"http://orcid.org/0000-0003-0077-4738\" -n \"Matthew B. Jones\" --ttl 86400 --key privkey.pem -p ${PASS}`\n```\n\n\u003e **Tip:** On macOS, instead of setting an environment variable for the passphrase, you can copy\n\u003e the passphrase to your clipboard (⌘C), and then substitute `$(pbpaste)` for `${PASS}` in the\n\u003e above command\n\n\n### To validate and print the claims from a token:\n\n```sh\n./jwttool --key privkey.pem $token\n{\"consumerKey\":\"jwttool\",\"exp\":1589509379.022425,\"fullName\":\"Matthew B. Jones\",\"iat\":1589422979.022425,\"issuedAt\":\"2020-05-14T02:22:59.022425+00:00\",\"sub\":\"http://orcid.org/0000-0003-0077-4738\",\"ttl\":86400,\"userId\":\"http://orcid.org/0000-0003-0077-4738\"}\n# if the key requires a passphrase, use:    -p ${PASS}\n```\n\n## Help documentation\n\n```sh\n$ ./jwttool --help\nusage: jwttool [-h] [-v] [-t TTL] [-k KEY] [-p PASSPHRASE] [-s SUBJECT] [-n NAME] [token]\n\nCreate or display JSON Web Tokens (JWT). If subject and name are provided,\ncreate a token. If a token is provided, validate it and print the claims.\nOptionally provide a TTL value in seconds, a signing key, and/or a key passphrase\n\npositional arguments:\n  token\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --version         show program’s version number and exit\n  -t TTL, --ttl TTL     optional time-to-live in seconds\n  -k KEY, --key KEY     optional filename or path to signing key\n  -p PASSPHRASE, --passphrase PASSPHRASE\n                        optional passphrase for key\n  -s SUBJECT, --subject SUBJECT\n                        subject identifier for the created token\n  -n NAME, --name NAME  name to be included in the created token\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Fjwttool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataoneorg%2Fjwttool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Fjwttool/lists"}