Comparison

plugins/mod_auth_internal_hashed.lua @ 4060:52b437eb7059

mod_auth_internal_*: Support for delete_user method
author Matthew Wild <mwild1@gmail.com>
date Tue, 04 Jan 2011 17:12:28 +0000
parent 4049:fe6f4a255fd8
child 4160:f08f649b898b
comparison
equal deleted inserted replaced
4059:cfdcad1782aa 4060:52b437eb7059
133 local stored_key_hex = to_hex(stored_key); 133 local stored_key_hex = to_hex(stored_key);
134 local server_key_hex = to_hex(server_key); 134 local server_key_hex = to_hex(server_key);
135 return datamanager.store(username, host, "accounts", {stored_key = stored_key_hex, server_key = server_key_hex, salt = salt, iteration_count = iteration_count}); 135 return datamanager.store(username, host, "accounts", {stored_key = stored_key_hex, server_key = server_key_hex, salt = salt, iteration_count = iteration_count});
136 end 136 end
137 137
138 function provider.delete_user(username)
139 return datamanager.store(username, host, "accounts", nil);
140 end
141
138 function provider.get_sasl_handler() 142 function provider.get_sasl_handler()
139 local realm = module:get_option("sasl_realm") or module.host; 143 local realm = module:get_option("sasl_realm") or module.host;
140 local testpass_authentication_profile = { 144 local testpass_authentication_profile = {
141 plain_test = function(sasl, username, password, realm) 145 plain_test = function(sasl, username, password, realm)
142 local prepped_username = nodeprep(username); 146 local prepped_username = nodeprep(username);