Software / code / prosody
Comparison
plugins/mod_auth_anonymous.lua @ 3981:2b0b8fe68df2
util.sasl.*, mod_auth_*, mod_saslauth: Pass SASL handler as first parameter to SASL profile callbacks.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Mon, 27 Dec 2010 19:57:04 +0500 |
| parent | 3425:26751c628207 |
| child | 4160:f08f649b898b |
comparison
equal
deleted
inserted
replaced
| 3980:6b2fac6602b3 | 3981:2b0b8fe68df2 |
|---|---|
| 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; | 37 local realm = module:get_option("sasl_realm") or module.host; |
| 38 local anonymous_authentication_profile = { | 38 local anonymous_authentication_profile = { |
| 39 anonymous = function(username, realm) | 39 anonymous = function(sasl, username, realm) |
| 40 return true; -- for normal usage you should always return true here | 40 return true; -- for normal usage you should always return true here |
| 41 end | 41 end |
| 42 }; | 42 }; |
| 43 return new_sasl(realm, anonymous_authentication_profile); | 43 return new_sasl(realm, anonymous_authentication_profile); |
| 44 end | 44 end |