protected function getAuthToken($username, $salt)
{
if (empty($username) || empty($salt)) {
throw new \InvalidArgumentException(__FUNCTION__ . ' required a name and salt to be provided.');
}
$token = (string) new Token\Generator($username, $salt, $this->getClientIp(), $this->getClientHost(), $this->getClientUserAgent(), $this->cookieOptions);
$this->systemLogger->debug("Generating authentication cookie — Username: '{$username}' Salt: '{$salt}' IP: '{$this->getClientIp()}' Host name: '{$this->getClientHost()}' Agent: '{$this->getClientUserAgent()}' Result: {$token}", ['event' => 'authentication']);
return $token;
}