mod_saslauth: Pass through any auth scope from the SASL handler to sessionmanager.make_authenticated()
authorMatthew Wild <mwild1@gmail.com>
Wed, 05 Feb 2020 17:56:44 +0000
changeset 10647 417eadd0f567
parent 10646 de90b2f5da8c
child 10648 6c4ab1b87588
mod_saslauth: Pass through any auth scope from the SASL handler to sessionmanager.make_authenticated()
plugins/mod_saslauth.lua
--- a/plugins/mod_saslauth.lua	Wed Feb 05 17:56:20 2020 +0000
+++ b/plugins/mod_saslauth.lua	Wed Feb 05 17:56:44 2020 +0000
@@ -49,7 +49,7 @@
 		module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg });
 		session.sasl_handler = session.sasl_handler:clean_clone();
 	elseif status == "success" then
-		local ok, err = sm_make_authenticated(session, session.sasl_handler.username);
+		local ok, err = sm_make_authenticated(session, session.sasl_handler.username, session.sasl_handler.scope);
 		if ok then
 			module:fire_event("authentication-success", { session = session });
 			session.sasl_handler = nil;