I added a setting for the authenticator class name, used to create an Authenticator object: $this->Authenticator = $this->ObjectFactory->NewContextObject($this, $this->Configuration['AUTHENTICATION_CLASS']);
So that you can extend authenticator to write your own authenticator.
However it might be better to have something like: $Configuration['OBJECT_FACTORY_REFERENCE_AUTHENTICATOR'] = 'MyAuthenticator'; And use OBJECT_FACTORY_REFERENCE_* to set object factory references automatically after the object factory instance is created in the Context constructor. That would allow to extend anything, even instances created before the extensions are loaded.
You have to manually include the class file you want to replace for other objects... Also I think we already have a setting that does this in appg/settings.php:
// People Settings $Configuration['AUTHENTICATION_MODULE'] = 'People/People.Class.Authenticator.php';
Yep, and I added Configuration['AUTHENTICATION_CLASS'] so that we can do "class MyAuthenticator extends Authenticator" so that we just have to rewrite the authenticate method.
Should I add $Configuration['USER_MANAGER_MODULE'] or $Configuration['HEAD_CONTROLLER_MODULE'] plus a settings for the class name if someone needs it?
An other solution would be to have $Configuration['LIBRARY_INCLUDE_PATH'] = '%LIBRARY%;%EXTENSIONS%/myextension/library'; that the object factory would look into.
To force vanilla to use MyUserManager, defined in /Path/to/extensions/MyExtension/library/People/People.Class.MyUserManager.php : // conf/settings.php ... $Configuration['OBJECT_FACTORY_REFERENCE_USER_MANAGER'] = 'MyUserManager'; $Configuration['LIBRARY_INCLUDE_PATH'] = '%LIBRARY%;%EXTENSIONS%/MyExtension/libary/';