Go to the source code of this file.
Functions | |
void | thread_client_timeout_check (const void *arg) |
Periodically check if connections expired. | |
void | authenticate_client (request *r) |
Authenticate a single client against the central server. | |
Variables | |
pthread_mutex_t | client_list_mutex |
long | served_this_session |
Definition in file auth.c.
void authenticate_client | ( | request * | r | ) |
Authenticate a single client against the central server.
Authenticates a single client against the central server and returns when done Alters the firewall rules depending on what the auth server says
r | httpd request struct |
Definition at line 94 of file auth.c.
References AUTH_ALLOWED, AUTH_DENIED, AUTH_ERROR, auth_server_request(), AUTH_VALIDATION, AUTH_VALIDATION_FAILED, _t_authresponse::authcode, _auth_serv_t::authserv_msg_script_path_fragment, _auth_serv_t::authserv_portal_script_path_fragment, client_list_find(), client_list_find_by_ip(), config_get_config(), debug, _t_client::fw_connection_state, FW_MARK_KNOWN, FW_MARK_PROBATION, GATEWAY_MESSAGE_ACCOUNT_VALIDATION_FAILED, GATEWAY_MESSAGE_ACTIVATE_ACCOUNT, GATEWAY_MESSAGE_DENIED, get_auth_server(), s_config::gw_id, http_send_redirect_to_auth(), _t_client::ip, _t_client::mac, REQUEST_TYPE_LOGIN, send_http_page(), and _t_client::token.
Referenced by http_callback_auth().
void thread_client_timeout_check | ( | const void * | arg | ) |
Periodically check if connections expired.
Launches a thread that periodically checks if any of the connections has timed out
arg | Must contain a pointer to a string containing the IP adress of the client to check to check |
Definition at line 63 of file auth.c.
References s_config::checkinterval, config_get_config(), and debug.
pthread_mutex_t client_list_mutex |
Global mutex to protect access to the client list
Definition at line 48 of file client_list.c.