65 $path_object =
new ilWACPath($this->
http->request()->getRequestTarget());
70 if ($ilWACSignedPath->isSignedPath()) {
72 if ($ilWACSignedPath->isSignedPathValid()) {
81 if ($ilWACSignedPath->isFolderSigned()) {
83 if ($ilWACSignedPath->isFolderTokenValid()) {
85 $ilWACSignedPath->revalidatingFolderToken();
88 $this->
sendHeader(
'checked using secure folder');
100 $path = realpath(__DIR__ .
'/../../../../public/' . $clean_path);
112 $checkingInstance = ilWACSecurePath::getCheckingInstance($path_object);
114 $canBeDelivered = $checkingInstance->canBeDelivered($path_object);
115 if ($canBeDelivered) {
118 $ilWACSignedPath->revalidatingFolderToken();
122 return $canBeDelivered;
133 $response = $this->
http->response()->withHeader(
'X-ILIAS-WebAccessChecker', $message);
147 $cookie = $this->cookieFactory->create(
'ilClientId', $this->
getPathObject()->getClient())
153 ->renderIntoResponseHeader($this->
http->response());
167 if (($e instanceof
Exception && $e->getMessage() ===
'Authentication failed.')
169 $this->initAnonymousSession();
179 if ($DIC->user()->getId() === 0) {
191 $is_null_user = ($DIC->user()->getId() === 0);
192 $pub_section_activated = (bool) $DIC[
'ilSetting']->
get(
'pub_section');
193 $isset = isset($DIC[
'ilSetting']);
194 $instanceof = $DIC[
'ilSetting'] instanceof
ilSetting;
196 if (!$isset || !$instanceof) {
200 if ($pub_section_activated && ($is_null_user || $is_anonymous)) {
205 if ($is_anonymous || $is_null_user) {
214 $is_user = $DIC->user() instanceof
ilObjUser;
215 $user_id_is_zero = ((
int) $DIC->user()->getId() === 0);
216 if (!$is_user || $user_id_is_zero) {
293 return self::$use_seperate_logfile;
319 $this->applied_checking_methods[] = $method;
322 protected function initAnonymousSession():
void 331 $ilAuthSession = $DIC[
'ilAuthSession'];
332 $ilAuthSession->regenerateId();
setPathObject(ilWACPath $path_object)
sendHeader(string $message)
getAppliedCheckingMethods()
bool $revalidate_folder_tokens
setAppliedCheckingMethods(array $applied_checking_methods)
setInitialized(bool $initialized)
const CM_CHECKINGINSTANCE
const ACCESS_DENIED_NO_LOGIN
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addAppliedCheckingMethod(int $method)
setOverrideMimetype(string $override_mimetype)
static initILIAS()
ilias initialisation
setSendStatusCode(bool $send_status_code)
static http()
Fetches the global http state from ILIAS.
array $applied_checking_methods
isRevalidateFolderTokens()
Class ilWebAccessChecker.
string $override_mimetype
setChecked(bool $checked)
static isUseSeperateLogfile()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRevalidateFolderTokens(bool $revalidate_folder_tokens)
static hasCheckingInstanceRegistered(ilWACPath $ilWACPath)
Searches a checking instance for the given wac path.
static init(string $a_type)
Init context by type.
static setUseSeperateLogfile(bool $use_seperate_logfile)
setDisposition(string $disposition)
const ACCESS_DENIED_NO_PUB
static bool $use_seperate_logfile
getCleanURLdecodedPath()
Returns a clean (everything behind ? is removed and rawurldecoded path.
__construct(private Services $http, private CookieFactory $cookieFactory)
ilWebAccessChecker constructor.