mod_audit_tokens/mod_audit_tokens.lua
author Matthew Wild <mwild1@gmail.com>
Tue, 16 Apr 2024 10:42:25 +0100
changeset 5886 563c2c70cb9f
parent 5754 c89077b4f46e
permissions -rw-r--r--
mod_sasl2_fast: Improve handling when SASL profile unexpectedly lacks CB This fixes a traceback reported by riau, but likely does not solve the underlying cause, whatever that is.

local jid = require"util.jid";

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

module:hook("token-grant-created", function(event)
	module:audit(jid.join(event.username, event.host), "token-grant-created", {
	});
end)

module:hook("token-grant-revoked", function(event)
	module:audit(jid.join(event.username, event.host), "token-grant-revoked", {
	});
end)

module:hook("token-revoked", function(event)
	module:audit(jid.join(event.username, event.host), "token-revoked", {
	});
end)