Software /
code /
prosody-modules
Changeset
5261:6526b670e66d
mod_sasl2: Pull user-agent info into sasl_handler for later reference
It may be of interest to post-auth things. Putting it on the session was
another option considered, but that seemed unnecessary overhead for something
that might be rarely used. sasl_handler is cleared after successful
authentication.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 21 Mar 2023 15:26:03 +0000 |
parents | 5260:a9c1cc91d3d6 |
children | 5262:e73f364b5624 |
files | mod_sasl2/mod_sasl2.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_sasl2/mod_sasl2.lua Sun Mar 19 22:21:41 2023 +0100 +++ b/mod_sasl2/mod_sasl2.lua Tue Mar 21 15:26:03 2023 +0000 @@ -208,6 +208,10 @@ local user_agent = auth:get_child("user-agent"); if user_agent then session.client_id = user_agent.attr.id; + sasl_handler.user_agent = { + software = user_agent:get_child_text("software"); + device = user_agent:get_child_text("device"); + }; end local initial = auth:get_child_text("initial-response"); return process_cdata(session, initial);