30 RCSIDH(mod_h,
"$Id: 0660f07c247659a1e315bb700eefc7737c87adf0 $")
32 #include <freeradius-devel/radiusd.h>
34 #include <libcouchbase/couchbase.h>
35 #include "../rlm_json/json.h"
38 #define MAX_VALUE_SIZE 20480
41 #define MAX_KEY_SIZE 250
int mod_load_client_documents(rlm_couchbase_t *inst, CONF_SECTION *tmpl, CONF_SECTION *map)
Load client entries from Couchbase client documents on startup.
bool read_clients
Toggle for loading client records.
json_object * map
Json object to hold user defined attribute map.
void * mod_json_object_to_value_pairs(json_object *json, const char *section, REQUEST *request)
Build value pairs from the passed JSON object and add to the request.
uint32_t expire
Accounting document expire time in seconds.
fr_connection_pool_t * pool
Connection pool.
void * mod_conn_create(TALLOC_CTX *ctx, void *instance, struct timeval const *timeout)
Create a new connection pool handle.
char const * password
Couchbase bucket password.
void * handle
Real couchbase instance.
struct rlm_couchbase_handle_t rlm_couchbase_handle_t
Couchbase instance specific information.
bool delete_stale_sessions
Toggle to trigger zapping of stale sessions.
int mod_build_attribute_element_map(CONF_SECTION *conf, void *instance)
Build a JSON object map from the configuration "map" section.
const char * simul_view
Couchbase view that returns accounting documents.
char const * server
Couchbase server list.
struct rlm_couchbase_t rlm_couchbase_t
The main module instance.
int mod_conn_alive(UNUSED void *instance, void *handle)
Check the health of a connection handle.
The main module instance.
vp_tmpl_t * simul_vkey
The query key to be used with simul_view.
vp_tmpl_t * user_key
User document key.
vp_tmpl_t * acct_key
Accounting document key.
json_object * mod_value_pair_to_json_object(REQUEST *request, VALUE_PAIR *vp)
Convert value pairs to json objects.
bool check_simul
Toggle to enable simultaneous use checking.
Stores an attribute, a value and various bits of other data.
int mod_ensure_start_timestamp(json_object *json, VALUE_PAIR *vps)
Ensure accounting documents always contain a valid timestamp.
char const * server_raw
Raw server string before parsing.
char const * bucket
Couchbase bucket.
const char * client_view
Couchbase view that returns client documents.
char const * doctype
Value of accounting 'docType' element name.
bool verify_simul
Toggle to enable user login state verification.
void * cookie
Couchbase cookie (cookie_u cookie_t).
Couchbase instance specific information.
int mod_attribute_to_element(const char *name, json_object *map, void *buf)
Map attributes to JSON element names.
int mod_client_map_section(CONF_SECTION *client, CONF_SECTION const *map, json_object *json, char const *docid)
A source or sink of value data.