This commit introduces a generic authentication plugin mechanism
to the LuCI dispatcher, enabling multi-factor authentication
(MFA/2FA) and other custom verification methods without
modifying core files.
This implementation integrates with the new plugin UI architecture
introduced in commit 617f364 (luci-mod-system: implement plugin UI
architecture), allowing authentication plugins to be managed
through the unified System > Plugins interface.
Signed-off-by: Han Yiming <moebest@outlook.jp>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Han Yiming <moebest@outlook.jp>
luci-app-2fa: add priority option and QR code display
This update adds a priority option and enables QR code display for 2FA.
luci-app-2fa: native ubus IPvalid fsLOCK and log
use native ubus IP validation instead of custom regex
and parsing, use native fs lock instead of popen-call
and add log for logging auth events.
now, will clean stale rate limit entries on each check
and log when entries are removed due to staleness.
This prevents the rate limit file from growing
indefinitely with old entries.
luci-app-2fa: move dir and sync sysfixtime
move to the new location. update the default time
calibration threshold to sync sysfixtime.
luci-app-2fa: native hex and more readable
use native hex and base32 decoding functions
Signed-off-by: Han Yiming <moebest@outlook.jp>
include some example plugins also.
JS files provide UI to configure behaviour of plugins
which typically live in
/usr/share/ucode/luci/plugins/<class>/<type>
Signed-off-by: Paul Donald <newtwen+github@gmail.com>