blob: 8cf6794ba39a2fc2259fbc92b6163831dc016204 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const std = @import("std");
const config = @import("config");
const memora = @import("memora");
const Context = memora.Context;
pub const access = .everyone;
const Result = struct {
is_valid: bool
};
pub fn get(ctx: *Context) !Result {
if (comptime config.disable_auth) {
return .{ .is_valid = true };
}
return .{
.is_valid = ctx.storage.sessions.get(ctx.storage, ctx.fingerprint) != null
};
}
|