comparison mod_audit_auth/mod_audit_auth.lua @ 4933:530d116b7f68

mod_audit*: modules for audit logging in prosody These are to be seen as proof-of-concept for now.
author Jonas Schäfer <jonas@wielicki.name>
date Tue, 26 Apr 2022 22:32:44 +0200
parents
children 08dea42a302a
comparison
equal deleted inserted replaced
4932:f4a9e804c457 4933:530d116b7f68
1 module:depends("audit");
2
3 module:hook("authentication-failure", function(event)
4 local session = event.session;
5 module:audit(session.sasl_handler.username, "authentication-failure", {
6 session = session,
7 });
8 end)
9
10 module:hook("authentication-success", function(event)
11 local session = event.session;
12 module:audit(session.sasl_handler.username, "authentication-success", {
13 session = session,
14 });
15 end)