diff --git a/src/UnicaenAuthentification/Authentication/Adapter/AdapterChain.php b/src/UnicaenAuthentification/Authentication/Adapter/AdapterChain.php index 91f3c66ad531519425453a102be4ef4eca228bc6..c4ba52bdf6f2c8b367262ff2b9d697ef17e392bd 100644 --- a/src/UnicaenAuthentification/Authentication/Adapter/AdapterChain.php +++ b/src/UnicaenAuthentification/Authentication/Adapter/AdapterChain.php @@ -23,20 +23,20 @@ class AdapterChain extends \ZfcUser\Authentication\Adapter\AdapterChain $this->getEventManager()->trigger('authenticate.pre', $e); $result = $this->getEventManager()->triggerUntil(function ($result) { - return $result === true || $result instanceof Response; + return $result instanceof Response; }, 'authenticate', $e); if ($result->stopped()) { $last = $result->last(); - if ($last === true || $last instanceof Response) { + if ($last instanceof Response) { return $last; } -// throw new Exception\AuthenticationEventException( -// sprintf( -// 'Auth event was stopped without a response. Got "%s" instead', -// is_object($result->last()) ? get_class($result->last()) : gettype($result->last()) -// ) -// ); + throw new Exception\AuthenticationEventException( + sprintf( + 'Auth event was stopped without a response. Got "%s" instead', + is_object($result->last()) ? get_class($result->last()) : gettype($result->last()) + ) + ); } if ($e->getIdentity()) { diff --git a/src/UnicaenAuthentification/Authentication/Adapter/LocalAdapter.php b/src/UnicaenAuthentification/Authentication/Adapter/LocalAdapter.php index cef184714790d9f0d2c0a0c6117313f63dd85e1c..893697197ffda4bc2cc8e7ab18ade605a10825d0 100644 --- a/src/UnicaenAuthentification/Authentication/Adapter/LocalAdapter.php +++ b/src/UnicaenAuthentification/Authentication/Adapter/LocalAdapter.php @@ -58,7 +58,7 @@ class LocalAdapter extends AbstractAdapter // ); } - return true; + return false; } /** diff --git a/src/UnicaenAuthentification/Authentication/Storage/ChainEvent.php b/src/UnicaenAuthentification/Authentication/Storage/ChainEvent.php index 18ccbbc50a28a4f4fab461b152e23e3d9cf945d0..21b5b08d3b39cba2d4ca3f8247589e90ace9b329 100644 --- a/src/UnicaenAuthentification/Authentication/Storage/ChainEvent.php +++ b/src/UnicaenAuthentification/Authentication/Storage/ChainEvent.php @@ -8,9 +8,9 @@ use Zend\EventManager\Event; * utilisé pour collecter les diverses données concernant l'identité authentifiée. * * Exemples de données collectées : - * - <code>array('ldap' => object(UnicaenApp\Entity\Ldap\People), 'db' => object(UnicaenAuth\Entity\Db\User))</code> + * - <code>array('ldap' => object(UnicaenApp\Entity\Ldap\People), 'db' => object(UnicaenUtilisateur\Entity\Db\User))</code> * - <code>array('ldap' => object(UnicaenApp\Entity\Ldap\People), 'db' => null)</code> - * - <code>array('ldap' => null, 'db' => object(UnicaenAuth\Entity\Db\User))</code> + * - <code>array('ldap' => null, 'db' => object(UnicaenUtilisateur\Entity\Db\User))</code> * - <code>array('ldap' => null, 'db' => null)</code> * * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> diff --git a/view/unicaen-authentification/auth/login-tabs.phtml b/view/unicaen-authentification/auth/login-tabs.phtml index b22f9a9764402ea06db97b18b86d26799abb60d1..9a9c087fecb333d2e2d9c64d64a674449a9e1027 100644 --- a/view/unicaen-authentification/auth/login-tabs.phtml +++ b/view/unicaen-authentification/auth/login-tabs.phtml @@ -26,7 +26,7 @@ $form->setAttributes([ /** @var AbstractConnectViewHelper[] $helpers */ $helpers = []; foreach ($types as $t => $config) { - $helpers[$t] = $this->connect($t, $form); /** @see \UnicaenAuth\View\Helper\ConnectViewHelper */ + $helpers[$t] = $this->connect($t, $form); /** @see \UnicaenAuthentification\View\Helper\ConnectViewHelper */ } $activeHelper = null;