src/Validator/AuthAdapter.php
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;
    }
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;
    }
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 ; }
Test if authentication is valid

@see \Zend\Validator\ValidatorInterface::isValid()
@param mixed $value
@param array $context
@return boolean
Test if authentication is valid