mod_audit_auth/mod_audit_auth.lua
author Kim Alvefur <zash@zash.se>
Sat, 11 Mar 2023 22:25:22 +0100
changeset 5244 001908044d0d
parent 4937 08dea42a302a
child 5716 b357ff3d0c8a
permissions -rw-r--r--
mod_http_oauth2: Validate that redirect URIs are absolute

module:depends("audit");
-- luacheck: read globals module.audit

module:hook("authentication-failure", function(event)
	local session = event.session;
	module:audit(session.sasl_handler.username, "authentication-failure", {
		session = session,
	});
end)

module:hook("authentication-success", function(event)
	local session = event.session;
	module:audit(session.sasl_handler.username, "authentication-success", {
		session = session,
	});
end)