35module AP_MODULE_DECLARE_DATA authn_socache_module;
98 "Please select a socache provider with AuthnCacheSOCache "
99 "(no default found on this platform). Maybe you need to "
100 "load mod_socache_shmcb or another socache module first");
112 "failed to create mod_socache_shmcb socache "
113 "instance: %s", errmsg);
149 "failed to initialise mutex in child_init");
176 "Unknown socache provider '%s'. Maybe you need "
177 "to load the appropriate socache module "
178 "(mod_socache_%s?)",
arg,
arg);
222 ret->providers =
base->providers;
252 "socache provider for authn cache"),
254 "enable socache configuration in htaccess even if not enabled anywhere else"),
257 OR_AUTHCFG,
"Determine what authn providers to cache for"),
259 OR_AUTHCFG,
"Timeout (secs) for cached credentials"),
267 const char *user,
const char *realm)
294 const char *user,
const char *realm,
316 "authn credentials for %s not cached (mutex busy)", user);
321 "Failed to cache authn credentials for %s in %s",
333 (
unsigned char*)
key, strlen(
key), expiry,
337 "Cached authn credentials for %s in %s",
338 user,
dcfg->context);
342 "Failed to cache authn credentials for %s in %s",
353#define MAX_VAL_LEN 256
378 (
unsigned char*)
key, strlen(
key),
384 "Authn cache: no credentials found for %s", user);
390 "Authn cache: found credentials for %s", user);
397 "Error accessing authentication cache");
410 const char *realm,
char **
rethash)
423 (
unsigned char*)
key, strlen(
key),
429 "Authn cache: no credentials found for %s", user);
435 "Authn cache: found credentials for %s", user);
441 "Error accessing authentication cache");
Symbol export macros and hook functions.
Small object cache provider interface.
APR-UTIL registration of functions exported by modules.
static apr_pool_t * pconf
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_DECLARE_MODULE(foo)
#define AP_INIT_ITERATE(directive, func, mconfig, where, help)
const char * ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_INIT_NO_ARGS(directive, func, mconfig, where, help)
void ap_hook_child_init(ap_HOOK_child_init_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
apr_status_t ap_global_mutex_create(apr_global_mutex_t **mutex, const char **name, const char *type, const char *instance_id, server_rec *server, apr_pool_t *pool, apr_int32_t options)
apr_status_t ap_mutex_register(apr_pool_t *pconf, const char *type, const char *default_dir, apr_lockmech_e default_mech, apr_int32_t options)
void * ap_lookup_provider(const char *provider_group, const char *provider_name, const char *provider_version)
apr_status_t ap_register_auth_provider(apr_pool_t *pool, const char *provider_group, const char *provider_name, const char *provider_version, const void *provider, int type)
#define AP_AUTH_INTERNAL_PER_CONF
#define APR_STATUS_IS_NOTFOUND(s)
#define APR_STATUS_IS_EBUSY(s)
#define APR_REGISTER_OPTIONAL_FN(name)
#define AP_SOCACHE_DEFAULT_PROVIDER
#define AP_SOCACHE_PROVIDER_GROUP
#define AP_SOCACHE_PROVIDER_VERSION
#define STANDARD20_MODULE_STUFF
#define ap_strchr_c(s, c)
int ap_array_str_contains(const apr_array_header_t *array, const char *s)
const char * ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden)
const char int apr_pool_t * pool
#define APR_ARRAY_PUSH(ary, type)
const char const char * password
apr_int64_t apr_interval_time_t
#define apr_time_from_sec(sec)
Authentication and Authorization Extension for Apache.
#define AUTHN_PROVIDER_VERSION
#define AUTHN_PROVIDER_GROUP
static apr_status_t remove_lock(void *data)
static int authn_cache_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptmp, server_rec *s)
static const command_rec authn_cache_cmds[]
static void * authn_cache_dircfg_create(apr_pool_t *pool, char *s)
static ap_socache_provider_t * socache_provider
static authn_status get_realm_hash(request_rec *r, const char *user, const char *realm, char **rethash)
static ap_socache_instance_t * socache_instance
static const char * authn_cache_timeout(cmd_parms *cmd, void *CFG, const char *arg)
static void * authn_cache_dircfg_merge(apr_pool_t *pool, void *BASE, void *ADD)
static void ap_authn_cache_store(request_rec *r, const char *module, const char *user, const char *realm, const char *data)
static apr_status_t destroy_cache(void *data)
static const char * authn_cache_enable(cmd_parms *cmd, void *CFG)
static apr_global_mutex_t * authn_cache_mutex
static const char * authn_cache_setprovider(cmd_parms *cmd, void *CFG, const char *arg)
static void authn_cache_child_init(apr_pool_t *p, server_rec *s)
static authn_status check_password(request_rec *r, const char *user, const char *password)
static const char *const directory
static void register_hooks(apr_pool_t *p)
static int authn_cache_precfg(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptmp)
static const char * construct_key(request_rec *r, const char *context, const char *user, const char *realm)
static const char *const authn_cache_id
static const char * authn_cache_socache(cmd_parms *cmd, void *CFG, const char *arg)
static const authn_provider authn_cache_provider
apr_status_t(* store)(ap_socache_instance_t *instance, server_rec *s, const unsigned char *id, unsigned int idlen, apr_time_t expiry, unsigned char *data, unsigned int datalen, apr_pool_t *pool)
const char *(* create)(ap_socache_instance_t **instance, const char *arg, apr_pool_t *tmp, apr_pool_t *p)
void(* destroy)(ap_socache_instance_t *instance, server_rec *s)
apr_status_t(* init)(ap_socache_instance_t *instance, const char *cname, const struct ap_socache_hints *hints, server_rec *s, apr_pool_t *pool)
apr_status_t(* retrieve)(ap_socache_instance_t *instance, server_rec *s, const unsigned char *id, unsigned int idlen, unsigned char *data, unsigned int *datalen, apr_pool_t *pool)
apr_interval_time_t timeout
apr_array_header_t * providers
A structure that represents the current request.
struct ap_conf_vector_t * per_dir_config
A structure to store information for each virtual server.
Apache Mutex support library.