194 local backend = sasl_handler.profile[backend_profile_name]; |
194 local backend = sasl_handler.profile[backend_profile_name]; |
195 local authc_username, token_hash = message:match("^([^%z]+)%z(.+)$"); |
195 local authc_username, token_hash = message:match("^([^%z]+)%z(.+)$"); |
196 if not authc_username then |
196 if not authc_username then |
197 return "failure", "malformed-request"; |
197 return "failure", "malformed-request"; |
198 end |
198 end |
|
199 if not sasl_handler.profile.cb then |
|
200 module:log("warn", "Attempt to use channel binding %s with SASL profile that does not support any channel binding (FAST: %s)", cb_name, sasl_handler.fast); |
|
201 return "failure", "malformed-request"; |
|
202 elseif not sasl_handler.profile.cb[cb_name] then |
|
203 module:log("warn", "SASL profile does not support %s channel binding (FAST: %s)", cb_name, sasl_handler.fast); |
|
204 return "failure", "malformed-request"; |
|
205 end |
199 local cb_data = cb_name and sasl_handler.profile.cb[cb_name](sasl_handler) or ""; |
206 local cb_data = cb_name and sasl_handler.profile.cb[cb_name](sasl_handler) or ""; |
200 local ok, authz_username, response, rotation_needed = backend( |
207 local ok, authz_username, response, rotation_needed = backend( |
201 mechanism_name, |
208 mechanism_name, |
202 authc_username, |
209 authc_username, |
203 sasl_handler.client_id, |
210 sasl_handler.client_id, |