diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-17 21:48:00 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-17 21:48:00 +0200 |
| commit | 071b7e9b01e41d4048b1bbb3d9caaac4c8a526de (patch) | |
| tree | b0af0a71e0d9fff2ca166d6ca69167ff32cc2ccb /clients/client.h | |
| parent | a145684f0a556820a183db45d27e9b2dc715f056 (diff) | |
| download | bokf-0.1.3.tar.gz bokf-0.1.3.zip | |
Add token login to bokfctl and enforce admin scope for tokensv0.1.3
- 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
Diffstat (limited to 'clients/client.h')
| -rw-r--r-- | clients/client.h | 4 |
1 files changed, 4 insertions, 0 deletions
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. */ |
