aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/anonymous.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/sasl/anonymous.lua')
-rw-r--r--util/sasl/anonymous.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/util/sasl/anonymous.lua b/util/sasl/anonymous.lua
index 7b5a5081..6e6f0949 100644
--- a/util/sasl/anonymous.lua
+++ b/util/sasl/anonymous.lua
@@ -20,12 +20,22 @@ module "anonymous"
--=========================
--SASL ANONYMOUS according to RFC 4505
+
+--[[
+Supported Authentication Backends
+
+anonymous:
+ function(username, realm)
+ return true; --for normal usage just return true; if you don't like the supplied username you can return false.
+ end
+]]
+
local function anonymous(self, message)
local username;
repeat
username = generate_uuid();
until self.profile.anonymous(username, self.realm);
- self["username"] = username;
+ self.username = username;
return "success"
end