4require_once(
'class.ilWACSignedPath.php');
 
   67        assert(is_string(
$path));
 
   75        if (isset(
$_SERVER[
'REMOTE_ADDR'])) {
 
   92        $token = implode(
'-', array(
 
  109        if (self::getSALT()) {
 
  113        if (is_file(self::SALT_FILE_PATH)) {
 
  118        if (strcmp($salt, 
'') === 0) {
 
  131        if (is_file(self::SALT_FILE_PATH)) {
 
  132            unlink(self::SALT_FILE_PATH);
 
  134        $template = file_get_contents(
'./Services/WebAccessChecker/wacsalt.php.template');
 
  135        $random = new \ilRandom();
 
  136        $salt = md5(time() * $random->int(1000, 9999) . self::SALT_FILE_PATH);
 
  138        $template = str_replace(
'INSERT_SALT', $salt, $template);
 
  139        if (is_writable(dirname(self::SALT_FILE_PATH))) {
 
  140            file_put_contents(self::SALT_FILE_PATH, $template);
 
  202        assert(is_string(
$ip));
 
  222        assert(is_string(
$token));
 
  242        assert(is_string(
$path));
 
  261        return (
string) md5($this->
id);
 
  270        assert(is_string(
$id));
 
  290        assert(is_string($salt));
 
  330        assert(is_int(
$ttl));
 
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const DATA_DIR_NON_WRITEABLE
static getTokenMaxLifetimeInSeconds()
setSessionId($session_id)
__construct($path, $client, $timestamp=0, $ttl=0)
ilWACToken constructor.