19 declare(strict_types=1);
56 if (
$_GET[
'client_id']) {
66 session_name(
'ILCALSESSID');
68 $logger =
$GLOBALS[
'DIC']->logger()->cal();
73 $logger->
warning(
'Calendar token is invalid. Authentication failed.');
78 $GLOBALS[
'DIC'][
'ilAuthSession']->logout();
84 #$export = new ilCalendarExport(array($this->getTokenHandler()->getCalendar())); 99 $GLOBALS[
'DIC'][
'ilAuthSession']->logout();
108 $this->
http = $DIC->http();
112 if ($this->
http->wrapper()->query()->has(
'token')) {
113 $token = $this->
http->wrapper()->query()->retrieve(
115 $this->
refinery->kindlyTo()->string()
127 $this->limit_enabled = (bool) (
$_GET[self::LIMITED_QUERY_PARAM] ??
false);
132 include_once
'./Services/Context/classes/class.ilContext.php';
135 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
138 include_once
'./Services/Init/classes/class.ilInitialisation.php';
143 $this->
lng = $DIC->language();
144 $this->
lng->loadLanguageModule(
'dateplaner');
145 $this->
logger = $DIC->logger()->cal();
153 $this->
logger->info(
'Initialisation of authentication token failed');
157 $this->
logger->info(
'No user id found for calendar synchronisation');
161 $this->
logger->notice(
'No valid user id found for calendar synchronisation');
168 if (!$DIC->user() instanceof
ilObjUser) {
169 $this->
logger->debug(
'No user object defined');
171 $this->
logger->debug(
'Current user is: ' . $DIC->user()->getId());
warning(string $a_message)
parseRequest()
Fetch client id, the chosen calendar...
const MODE_REMOTE_SELECTED
$path_info_components
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
ilCalendarAuthenticationToken $token_handler
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initILIAS()
ilias initialisation
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
static http()
Fetches the global http state from ILIAS.
const LIMITED_QUERY_PARAM
Export calendar(s) to ical format
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static _getInstance($a_usr_id=0)
get singleton instance
static lookupUser(string $a_token)
static setContext(int $a_context)
set context
static init(string $a_type)
Init context by type.
const CONTEXT_CALENDAR_TOKEN
Calendar authentication with auth token.
Handles calendar authentication tokens for external calendar subscriptions.
Handles requests from external calendar applications
static initUserAccount()
Init user with current account id.