I had to implement another implicitAuth plugin different from Shibboleth. I used its code to generate mine and it was a great reference, but there is one simple change that has to be done to Shibboleth plugin and to core to allow different systems than Shibboleth. I think it would be great that OJS allowed us developers to do this without any change to core.
On Shibboleth's source there is a clue about what the problem is:
At /plugins/implicitAuth/shibboleth/ShibAuthPlugin.inc.php, line 11 we can find:
- Code: Select all
// If there ends up being another implicitAuth plugin - then this registration statement
// should be removed - so that the other plugin gets called
HookRegistry::register('ImplicitAuthPlugin::implicitAuth', array(&$this, 'implicitAuth'));
Obviously it does not look like a great idea to change Shibboleth code so the system can use other implicitAuth plugins, that's why my proposal would be to add a new line on config.inc.php [security] block just after the implicit_auth definition, defaulting to Shibboleth:
- Code: Select all
;Is implicit authentication enabled or not
;implicit_auth = On
;implicit_auth_plugin_name = ShibAuthPlugin
then, the /plugins/implicitAuth/shibboleth/ShibAuthPlugin.inc.php code I quoted before could be changed by:
- Code: Select all
// Only load this plugin's hooks if it is selected in config file
if( Config::getVar('security', 'implicit_auth_plugin_name') == $this->getName() ){
HookRegistry::register('ImplicitAuthPlugin::implicitAuth', array(&$this, 'implicitAuth'));
}
and should be added to Shibboleth plugin and any other implicitAuth plugins somebody might like to create. I think this forum is the right place to contact on this subject with OJS devs, but I am quite new to OJS so, if it isn't, I would be happy to go wherever you point me to.
I hope somebody has interest on this subject and would be happy to discuss on it. Oh! my plugin is about using Drupal auth system, I didn't find anything on the forums, but if somebody has some ideas on it I would be glad to know them.
cheers.
