27 RCSIDH(mod_h,
"$Id: 72fb139c558c9ec524ca09b7ff8f841379f9bf58 $")
29 #include <freeradius-devel/server/base.h>
30 #include <freeradius-devel/server/pool.h>
32 #include <freeradius-devel/json/base.h>
35 #define MAX_VALUE_SIZE 20480
38 #define MAX_KEY_SIZE 250
A section grouping multiple CONF_PAIR.
static fr_time_delta_t timeout
char const * bucket
Couchbase bucket.
int mod_attribute_to_element(const char *name, json_object *map, void *buf)
Map attributes to JSON element names.
int mod_free_api_opts(rlm_couchbase_t *inst)
Delete a object built by mod_build_api_opts()
int mod_build_api_opts(CONF_SECTION *conf, rlm_couchbase_t *inst)
Build a couchbase_opts_t structure from the configuration "couchbase_api" list.
void * cookie
Couchbase cookie (cookie_u cookie_t).
char const * server_raw
Raw server string before parsing.
const char * client_view
Couchbase view that returns client documents.
void * api_opts
Couchbase API internal options.
bool read_clients
Toggle for loading client records.
int mod_conn_alive(void *opaque, void *connection)
tmpl_t * user_key
User document key.
uint32_t expire
Accounting document expire time in seconds.
void * handle
Real couchbase instance.
int mod_load_client_documents(rlm_couchbase_t *inst, CONF_SECTION *tmpl, CONF_SECTION *map)
Load client entries from Couchbase client documents on startup.
int mod_build_attribute_element_map(CONF_SECTION *conf, rlm_couchbase_t *inst)
Build a JSON object map from the configuration "map" list.
char const * server
Couchbase server list.
int mod_ensure_start_timestamp(json_object *json, fr_pair_list_t *vps)
Ensure accounting documents always contain a valid timestamp.
char const * name
Module instance name.
json_object * map
Json object to hold user defined attribute map.
tmpl_t * acct_key
Accounting document key.
char const * username
Couchbase bucket username.
json_object * mod_value_pair_to_json_object(request_t *request, fr_pair_t *vp)
Convert value pairs to json objects.
int mod_json_object_to_map(TALLOC_CTX *ctx, fr_dcursor_t *out, request_t *request, json_object *json, tmpl_pair_list_t list)
void * mod_conn_create(TALLOC_CTX *ctx, UNUSED void *instance, fr_time_delta_t timeout)
char const * doctype
Value of accounting 'docType' element name.
fr_pool_t * pool
Connection pool.
int mod_client_map_section(CONF_SECTION *client, CONF_SECTION const *map, json_object *json, char const *docid)
char const * password
Couchbase bucket password.
Couchbase instance specific information.
The main module instance.
eap_aka_sim_process_conf_t * inst
Stores an attribute, a value and various bits of other data.
A time delta, a difference in time measured in nanoseconds.
static size_t char ** out