Hi all, I'll try to keep this brief but this is related to User.php within the Core and to get the ball rolling on decoupling the requirement of POST data from Input/Password fields.
The problem
There have been many other attempts at Authentication plugins for Contao, if they follow the use of a username & password for credentials then they can use the hooks importUser & checkCredentials to use custom authentication.
However for authentication such as Facebook this requires one of the many hacks:
1) Rewrite entire login process and setting of cookie as demonstrated in FacebookConnect (http://www.contao.org/en/extension-list ... .3.en.html)
2) Patching of User class, as I did in Authentication (http://www.contao.org/en/extension-list ... 39.en.html)
3) Replacing ModuleLogin and manipulating POST data.
Lines such as:
Code:
/**
* Try to login the current user
* @return boolean
*/
public function login()
{
$this->loadLanguageFile('default');
// Do not continue if username or password are missing
if (!$this->Input->post('username') || !$this->Input->post('password'))
{
return false;
}
Are restricting further development to add different authentication types as no hook for custom authentication can be reached without being denied by this logic.
Also, the Login module needs to have template names decoupled from within the class. Ie
Code:
$this->strTemplate = ($this->cols > 1) ? 'mod_login_2cl' : 'mod_login_1cl';
means that you cannot change which template is being used without trickery.
Bookmarks