1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

feature: enabled authentication

This commit is contained in:
Falk Werner
2020-03-01 13:42:46 +01:00
parent f79b9c998a
commit 7856b5a99d
8 changed files with 115 additions and 7 deletions

View File

@@ -33,7 +33,20 @@ jsonrpc_proxy_create(
extern JSONRPC_API void jsonrpc_proxy_dispose(
struct jsonrpc_proxy * proxy);
//------------------------------------------------------------------------------
/// \brief Invokes a method.
///
/// Creates a method an sends it using the send function.
/// Proxy keeps track of method invokation. If no response is returned within
/// timeout, an error is propagated.
///
/// \param proxy pointer to proxy instance
/// \param finished function which is called exactly once, either on success or
/// on failure.
/// \param method_name name of the method to invoke
/// \param param_info types of the param (s = string, i = integer, j = json)
/// \param ... params
//------------------------------------------------------------------------------
extern JSONRPC_API void jsonrpc_proxy_invoke(
struct jsonrpc_proxy * proxy,
jsonrpc_proxy_finished_fn * finished,

View File

@@ -77,6 +77,12 @@ static json_t * jsonrpc_impl_request_create(
json_array_append_new(params, json_integer(value));
}
break;
case 'j':
{
json_t * const value = va_arg(args, json_t *);
json_array_append_new(params, value);
}
break;
default:
fprintf(stderr, "fatal: unknown param_type '%c'\n", *param_type);
json_decref(params);