Software /
code /
prosody
Comparison
util/sasl.lua @ 2181:d5cd6a868959 sasl
List RFC numbers.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Fri, 28 Aug 2009 19:43:33 +0200 |
parent | 2180:8de2f7f5b870 |
child | 2182:27c7d287345e |
comparison
equal
deleted
inserted
replaced
2180:8de2f7f5b870 | 2181:d5cd6a868959 |
---|---|
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]+)") |
147 return "failure", "not-authorized"; | 147 return "failure", "not-authorized"; |
148 end | 148 end |
149 end | 149 end |
150 registerMechanism("PLAIN", {"plain", "plain_test"}, sasl_mechanism_plain); | 150 registerMechanism("PLAIN", {"plain", "plain_test"}, sasl_mechanism_plain); |
151 | 151 |
152 --========================= | |
153 --SASL DIGEST-MD5 | |
152 return _M; | 154 return _M; |