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); |