library/Rediska/Zend/Auth/Adapter/Redis.php
public function authenticate()
    {
        $identity = $this->getIdentity();

        $userIdKey = str_replace('*', $identity, $this->getOption('userIdKey'));

        $userId = $this->getRediska()->get($userIdKey);

        if (is_null($userId)) {
            $code    = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;
            $message = 'User with the supplied identity could not be found.';
        } else {
            $userDataKey = str_replace('*', $userId, $this->getOption('userDataKey'));

            $userData = $this->getRediska()->get($userDataKey);

            if (is_null($userData)) {
                throw new Zend_Auth_Adapter_Exception("User data key '$userDataKey' not found");
            }

            $credentialAttributeName = $this->getOption('credentialAttributeName');
            if ($this->getOption('userDataIsArray')) {
                if (!array_key_exists($credentialAttributeName, $userData)) {
                    throw new Zend_Auth_Adapter_Exception("Credential key with name '$credentialAttributeName' not found in user data");
                }
                $credential = $userData[$credentialAttributeName];
            } else {
                if (!isset($userData->$credentialAttributeName)) {
                    throw new Zend_Auth_Adapter_Exception("Credential attribute with name '$credentialAttributeName' not found in user data");
                }
                $credential = $userData->$credentialAttributeName;
            }

            if ($this->getCredential() == $credential) {
                $code     = Zend_Auth_Result::SUCCESS;
                $message  = 'Authentication successful.';
                $this->_userData = $userData;
            } else {
                $code     = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID;
                $message  = 'Supplied credential is invalid.';
            }
        }

        return new Zend_Auth_Result($code, $identity, array($message));
    }
public function authenticate()
    {
        $identity = $this->getIdentity();

        $userIdKey = str_replace('*', $identity, $this->getOption('userIdKey'));

        $userId = $this->getRediska()->get($userIdKey);

        if (is_null($userId)) {
            $code    = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;
            $message = 'User with the supplied identity could not be found.';
        } else {
            $userDataKey = str_replace('*', $userId, $this->getOption('userDataKey'));

            $userData = $this->getRediska()->get($userDataKey);

            if (is_null($userData)) {
                throw new Zend_Auth_Adapter_Exception("User data key '$userDataKey' not found");
            }

            $credentialAttributeName = $this->getOption('credentialAttributeName');
            if ($this->getOption('userDataIsArray')) {
                if (!array_key_exists($credentialAttributeName, $userData)) {
                    throw new Zend_Auth_Adapter_Exception("Credential key with name '$credentialAttributeName' not found in user data");
                }
                $credential = $userData[$credentialAttributeName];
            } else {
                if (!isset($userData->$credentialAttributeName)) {
                    throw new Zend_Auth_Adapter_Exception("Credential attribute with name '$credentialAttributeName' not found in user data");
                }
                $credential = $userData->$credentialAttributeName;
            }

            if ($this->getCredential() == $credential) {
                $code     = Zend_Auth_Result::SUCCESS;
                $message  = 'Authentication successful.';
                $this->_userData = $userData;
            } else {
                $code     = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID;
                $message  = 'Supplied credential is invalid.';
            }
        }

        return new Zend_Auth_Result($code, $identity, array($message));
    }
(non-PHPdoc)
@see Zend_Auth_Adapter_Interface#authenticate()