private function authenticateWithoutEncoder(TokenInterface $token, UserInterface $user)
    {
        if (null !== $user->getSalt() &&
                call_user_func($user->getSalt(), $token->getCredentials()) === $user->getPassword()) {
            return new UsernamePasswordToken($user, $user->getPassword(), $user->getRoles());
        } elseif ($token->getCredentials() === $user->getPassword()) {
            return new UsernamePasswordToken($user, $user->getPassword(), $user->getRoles());
        } else {
            return false;
        }
    }