comparison mod_sasl2_fast/mod_sasl2_fast.lua @ 5077:e900bbd2e70d

mod_sasl2_fast: Remove X-TOKEN-PLAIN and related profile handler
author Matthew Wild <mwild1@gmail.com>
date Sat, 15 Oct 2022 20:26:25 +0100
parents eb46abc65dfd
children 36d3f11724c8
comparison
equal deleted inserted replaced
5076:eb46abc65dfd 5077:e900bbd2e70d
70 end 70 end
71 71
72 function get_sasl_handler() 72 function get_sasl_handler()
73 local token_auth_profile = { 73 local token_auth_profile = {
74 ht_sha_256 = new_token_tester(hash.hmac_sha256); 74 ht_sha_256 = new_token_tester(hash.hmac_sha256);
75 token_test = function (_, client_id, token, mech_name, counter) --luacheck: ignore
76 return false; -- FIXME
77 end;
78 }; 75 };
79 return sasl.new(module.host, token_auth_profile); 76 return sasl.new(module.host, token_auth_profile);
80 end 77 end
81 78
82 -- Advertise FAST to connecting clients 79 -- Advertise FAST to connecting clients
151 }):up(); 148 }):up();
152 end 149 end
153 end 150 end
154 end, 75); 151 end, 75);
155 152
156
157 -- X-PLAIN-TOKEN mechanism
158
159 local function x_plain_token(self, message) --luacheck: ignore 212/self
160 if not message then
161 return nil, "malformed-request";
162 end
163 return nil, "temporary-auth-failure"; -- FIXME
164 end
165
166 sasl.registerMechanism("X-PLAIN-TOKEN", { "token_test" }, x_plain_token);
167
168
169 -- HT-* mechanisms 153 -- HT-* mechanisms
170 154
171 local function new_ht_mechanism(mechanism_name, backend_profile_name, cb_name) 155 local function new_ht_mechanism(mechanism_name, backend_profile_name, cb_name)
172 return function (sasl_handler, message) 156 return function (sasl_handler, message)
173 local backend = sasl_handler.profile[backend_profile_name]; 157 local backend = sasl_handler.profile[backend_profile_name];