Comparison

plugins/mod_saslauth.lua @ 12641:e9865b0cfb89

mod_saslauth: Rename field from 'scope'->'role' The 'scope' term derives from OAuth, and represents a bundle of permissions. We're now setting on the term 'role' for a bundle of permissions. This change does not affect any public modules I'm aware of.
author Matthew Wild <mwild1@gmail.com>
date Wed, 15 Jun 2022 11:47:39 +0100
parent 12594:29685403be32
child 12718:27a4a7e64831
comparison
equal deleted inserted replaced
12640:999b1c59af6f 12641:e9865b0cfb89
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