Loading src/UnicaenAuth/Authentication/Adapter/Cas.php +3 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; use Zend\Router\Http\TreeRouteStack; use ZfcUser\Authentication\Adapter\AbstractAdapter; use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; use ZfcUser\Authentication\Adapter\AdapterChainEvent; use ZfcUser\Authentication\Adapter\ChainableAdapter; /** Loading Loading @@ -78,14 +78,12 @@ class Cas extends AbstractAdapter implements EventManagerAwareInterface /** * Réalise l'authentification. * * @param Event $e * @param AdapterChainEvent $e * @throws UnexpectedValueException * @see ChainableAdapter */ public function authenticate(Event $e) public function authenticate(AdapterChainEvent $e) { $e = $e->getTarget(); // if ($e->getIdentity()) { // return; // } Loading src/UnicaenAuth/Authentication/Adapter/Db.php +7 −8 Original line number Diff line number Diff line Loading @@ -7,8 +7,7 @@ use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface; use UnicaenApp\ServiceManager\ServiceLocatorAwareTrait; use UnicaenAuth\Options\ModuleOptions; use Zend\ServiceManager\Exception\ServiceNotFoundException; use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; use ZfcUser\Options\AuthenticationOptionsInterface; use ZfcUser\Authentication\Adapter\AdapterChainEvent; /** * Adpater d'authentification à partir de la base de données. Loading Loading @@ -40,13 +39,13 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwa /** * Authentification. * * @param AuthEvent|\Zend\EventManager\Event $e * @param AdapterChainEvent $e * @return boolean */ public function authenticate(\Zend\EventManager\Event $e) public function authenticate(AdapterChainEvent $e) { if ($e->getTarget()->getIdentity()) { return; if ($e->getIdentity()) { return true; } try { Loading @@ -60,10 +59,10 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwa } /** * @param AuthenticationOptionsInterface $options * @param \ZfcUser\Options\ModuleOptions $options * @return self */ public function setOptions(AuthenticationOptionsInterface $options) public function setOptions(\ZfcUser\Options\ModuleOptions $options) { $this->options = $options; return $this; Loading src/UnicaenAuth/Authentication/Adapter/Ldap.php +3 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; use ZfcUser\Authentication\Adapter\AbstractAdapter; use ZfcUser\Authentication\Adapter\AdapterChainEvent; use ZfcUser\Authentication\Adapter\ChainableAdapter; /** Loading Loading @@ -78,16 +79,14 @@ class Ldap extends AbstractAdapter implements EventManagerAwareInterface /** * * @param Event $e * @param AdapterChainEvent $e * @return boolean * @throws \Zend\Authentication\Adapter\Exception\ExceptionInterface * @throws \Zend\Ldap\Exception\LdapException * @see ChainableAdapter */ public function authenticate(Event $e) public function authenticate(AdapterChainEvent $e) { $e = $e->getTarget(); if ($this->isSatisfied()) { try { $storage = $this->getStorage()->read(); Loading Loading
src/UnicaenAuth/Authentication/Adapter/Cas.php +3 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; use Zend\Router\Http\TreeRouteStack; use ZfcUser\Authentication\Adapter\AbstractAdapter; use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; use ZfcUser\Authentication\Adapter\AdapterChainEvent; use ZfcUser\Authentication\Adapter\ChainableAdapter; /** Loading Loading @@ -78,14 +78,12 @@ class Cas extends AbstractAdapter implements EventManagerAwareInterface /** * Réalise l'authentification. * * @param Event $e * @param AdapterChainEvent $e * @throws UnexpectedValueException * @see ChainableAdapter */ public function authenticate(Event $e) public function authenticate(AdapterChainEvent $e) { $e = $e->getTarget(); // if ($e->getIdentity()) { // return; // } Loading
src/UnicaenAuth/Authentication/Adapter/Db.php +7 −8 Original line number Diff line number Diff line Loading @@ -7,8 +7,7 @@ use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface; use UnicaenApp\ServiceManager\ServiceLocatorAwareTrait; use UnicaenAuth\Options\ModuleOptions; use Zend\ServiceManager\Exception\ServiceNotFoundException; use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; use ZfcUser\Options\AuthenticationOptionsInterface; use ZfcUser\Authentication\Adapter\AdapterChainEvent; /** * Adpater d'authentification à partir de la base de données. Loading Loading @@ -40,13 +39,13 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwa /** * Authentification. * * @param AuthEvent|\Zend\EventManager\Event $e * @param AdapterChainEvent $e * @return boolean */ public function authenticate(\Zend\EventManager\Event $e) public function authenticate(AdapterChainEvent $e) { if ($e->getTarget()->getIdentity()) { return; if ($e->getIdentity()) { return true; } try { Loading @@ -60,10 +59,10 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwa } /** * @param AuthenticationOptionsInterface $options * @param \ZfcUser\Options\ModuleOptions $options * @return self */ public function setOptions(AuthenticationOptionsInterface $options) public function setOptions(\ZfcUser\Options\ModuleOptions $options) { $this->options = $options; return $this; Loading
src/UnicaenAuth/Authentication/Adapter/Ldap.php +3 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; use ZfcUser\Authentication\Adapter\AbstractAdapter; use ZfcUser\Authentication\Adapter\AdapterChainEvent; use ZfcUser\Authentication\Adapter\ChainableAdapter; /** Loading Loading @@ -78,16 +79,14 @@ class Ldap extends AbstractAdapter implements EventManagerAwareInterface /** * * @param Event $e * @param AdapterChainEvent $e * @return boolean * @throws \Zend\Authentication\Adapter\Exception\ExceptionInterface * @throws \Zend\Ldap\Exception\LdapException * @see ChainableAdapter */ public function authenticate(Event $e) public function authenticate(AdapterChainEvent $e) { $e = $e->getTarget(); if ($this->isSatisfied()) { try { $storage = $this->getStorage()->read(); Loading