Skip to content

malcolmstill/biscuit-zig

Repository files navigation

biscuit-zig

Warning

The implementation is WIP and should not be used in production

Zig implementation of https://www.biscuitsec.org/

Usage

Authorizing a token

var biscuit = try Biscuit.fromBytes(allocator, token, root_public_key);
defer biscuit.deinit();

var authorizer = try biscuit.authorizer();
defer authorizer.deinit();

var errors = std.ArrayList(AuthorizerError).init(allocator);
defer errors.deinit();

try authorizer.authorize(&errors);

Attenuating a token

var biscuit = try Biscuit.fromBytes(allocator, token, root_public_key);
defer biscuit.deinit();

var authorizer = try biscuit.authorizer();
defer authorizer.deinit();

var errors = std.ArrayList(AuthorizerError).init(allocator);
defer errors.deinit();

try authorizer.authorize(&errors);

About

Biscuit implementation for zig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages