{"id":19147768,"url":"https://github.com/refcell/jwtauth","last_synced_at":"2025-05-07T03:03:23.850Z","repository":{"id":93057731,"uuid":"607503915","full_name":"refcell/jwtauth","owner":"refcell","description":"Minimal cli to interact with JWT Auth Tokens","archived":false,"fork":false,"pushed_at":"2023-02-28T22:18:36.000Z","size":3099,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T15:54:40.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/refcell.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":"2023-02-28T05:08:00.000Z","updated_at":"2023-07-25T15:08:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe2aece0-e821-47d6-afb8-0b3258a61cca","html_url":"https://github.com/refcell/jwtauth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fjwtauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fjwtauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fjwtauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fjwtauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refcell","download_url":"https://codeload.github.com/refcell/jwtauth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804208,"owners_count":21806769,"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-11-09T07:52:20.009Z","updated_at":"2025-05-07T03:03:23.818Z","avatar_url":"https://github.com/refcell.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## jwtauth\n\nMinimal cli to interact with JWT Auth Tokens.\n\n### Usage\n\n_Prerequisites: Install Golang: https://go.dev/doc/install_\n\nInstall as a global command:\n\n```bash\ngo install -v github.com/refcell/jwtauth@latest\n```\n\nThen, you can run `jwtauth` from anywhere.\n\n### Reference\n\n```bash\nNAME:\n   jwtauth - Minimal cli to interact with JWT Auth Tokens\n\nUSAGE:\n   jwtauth [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   claims, c         generate claims for a JWT token\n   header, h         generate the http auth bearer header for a JWT token\n   generate, g, gen  generate a new JWT token\n   help, h           Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h  show help\n```\n\n### Example\n\nCreate a hex encoded 256 bit jwt secret string (with a `0x` prefix):\n\n```bash\n$ jwtauth g 0x66c01996d15563ec70b57ae35e22b739125094d40e5a6853746912b43ae56ce0\n```\n\nGenerate the claims for the token that can be used in the `Authorization` header:\n\n```bash\n$ jwtauth c 0x66c01996d15563ec70b57ae35e22b739125094d40e5a6853746912b43ae56ce0\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Nzc1NjQwMTh9.5dQj9FjSZ5KWR61ZISBvWMlIj9f79UqrdQeMGPrY9Ns\n```\n\nYou can also set the token expiry in both the `claims` and `header` subcommands using the `--expiry` flag, providing a [duration string](https://pkg.go.dev/time#ParseDuration). For example:\n\n```bash\n$ jwtauth c --expiry 100s 0x66c01996d15563ec70b57ae35e22b739125094d40e5a6853746912b43ae56ce0\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Nzc2MjI1NzgsImlhdCI6MTY3NzYyMjQ3OH0.u_K0Zvv3niL5dIiSdBAebe3oWgtjamtZKT5kdcmoGvI\n```\n\nThe `header` subcommand simply prefixes `Authorization: Bearer ` to the JWT Token like so.\n\n```bash\n$ jwtauth h --expiry 100s 0x66c01996d15563ec70b57ae35e22b739125094d40e5a6853746912b43ae56ce0\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Nzc2MjI2NjAsImlhdCI6MTY3NzYyMjU2MH0.fssZEUdKAQtPc1bwLPZ_2WIbpmDde8T7iy2oXLFBnQM\n```\n\n### Building from source\n\nTo build from source, run:\n\n```bash\ngo build -o jwtauth\n```\n\n\n### License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefcell%2Fjwtauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefcell%2Fjwtauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefcell%2Fjwtauth/lists"}