by mwood » Wed Oct 28, 2009 11:34 am
There seem to be several kinds of auth plugin settings. The ones described in the custom template (plugins/auth/foo/settings.tpl) seem to be stored serialize()d in the auth_sources table, and they're fed to getInstance(settings,authId) by AuthSourceDAO::getPlugin() but I haven't yet found out what circumstances cause that. At any rate, my getInstance isn't being called by anything I've tried so far. The plugin class constructor takes an array of settings as an argument, but I can't find any example in which the wrapper script (plugins/auth/foo/index.php) gives them. There's the plugin_settings table but auth plugins don't seem to use it. The Technical Reference doesn't seem to say much of anything about plugin settings, except that they are like journal settings, which I don't see described.
The authentication-source configuration page is working fine -- it offers the content of my template and I can see that my choices were recorded in auth_sources. But my plugin always receives an empty array when instantiated. (And no wonder: the wrapper passes an empty argument list to the constructor.) The LDAP plugin, OTOH, seems to get values in its settings[] from somewhere, and its wrapper is the same. (In fact IIRC I started by copying the LDAP plugin and ripping out all the LDAP-specific code.) What should I be reading to make sense of it all?
I'm currently hacking on 2.2.1 since that's what we're running just now.