Changeset

2177:8505e1da5408 sasl

Adding some docu.
author Tobias Markmann <tm@ayena.de>
date Sun, 16 Aug 2009 23:20:02 +0200
parents 2176:aaf2b2df61f7
children 2178:28d841403a21
files util/sasl.lua
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl.lua	Mon Aug 10 23:04:19 2009 +0200
+++ b/util/sasl.lua	Sun Aug 16 23:20:02 2009 +0200
@@ -37,6 +37,30 @@
 local array = require "util.array"
 module "sasl"
 
+--[[
+Authentication Backend Prototypes:
+
+plain:
+	function(username, realm)
+		return password, state;
+	end
+
+plain-test:
+	function(username, realm, password)
+		return true or false, state;
+	end
+
+digest-md5:
+	function(username, realm, encoding)
+		return digesthash, state;
+	end
+
+digest-md5-test:
+	function(username, realm, encoding, digesthash)
+		return true or false, state;
+	end
+]]
+
 local method = {};
 method.__index = method;
 local mechanisms = {};
@@ -71,6 +95,7 @@
 				end
 		end
 	end
+	self["possible_mechanisms"] = mechanisms;
 	return array.collect(keys(mechanisms));
 end