From 071b7e9b01e41d4048b1bbb3d9caaac4c8a526de Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Thu, 17 Sep 2026 21:48:00 +0200 Subject: Add token login to bokfctl and enforce admin scope for tokens - bokfctl: --token / BOKFD_TOKEN via client_token_login - tokens must carry the admin scope for admin commands (was bypassed) - docs: token-based snapshot for restic backups --- clients/client.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clients/client.h') diff --git a/clients/client.h b/clients/client.h index 9372e72..40a8669 100644 --- a/clients/client.h +++ b/clients/client.h @@ -36,6 +36,10 @@ char *client_rpc(struct client_conn *c, const char *cmd, const char *session, int client_login(struct client_conn *c, const char *user, const char *password, char **session_out, char **err_out); +/* Token login (same contract as client_login). */ +int client_token_login(struct client_conn *c, const char *token, + char **session_out, char **err_out); + /* Convenience: true when the response line has "ok":true. */ int client_ok(const char *response); /* Extract result.session into buf; returns 0 on success. */ -- cgit v1.3