-} AFB_config;
-
-typedef struct {
- int len; // command number within application
- json_object *jtype;
-} AFB_privateApi;
-
-
-typedef struct {
- char *msg;
- size_t len;
-} AFB_redirect_msg;
-
-// Enum for Session/Token/Authentication middleware
-typedef enum {AFB_SESSION_NONE, AFB_SESSION_CREATE, AFB_SESSION_CLOSE, AFB_SESSION_RENEW, AFB_SESSION_CHECK} AFB_sessionE;
-
-// API definition
-typedef struct {
- char *name;
- AFB_sessionE session;
- AFB_apiCB callback;
- char *info;
- AFB_privateApi *private;
-} AFB_restapi;
-
-// Plugin definition
-typedef struct {
- AFB_pluginE type;
- char *info;
- char *prefix;
- size_t prefixlen;
- json_object *jtype;
- AFB_restapi *apis;
- void *handle;
- int ctxCount;
- AFB_apiCB freeCtxCB; // callback to free application context [null for standard free]
-} AFB_plugin;
-
-
-// User Client Session Context
-typedef struct {
- int cid; // index 0 if global
- char uuid[37]; // long term authentication of remote client
- char token[37]; // short term authentication of remote client
- time_t timeStamp; // last time token was refresh
- int restfull; // client does not use cookie
- void *ctx; // application specific context
- AFB_plugin *plugin; // provide callback and easy access to plugin
-} AFB_clientCtx;