Comparison

util/sasl.lua @ 3092:d32935878661

util.sasl: Moving SASL authentication backends documentation to the mechanism files.
author Tobias Markmann <tm@ayena.de>
date Sun, 28 Feb 2010 22:32:12 +0100
parent 2925:692b3c6c5bd2
child 3116:90a98a6b52ac
comparison
equal deleted inserted replaced
3091:d6a059af2077 3092:d32935878661
39 Authentication Backend Prototypes: 39 Authentication Backend Prototypes:
40 40
41 state = false : disabled 41 state = false : disabled
42 state = true : enabled 42 state = true : enabled
43 state = nil : non-existant 43 state = nil : non-existant
44
45 plain:
46 function(username, realm)
47 return password, state;
48 end
49
50 plain-test:
51 function(username, realm, password)
52 return true or false, state;
53 end
54
55 digest-md5:
56 function(username, domain, realm, encoding) -- domain and realm are usually the same; for some broken
57 -- implementations it's not
58 return digesthash, state;
59 end
60
61 digest-md5-test:
62 function(username, domain, realm, encoding, digesthash)
63 return true or false, state;
64 end
65 ]] 44 ]]
66 45
67 local method = {}; 46 local method = {};
68 method.__index = method; 47 method.__index = method;
69 local mechanisms = {}; 48 local mechanisms = {};