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);
138 $this->
lng = $DIC->language();
139 $this->
lng->loadLanguageModule(
'dateplaner');
140 $this->
logger = $DIC->logger()->cal();
148 $this->
logger->info(
'Initialisation of authentication token failed');
152 $this->
logger->info(
'No user id found for calendar synchronisation');
156 $this->
logger->notice(
'No valid user id found for calendar synchronisation');
163 if (!$DIC->user() instanceof
ilObjUser) {
164 $this->
logger->debug(
'No user object defined');
166 $this->
logger->debug(
'Current user is: ' . $DIC->user()->getId());
parseRequest()
Fetch client id, the chosen calendar...
const MODE_REMOTE_SELECTED
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
ilCalendarAuthenticationToken $token_handler
warning(string $message, array $context=[])
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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
static _getInstance($a_usr_id=0)
get singleton instance
static lookupUser(string $a_token)
static setContext(int $a_context)
static init(string $a_type)
Init context by type.
Handles calendar authentication tokens for external calendar subscriptions.
Handles requests from external calendar applications
static initUserAccount()
Init user with current account id.
const int CONTEXT_CALENDAR_TOKEN
Calendar authentication with auth token.