mod_httpserver: Serve index.html if a request is made for a directory and it contains...
[prosody.git] / util / sasl.lua
index eb71956b692aa5942bf0690b4787865132f588ce..c9225f0d776436ab1ad0d44b456318392fc43d71 100644 (file)
@@ -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 = {};
@@ -129,11 +108,8 @@ function method:select(mechanism)
                return false;
        end
        
-       self.mech_i = mechanisms[mechanism]
-       if self.mech_i == nil then 
-               return false;
-       end
-       return true;
+       self.mech_i = mechanisms[mechanism];
+       return (self.mech_i ~= nil);
 end
 
 -- feed new messages to process into the library