Comparison

util/sasl/anonymous.lua @ 6777:5de6b93d0190

util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author Kim Alvefur <zash@zash.se>
date Sat, 21 Feb 2015 10:36:37 +0100
parent 4113:65482a852c4d
child 7215:a81d9a6e288f
comparison
equal deleted inserted replaced
6774:3965662ae091 6777:5de6b93d0190
14 local s_match = string.match; 14 local s_match = string.match;
15 15
16 local log = require "util.logger".init("sasl"); 16 local log = require "util.logger".init("sasl");
17 local generate_uuid = require "util.uuid".generate; 17 local generate_uuid = require "util.uuid".generate;
18 18
19 module "sasl.anonymous" 19 local _ENV = nil;
20 20
21 --========================= 21 --=========================
22 --SASL ANONYMOUS according to RFC 4505 22 --SASL ANONYMOUS according to RFC 4505
23 23
24 --[[ 24 --[[
37 until self.profile.anonymous(self, username, self.realm); 37 until self.profile.anonymous(self, username, self.realm);
38 self.username = username; 38 self.username = username;
39 return "success" 39 return "success"
40 end 40 end
41 41
42 function init(registerMechanism) 42 local function init(registerMechanism)
43 registerMechanism("ANONYMOUS", {"anonymous"}, anonymous); 43 registerMechanism("ANONYMOUS", {"anonymous"}, anonymous);
44 end 44 end
45 45
46 return _M; 46 return {
47 init = init;
48 }