private function authenticateUser(TokenInterface $token, UserInterface $user)
    {
        if (null === $this->_encoderFactory) {
            return $this->authenticateWithoutEncoder($token, $user);
        } else {
            return $this->authenticateWithEncoder($token, $user);
        }
    }
private function authenticateUser(TokenInterface $token, UserInterface $user)
    {
        if (null === $this->_encoderFactory) {
            return $this->authenticateWithoutEncoder($token, $user);
        } else {
            return $this->authenticateWithEncoder($token, $user);
        }
    }
private function authenticateUser ( TokenInterface $ token , UserInterface $ user ) { if ( null === $ this -> _encoderFactory ) { return $ this -> authenticateWithoutEncoder ( $ token , $ user ) ; } else { return $ this -> authenticateWithEncoder ( $ token , $ user ) ; } }
Authenticate a token accoridng to the user provided.

@param \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token
@param \Symfony\Component\Security\Core\User\UserInterface                  $user

@return boolean|\BackBee\Security\Token\UsernamePasswordToken
Authenticate a token accoridng to the user provided .