Mercurial > prosody-modules
comparison mod_audit_auth/mod_audit_auth.lua @ 4938:bc8832c6696b
upstream merge
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 11 May 2022 12:44:32 +0200 |
parents | 08dea42a302a |
children | b357ff3d0c8a |
comparison
equal
deleted
inserted
replaced
4913:3ddab718f717 | 4938:bc8832c6696b |
---|---|
1 module:depends("audit"); | |
2 -- luacheck: read globals module.audit | |
3 | |
4 module:hook("authentication-failure", function(event) | |
5 local session = event.session; | |
6 module:audit(session.sasl_handler.username, "authentication-failure", { | |
7 session = session, | |
8 }); | |
9 end) | |
10 | |
11 module:hook("authentication-success", function(event) | |
12 local session = event.session; | |
13 module:audit(session.sasl_handler.username, "authentication-success", { | |
14 session = session, | |
15 }); | |
16 end) |