summaryrefslogtreecommitdiff
path: root/libpanto/src/public.zig
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-13 11:55:59 -0600
committert <t@tjp.lol>2026-06-15 15:08:32 -0600
commitfe2bfe443dfcf3251ebe39002325f604634dfa1f (patch)
tree83cc6673f85b85f5c49f8b1c5195e2ad68ca9002 /libpanto/src/public.zig
parent9308feabc045a3afd7eeb304a2324d17d03246df (diff)
auth: HTTP helper + token storage (C3, C4)
Add libpanto http_helper (non-streaming request/response over the global client, plus dotted-JSON-path readers) and token persistence in auth.zig (load/save/delete TokenSet under an embedder-chosen auth dir, owner-only files). Add $PANTO_HOME/auth to the panto_home layout.
Diffstat (limited to 'libpanto/src/public.zig')
-rw-r--r--libpanto/src/public.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpanto/src/public.zig b/libpanto/src/public.zig
index 2ee44dd..aa2f7e8 100644
--- a/libpanto/src/public.zig
+++ b/libpanto/src/public.zig
@@ -84,8 +84,19 @@ pub const ExchangeConfig = auth_mod.ExchangeConfig;
pub const DeviceDialect = auth_mod.DeviceDialect;
pub const TokenRequestFormat = auth_mod.TokenRequestFormat;
pub const TokenSet = auth_mod.TokenSet;
+pub const ParsedTokenSet = auth_mod.ParsedTokenSet;
pub const ResolvedCredential = auth_mod.ResolvedCredential;
+/// Token persistence under an embedder-chosen auth directory
+/// (`$PANTO_HOME/auth`). Files are written owner-only.
+pub const loadTokenSet = auth_mod.loadTokenSet;
+pub const saveTokenSet = auth_mod.saveTokenSet;
+pub const deleteTokenSet = auth_mod.deleteTokenSet;
+
+/// Non-streaming HTTP helper over the process-global client, plus JSON
+/// path readers — the building blocks of the OAuth flows.
+pub const http = @import("http_helper.zig");
+
// ===========================================================================
// Conversation construction (data, aliased)
// ===========================================================================
@@ -222,6 +233,7 @@ test {
// tests must still run).
std.testing.refAllDecls(config_mod);
std.testing.refAllDecls(auth_mod);
+ std.testing.refAllDecls(@import("http_helper.zig"));
std.testing.refAllDecls(conversation_mod);
std.testing.refAllDecls(agent_mod);
std.testing.refAllDecls(stream_mod);