Add a plugin entrypoint between setsessioninfo and setmacros
Summary
Several of our users have a need to enhance the session with extra attributes (from an external LDAP, DB, etc), and sometimes using Combination isn't an option (because we're already in Choice or because no userDB module does exactly what we want).
In order to do that, we can create a plugin and populate session attributes in afterData
But usually, users want these plugin-provided attributes to be available earlier than afterData
so they can use the new attributes for 2FA rules, macros...
The solution is to hook the plugin with:
use constant afterSub => {
setSessionInfo => 'run',
};
But since this is a pretty common use case, perhaps we should have a first-class entrypoint for this ?
Design proposition
perhaps a beforeMacros
or earlyData
entrypoint that runs just after setSessionfo ?