Software /
code /
prosody-modules
Comparison
mod_log_sasl_mech/mod_log_sasl_mech.lua @ 5856:75dee6127829 draft
Merge upstream
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Tue, 06 Feb 2024 18:32:01 +0700 |
parent | 5795:5ff8022466ab |
comparison
equal
deleted
inserted
replaced
5664:52db2da66680 | 5856:75dee6127829 |
---|---|
1 | 1 |
2 module:hook("authentication-success", function (event) | 2 module:hook("authentication-success", function (event) |
3 local session = event.session; | 3 local session = event.session; |
4 local sasl_handler = session.sasl_handler; | 4 local sasl_handler = session and session.sasl_handler; |
5 session.log("info", "Authenticated with %s", sasl_handler and sasl_handler.selected or "legacy auth"); | 5 local log = session and session.log or module._log |
6 log("info", "Authenticated with %s", sasl_handler and sasl_handler.selected or "legacy auth"); | |
6 end); | 7 end); |