Software /
code /
prosody
Comparison
plugins/mod_auth_anonymous.lua @ 4191:dfeae208e5b4
mod_auth_*: Get rid of undocumented and broken 'sasl_realm' config option.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 23 Feb 2011 01:34:46 +0500 |
parent | 4049:fe6f4a255fd8 |
child | 4765:21eb0b86c904 |
comparison
equal
deleted
inserted
replaced
4190:6f509033f855 | 4191:dfeae208e5b4 |
---|---|
32 function provider.create_user(username, password) | 32 function provider.create_user(username, password) |
33 return nil, "Account creation/modification not supported."; | 33 return nil, "Account creation/modification not supported."; |
34 end | 34 end |
35 | 35 |
36 function provider.get_sasl_handler() | 36 function provider.get_sasl_handler() |
37 local realm = module:get_option("sasl_realm") or module.host; | |
38 local anonymous_authentication_profile = { | 37 local anonymous_authentication_profile = { |
39 anonymous = function(sasl, username, realm) | 38 anonymous = function(sasl, username, realm) |
40 return true; -- for normal usage you should always return true here | 39 return true; -- for normal usage you should always return true here |
41 end | 40 end |
42 }; | 41 }; |
43 return new_sasl(realm, anonymous_authentication_profile); | 42 return new_sasl(module.host, anonymous_authentication_profile); |
44 end | 43 end |
45 | 44 |
46 return provider; | 45 return provider; |
47 end | 46 end |
48 | 47 |