# HG changeset patch # User Tobias Markmann # Date 1267392732 -3600 # Node ID 0fa3a7c885bd1a0f3afe55bd8b32092733a00b75 # Parent 21933063dd9f812436c1db422078c7b781741835 util.sasl: Moving SASL authentication backends documentation to the mechanism files. diff -r 21933063dd9f -r 0fa3a7c885bd util/sasl.lua --- a/util/sasl.lua Sun Feb 28 22:23:03 2010 +0100 +++ b/util/sasl.lua Sun Feb 28 22:32:12 2010 +0100 @@ -41,27 +41,6 @@ state = false : disabled state = true : enabled state = nil : non-existant - -plain: - function(username, realm) - return password, state; - end - -plain-test: - function(username, realm, password) - return true or false, state; - end - -digest-md5: - function(username, domain, realm, encoding) -- domain and realm are usually the same; for some broken - -- implementations it's not - return digesthash, state; - end - -digest-md5-test: - function(username, domain, realm, encoding, digesthash) - return true or false, state; - end ]] local method = {}; diff -r 21933063dd9f -r 0fa3a7c885bd util/sasl/digest-md5.lua --- a/util/sasl/digest-md5.lua Sun Feb 28 22:23:03 2010 +0100 +++ b/util/sasl/digest-md5.lua Sun Feb 28 22:32:12 2010 +0100 @@ -29,6 +29,21 @@ --========================= --SASL DIGEST-MD5 according to RFC 2831 +--[[ +Supported Authentication Backends + +digest-md5: + function(username, domain, realm, encoding) -- domain and realm are usually the same; for some broken + -- implementations it's not + return digesthash, state; + end + +digest-md5-test: + function(username, domain, realm, encoding, digesthash) + return true or false, state; + end +]] + local function digest(self, message) --TODO complete support for authzid diff -r 21933063dd9f -r 0fa3a7c885bd util/sasl/plain.lua --- a/util/sasl/plain.lua Sun Feb 28 22:23:03 2010 +0100 +++ b/util/sasl/plain.lua Sun Feb 28 22:32:12 2010 +0100 @@ -19,6 +19,21 @@ -- ================================ -- SASL PLAIN according to RFC 4616 + +--[[ +Supported Authentication Backends + +plain: + function(username, realm) + return password, state; + end + +plain-test: + function(username, realm, password) + return true or false, state; + end +]] + local function plain(self, message) if not message then return "failure", "malformed-request";