Release v0.1.3-pre
Pre-release
Pre-release
ZAP Release v0.1.3-pre
Updates
UserPassSessionAuth: emphermal session tokens
The UserPassSessionAuth now adds the current timestamp in nanoseconds to the hasher. -> Every successful login will create its own session cookie. A leaked cookie is pretty worthless now (unless an attacker can grab and use it in the same browser session).
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap v0.1.3-pre
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/v0.1.3-pre.tar.gz",
.hash = "1220767291ec85dab33cb0f60d51aac140b36beac2a4454fcbc7254e54cc1b387245",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap v0.1.3-pre
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/v0.1.3-pre.tar.gz",
.hash = "1220767291ec85dab33cb0f60d51aac140b36beac2a4454fcbc7254e54cc1b387245",
}
}
}
Then, in your build.zig
's build
function, add the following before exe.install()
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));