public function isValid($value, array $context = null)
    {
        $context = (array) $context;

         if (!array_key_exists($this->identity, $context) || empty($context[$this->identity])) {
//             $this->error(self::IDENTITY_EMPTY);
             return false;
         }
        
         if (!array_key_exists($this->credential, $context) || empty($context[$this->credential])) {
//             $this->error(self::CREDENTIAL_EMPTY);
             return false;
         }
        
        $authAdapter = $this->auth->getAdapter();
        $authAdapter->setIdentity($context[$this->identity]);
        $authAdapter->setCredential($context[$this->credential]);
        
        $result = $this->authResult = $this->auth->authenticate();
        
        if (!$result->isValid()) {
            $this->error($result->getCode());
            return false;
        }
        
        return true;
    }