ZF-7546: Issue with multiple autentication, store only succes result

Issue Type: Bug Created: 2009-08-10T03:39:59.000+0000 Last Updated: 2009-09-08T20:35:49.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: Ondrej Sibrina (elsecz) Assignee: Ralph Schindler (ralph) Tags: - Zend_Auth

Related issues: Attachments:


As you can see only good result is saved. If autentication is wrong, then result is ignored and it's not stored. But return is false. That's right.

<pre class="highlight">
public function authenticate(Zend_Auth_Adapter_Interface $adapter)
        $result = $adapter->authenticate();

        if ($result->isValid()) {

        return $result;

Real issue rise up with redirection Zend_Auth::getIdentity(). It returns succes result.

<pre class="highlight">
 public function getIdentity()
        $storage = $this->getStorage();

        if ($storage->isEmpty()) {
            return null;

        return $storage->read();

So there're two ways how to get result of autenticate but unfortunately it gives another result:

<pre class="highlight">
$this->_auth->authenticate(new My_Auth_Adapter_User("","******")); // success
$result = $this->_auth->authenticate(new My_Auth_Adapter_User("","wrong password")); //failure

echo $this->_auth->getIdentity()."<br></br>";  // print ""
echo $result->getIdentity()."<br></br>"; // print ""

I hope you understand, what i'm talking about. I think it should gives defaultly failure in both ways.


Posted by Ralph Schindler (ralph) on 2009-09-08T20:35:43.000+0000

Fixed in 18038 in trunk and 18039 in 1.9 branch

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.