ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ltiregend.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22require_once("../vendor/composer/vendor/autoload.php");
23
24
26$clientId = (ilSession::has('lti_dynamic_registration_client_id')) ? (string) ilSession::get('lti_dynamic_registration_client_id') : '';
28if (empty($clientId)) {
29 $response["providerId"] = 0;
30 $response["error"] = "could not find created client_id";
31} else {
32 try {
34 $response["error"] = "";
35 } catch (\ILIAS\Filesystem\Exception\IOException $e) {
36 $response["providerId"] = 0;
37 $response["error"] = $e->getMessage();
38 }
39}
40header('Content-Type: application/json; charset=utf-8');
41echo json_encode($response, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
static initILIAS()
ilias initialisation
static getProviderIdFromClientId(string $clientId)
static get(string $a_var)
static has($a_var)
$clientId
Definition: ltiregend.php:26
$response
Definition: ltiregend.php:27
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.