19declare(strict_types=1);
38 $this->
namespace = $namespace;
73 $token = bin2hex(random_bytes(self::TOKEN_LENGTH / 2));
74 }
catch (\Throwable $t) {
75 $token = md5(uniqid((
string) time(),
true));
88 foreach ($this->
namespace as
$name) {
91 $output =
'new il.UI.core.URLBuilderToken([' . implode(
',',
$namespace) .
'], "' . $this->name .
'", "' . $this->token .
'")';
render()
Output the JS equivalent of the token as a string.
createToken()
Creates a randomized string of length URLBuilderToken::TOKEN_LENGTH generated by the random_bytes() f...
getToken()
Get the token hash value.
__construct(array $namespace, string $name)
getName()
Get the full name of the token including its namespace.
const SEPARATOR
Separator for parts of a parameter's namespace.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...