-} AFB_config;
-
-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_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_freeCtxCB freeCtxCB; // callback to free application context [null for standard free]
-} AFB_plugin;
-
-
-// User Client Session Context
-typedef struct {
- 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 **contexts; // application specific context [one per plugin]]
- AFB_plugin **plugins; // we need plugins reference to cleanup session outside of call context
-} AFB_clientCtx;