{"id":13769316,"url":"https://github.com/w13b3/redbean-jwt","last_synced_at":"2026-03-02T09:02:28.864Z","repository":{"id":62269553,"uuid":"512374690","full_name":"w13b3/redbean-jwt","owner":"w13b3","description":"JSON Web Token for redbean","archived":false,"fork":false,"pushed_at":"2024-07-03T15:24:55.000Z","size":40,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-14T09:01:52.608Z","etag":null,"topics":["cosmopolitan","jwt","redbean"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/w13b3.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":"2022-07-10T07:42:35.000Z","updated_at":"2024-09-21T08:28:38.000Z","dependencies_parsed_at":"2024-11-17T05:30:49.183Z","dependency_job_id":"c5fd5c56-3f38-476b-a482-4e9ea3c630f8","html_url":"https://github.com/w13b3/redbean-jwt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/w13b3/redbean-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w13b3%2Fredbean-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w13b3%2Fredbean-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w13b3%2Fredbean-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w13b3%2Fredbean-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/w13b3","download_url":"https://codeload.github.com/w13b3/redbean-jwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w13b3%2Fredbean-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29996274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"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":["cosmopolitan","jwt","redbean"],"created_at":"2024-08-03T17:00:21.725Z","updated_at":"2026-03-02T09:02:28.847Z","avatar_url":"https://github.com/w13b3.png","language":"Lua","funding_links":[],"categories":["Redbean","Lua"],"sub_categories":["Projects"],"readme":"# redbean-jwt  \u003csub\u003e\u003csup\u003e_JSON Web Token for redbean_\u003csup\u003e\u003csub\u003e\n\n[![jwt.io badge-compatible](https://jwt.io/img/badge-compatible.svg)](https://jwt.io/)\n##### Compatible algorithms\n`none`, `HS256`, `HS384` and `HS512`\n\n### What is JSON Web Token?\n\u003e JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.  \n\u003e This information can be verified and trusted because it is digitally signed.  \n\u003e JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.  \n\u003e _source: [jwt.io/introduction][1]_  \n\n### How to use\nRead the [documentation](./doc/)  \n\n### Notes\n`jwt.lua` is possible because [redbean][2] 2.0.11 introduced `EncodeJson` and `DecodeJson`.  \nPrevious versions did not have these functions.  \nIf `jwt.lua` is needed for a previous version, a bit of work is required to make `jwt.lua` compatible.  \n`json.stringify` and `json.parse` in [this gist][3] can be used in place of `EncodeJson` and `DecodeJson`.  \n\nConsider the header \u0026 payload to be unencrypted and visible for the whole world.  \nSo it is recommended not to use it for unencrypted credentials/personal data.  \n\n[`GetCryptoHash`][4] is used to create the JWT signature segment.  \nAs of writing this, the function expects one of the following strings:  \n`MD5`, `SHA1`, `SHA224`, `SHA256`, `SHA384`, `SHA512`, `BLAKE2B256`.  \nThe `SHA256`, `SHA384`, `SHA512` are equal to `HS256`, `HS384`, `HS512`.  \nFor compatibility’s sake the received HS algo's are renamed to SHA counterpart by a lookup table.  \nIt is possible to use the other algorithms in a JWT, but this breaks compatibility.  \n\n### More awesome projects\nCheck out this collection with [awesome-cosmopolitan][5] projects  \n\n\n[1]: https://jwt.io/introduction\n  \u003c!-- archive.ph/djKJg --\u003e\n\n[2]: https://redbean.dev \n  \u003c!-- archive.ph/xZPJX --\u003e\n\n[3]: https://gist.github.com/tylerneylon/59f4bcf316be525b30ab \"tylerneylon\"\n  \u003c!-- archive.ph/5leC3 --\u003e\n\n[4]: https://redbean.dev/#GetCryptoHash \"redbean.dev\"\n[5]: https://github.com/shmup/awesome-cosmopolitan \"shmup\"\n  \u003c!-- archive.ph/nC7QT --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw13b3%2Fredbean-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw13b3%2Fredbean-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw13b3%2Fredbean-jwt/lists"}