plugin API remake
This commit is contained in:
parent
b9a54f07f3
commit
843b6abbcb
3 changed files with 4 additions and 63 deletions
|
|
@ -321,7 +321,7 @@ api_yang_library_version(clicon_handle h,
|
|||
*/
|
||||
static int
|
||||
api_restconf(clicon_handle h,
|
||||
FCGX_Request *r)
|
||||
FCGX_Request *r)
|
||||
{
|
||||
int retval = -1;
|
||||
char *path;
|
||||
|
|
@ -374,14 +374,15 @@ api_restconf(clicon_handle h,
|
|||
goto done;
|
||||
data = cbuf_get(cb);
|
||||
clicon_debug(1, "DATA=%s", data);
|
||||
|
||||
if (str2cvec(data, '&', '=', &dvec) < 0)
|
||||
goto done;
|
||||
|
||||
/* If present, check credentials. See "plugin_credentials" in plugin
|
||||
* See RFC 8040 section 2.5
|
||||
*/
|
||||
if ((authenticated = clixon_plugin_auth(h, r)) < 0)
|
||||
goto done;
|
||||
|
||||
/* If set but no user, we set a dummy user */
|
||||
if (authenticated){
|
||||
if (clicon_username_get(h) == NULL)
|
||||
|
|
@ -424,7 +425,6 @@ api_restconf(clicon_handle h,
|
|||
return retval;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
restconf_terminate(clicon_handle h)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue