Software /
code /
prosody
Comparison
util/sasl/anonymous.lua @ 2992:9ce36f7eb24a
util.sasl.anonymous: Adding documentation on anonymous authentication backend.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 28 Feb 2010 22:40:05 +0100 |
parent | 2195:8788c995fcbd |
child | 2996:b0515ed4d9d7 |
comparison
equal
deleted
inserted
replaced
2991:0fa3a7c885bd | 2992:9ce36f7eb24a |
---|---|
18 | 18 |
19 module "anonymous" | 19 module "anonymous" |
20 | 20 |
21 --========================= | 21 --========================= |
22 --SASL ANONYMOUS according to RFC 4505 | 22 --SASL ANONYMOUS according to RFC 4505 |
23 | |
24 --[[ | |
25 Supported Authentication Backends | |
26 | |
27 anonymous: | |
28 function(username, realm) | |
29 return true; --for normal usage just return true; if you don't like the supplied username you can return false. | |
30 end | |
31 ]] | |
32 | |
23 local function anonymous(self, message) | 33 local function anonymous(self, message) |
24 local username; | 34 local username; |
25 repeat | 35 repeat |
26 username = generate_uuid(); | 36 username = generate_uuid(); |
27 until self.profile.anonymous(username, self.realm); | 37 until self.profile.anonymous(username, self.realm); |