protected function retrieveUserByCredentials(array $credentials)
    {
        $class = $this->modelClass();

        $identifier = $class::getAuthIdentifierName();
        $password   = $class::getAuthPasswordName();

        $user = $this->retrieveUserByIdentifier(Arr::fetch($credentials, $identifier));

        if ($user) {
            /** @var \Phalcon\Security $security */
            $security = $this->{Services::SECURITY};

            if($security->checkHash(Arr::fetch($credentials, $password), $user->getAuthPassword())){
                return $user;
            }
        }

        return null;
    }