aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2010-02-28 22:32:12 +0100
committerTobias Markmann <tm@ayena.de>2010-02-28 22:32:12 +0100
commit03e17022ef1117321cd3898e7282f396692d824a (patch)
tree5c61f5101f00dc2189e6e5936f7cf592bf97da9f /util
parent8abd2f2c24bd83acb36e9c8ace40ac3751f09663 (diff)
downloadprosody-03e17022ef1117321cd3898e7282f396692d824a.tar.gz
prosody-03e17022ef1117321cd3898e7282f396692d824a.zip
util.sasl: Moving SASL authentication backends documentation to the mechanism files.
Diffstat (limited to 'util')
-rw-r--r--util/sasl.lua21
-rw-r--r--util/sasl/digest-md5.lua15
-rw-r--r--util/sasl/plain.lua15
3 files changed, 30 insertions, 21 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index eb71956b..306acc0c 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -41,27 +41,6 @@ Authentication Backend Prototypes:
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 --git a/util/sasl/digest-md5.lua b/util/sasl/digest-md5.lua
index 04acf04d..fc2107bc 100644
--- a/util/sasl/digest-md5.lua
+++ b/util/sasl/digest-md5.lua
@@ -29,6 +29,21 @@ module "digest-md5"
--=========================
--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 --git a/util/sasl/plain.lua b/util/sasl/plain.lua
index ae5c777a..43bb239f 100644
--- a/util/sasl/plain.lua
+++ b/util/sasl/plain.lua
@@ -19,6 +19,21 @@ module "plain"
-- ================================
-- 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";