Displaying 2 results from an estimated 2 matches for "do_auth_script".
2020 Jul 14
0
[PATCH nbdkit RFC 2/2] curl: Implement authorization scripts.
...nection handle. */
+struct curl_handle {
+ CURL *c;
+ bool accept_range;
+ int64_t exportsize;
+ char errbuf[CURL_ERROR_SIZE];
+ char *write_buf;
+ uint32_t write_count;
+ const char *read_buf;
+ uint32_t read_count;
+ struct curl_slist *auth_headers;
+};
+
+/* auth-script.c */
+extern int do_auth_script (struct curl_handle *h);
+extern void auth_script_unload (void);
+
+#endif /* NBDKIT_CURLDEFS_H */
diff --git a/plugins/curl/auth-script.c b/plugins/curl/auth-script.c
new file mode 100644
index 00000000..6839cd85
--- /dev/null
+++ b/plugins/curl/auth-script.c
@@ -0,0 +1,311 @@
+/* nbdkit
+ * Copyr...
2020 Jul 14
3
[PATCH nbdkit RFC 0/2] curl: Implement authorization scripts.
This is an RFC only, at the very least it lacks tests.
This implements a rather complex new feature in nbdkit-curl-plugin
allowing you to specify an external shell script that can be used to
fetch an authorization token for services which requires a token or
cookie for access, especially if that token must be renewed
periodically. The motivation can be seen in the changes to the docs
in patch 2.