Bolt\AccessControl\AccessChecker::getAuthToken PHP Method

getAuthToken() protected method

Get a MD5 hash key to identify the session with. This is calculated from a name, a salt, and optionally the remote IP address, broswer's agent string and the user's HTTP hostname.
protected getAuthToken ( string $username, string $salt ) : string | boolean
$username string
$salt string
return string | boolean
    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;
    }