I would proceed with the duplication of the core db auth plugin's settings. This will enable you to not mess up the core auth workflow and just disable the core db auth plugin and use only your own instead. But you'll have to duplicate some more code of the core plugin which handles the settings.
General developer forum
Modify external DB authentication login script
This discussion has been locked so you can no longer reply to it.