comparison plugins/mod_saslauth.lua @ 12674:72f431b4dc2c

Merge role-auth->trunk
author Matthew Wild <mwild1@gmail.com>
date Mon, 22 Aug 2022 13:53:35 +0100
parents e9865b0cfb89
children 27a4a7e64831
comparison
equal deleted inserted replaced
12639:6d9ee0a3eb4b 12674:72f431b4dc2c
50 end 50 end
51 if status == "failure" then 51 if status == "failure" then
52 module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg }); 52 module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg });
53 session.sasl_handler = session.sasl_handler:clean_clone(); 53 session.sasl_handler = session.sasl_handler:clean_clone();
54 elseif status == "success" then 54 elseif status == "success" then
55 local ok, err = sm_make_authenticated(session, session.sasl_handler.username, session.sasl_handler.scope); 55 local ok, err = sm_make_authenticated(session, session.sasl_handler.username, session.sasl_handler.role);
56 if ok then 56 if ok then
57 module:fire_event("authentication-success", { session = session }); 57 module:fire_event("authentication-success", { session = session });
58 session.sasl_handler = nil; 58 session.sasl_handler = nil;
59 session:reset_stream(); 59 session:reset_stream();
60 else 60 else