Software /
code /
prosody
Changeset
13759:1437d8884899
Merge 13.0->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 06 Mar 2025 13:34:55 +0000 |
parents | 13757:025f6e490774 (current diff) 13758:fc97319ef48e (diff) |
children | 13766:b11242656300 |
files | |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sasl.lua Sat Mar 01 16:19:58 2025 +0000 +++ b/util/sasl.lua Thu Mar 06 13:34:55 2025 +0000 @@ -67,7 +67,7 @@ end -- create a new SASL object which can be used to authenticate clients -local function new(realm, profile) +local function new(realm, profile, userdata) local mechanisms = profile.mechanisms; if not mechanisms then mechanisms = {}; @@ -80,7 +80,12 @@ end profile.mechanisms = mechanisms; end - return setmetatable({ profile = profile, realm = realm, mechs = mechanisms }, method); + return setmetatable({ + profile = profile, + realm = realm, + mechs = mechanisms, + userdata = userdata + }, method); end -- add a channel binding handler @@ -94,7 +99,7 @@ -- get a fresh clone with the same realm and profile function method:clean_clone() - return new(self.realm, self.profile) + return new(self.realm, self.profile, self.userdata) end -- get a list of possible SASL mechanisms to use