I am the author of that piece of code and I do not really want an authentication system directly in the plugin. It should be configured in the system because then you can use the same authentication server in other components (like VPN) as well and you also get the tester in the UI for debugging. For your Server, you only need one small class in this directory: https://github.com/opnsense/core/tree/master/src/opnsense/mvc/app/library/OPNsense/Auth