I need intercept the login event, I have been tried through events, but not work as I have been expected.
/**
* @return array
*/
public function registerEvents()
{
$hooks = array(
// 'Request.initAuthenticationObject' => 'initAuthenticationObject',
// 'API.Request.authenticate' => 'ApiRequestAuthenticate',
// 'Request.dispatch' => 'RequestDispatch'
);
return $hooks;
}
That depends on what you are trying to do. There are events posted before and after the login like
Login.authenticate
andLogin.authenticate.failed
,Login.authenticate.successful