{"repo":"deatil/zig-jwt","free":true,"listed":false,"github":"https://github.com/deatil/zig-jwt","clone":"git clone https://github.com/deatil/zig-jwt.git","description":"A JWT (JSON Web Token) library for zig.","language":"Zig","stars":21,"topics":["jwt","zig","zig-jwt","zig-package"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"Zig-jwt A JWT (JSON Web Token) library for zig. Env - Zig = 0.16.0 What the heck is a JWT? JWT.io has a great introduction to JSON Web Tokens. In short, it's a signed JSON object that does something useful (for example, authentication). It's commonly used for Bearer tokens in Oauth 2. A token is made of three parts, separated by . 's. The first two parts are JSON objects, that have been base64url encoded. The last part is the signature, encoded the same way. The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used. The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to RFC 7519 for information about reserved keys and the proper way to add your own. What's in the box? This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own. Adding zig-jwt as a dependency Add the dependency to your project: or use local path to add dependency at build.zig.zon file And the following to your build.zig file: The zig-jwt structure can be imported in your application with: Get Starting zig const std = @import(\"std\"); const jwt = @import(\"zig-jwt\"); pub fn main(init: std.process.Init) !void { const io = init.io; const alloc = init.a","default_branch":null,"files":null,"tree":[],"storefront":"/r/deatil","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/deatil/zig-jwt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}