Software /
code /
prosody
Comparison
util/sasl.lua @ 2187:f0a85d11823e sasl
Getting PLAIN mechanism work with the new API.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Fri, 13 Nov 2009 09:21:19 +0100 |
parent | 2186:1112871916eb |
child | 2188:1fd38975addd |
comparison
equal
deleted
inserted
replaced
2186:1112871916eb | 2187:f0a85d11823e |
---|---|
28 local type = type | 28 local type = type |
29 local error = error | 29 local error = error |
30 local print = print | 30 local print = print |
31 local setmetatable = setmetatable; | 31 local setmetatable = setmetatable; |
32 local assert = assert; | 32 local assert = assert; |
33 local dofile = dofile; | |
34 local require = require; | |
33 | 35 |
34 require "util.iterators" | 36 require "util.iterators" |
35 local keys = keys | 37 local keys = keys |
36 | 38 |
37 local array = require "util.array" | 39 local array = require "util.array" |
118 if message == "" or message == nil then return "failure", "malformed-request" end | 120 if message == "" or message == nil then return "failure", "malformed-request" end |
119 return self.mech_i(self, message); | 121 return self.mech_i(self, message); |
120 end | 122 end |
121 | 123 |
122 -- load the mechanisms | 124 -- load the mechanisms |
123 require "sasl.plain" | 125 m = require "util.sasl.plain" |
124 require "sasl.digest-md5" | 126 m.init(registerMechanism) |
125 require "sasl.scram" | 127 --dofile "util/sasl/digest-md5.lua" |
128 --dofile "util/sasl/scram.lua" | |
126 | 129 |
127 return _M; | 130 return _M; |