From 1c23dbef0405d8ca9776737a209fb5b549219bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Sun, 7 Nov 2010 01:57:30 +0200 Subject: authdb, auth-ip: make logout_timeout configurable * authdb: change to use squark.conf instead of filter.conf * authdb: config option logout_timeout added (defaults to 15mins) * auth-ip: add -r parameter to refresh login time fixes #452 --- src/authdb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/authdb.h') diff --git a/src/authdb.h b/src/authdb.h index 7bfa2f4..562ed17 100644 --- a/src/authdb.h +++ b/src/authdb.h @@ -18,6 +18,7 @@ struct authdb_config { uint64_t block_categories; uint64_t hard_block_categories; blob_t redirect_url_base; + unsigned int logout_timeout; }; struct authdb { @@ -52,7 +53,7 @@ void *authdb_get(struct authdb *adb, sockaddr_any *addr, struct authdb_entry *en void authdb_clear_entry(struct authdb_entry *entry); int authdb_set(void *token, struct authdb_entry *entry); -int authdb_check_login(void *token, struct authdb_entry *e, blob_t username, time_t now); +int authdb_check_login(void *token, struct authdb_entry *e, blob_t username, time_t now, struct authdb_config *cfg); void authdb_commit_login(void *token, struct authdb_entry *e, time_t now, struct authdb_config *cfg); void authdb_commit_logout(void *token); void authdb_commit_override(void *token, struct authdb_entry *entry, time_t now); -- cgit v1.2.3