114 if message == "" or message == nil then return "failure", "malformed-request" end |
114 if message == "" or message == nil then return "failure", "malformed-request" end |
115 return self.mech_i(self, message); |
115 return self.mech_i(self, message); |
116 end |
116 end |
117 |
117 |
118 --========================= |
118 --========================= |
119 --SASL PLAIN |
119 --SASL PLAIN according to RFC 4616 |
120 local function sasl_mechanism_plain(self, message) |
120 local function sasl_mechanism_plain(self, message) |
121 local response = message |
121 local response = message |
122 local authorization = s_match(response, "([^%z]+)") |
122 local authorization = s_match(response, "([^%z]+)") |
123 local authentication = s_match(response, "%z([^%z]+)%z") |
123 local authentication = s_match(response, "%z([^%z]+)%z") |
124 local password = s_match(response, "%z[^%z]+%z([^%z]+)") |
124 local password = s_match(response, "%z[^%z]+%z([^%z]+)") |