19 declare(strict_types=1);
102 if (empty($dataConnector)) {
105 $this->dataConnector = $dataConnector;
116 $this->secret =
null;
117 $this->signatureMethod =
'HMAC-SHA1';
118 $this->encryptionMethod =
'';
119 $this->rsaKey =
null;
122 $this->platformId =
null;
123 $this->clientId =
null;
124 $this->deploymentId =
null;
125 $this->ltiVersion =
null;
126 $this->consumerName =
null;
127 $this->consumerVersion =
null;
128 $this->consumerGuid =
null;
130 $this->toolProxy =
null;
132 $this->setSettings(array());
133 $this->
protected =
false;
134 $this->enabled =
false;
135 $this->enableFrom =
null;
136 $this->enableUntil =
null;
137 $this->lastAccess =
null;
138 $this->idScope = IdScope::IdOnly;
139 $this->defaultEmail =
'';
140 $this->created =
null;
141 $this->updated =
null;
143 $this->authorizationServerId =
'';
144 $this->authenticationUrl =
'';
145 $this->accessTokenUrl =
'';
146 $this->debugMode =
false;
152 $this->ext_consumer_id = $a_id;
162 $this->ref_id = $a_ref_id;
208 $this->secret = $secret;
213 return $this->secret;
221 $this->
setSecret(Util::getRandomString(12));
229 $this->user_language =
$lang;
239 $this->active = $value;
249 $this->role = $role_id;
260 $this->enabled = $a_status;
265 return $this->enabled;
282 $platform->initialize();
283 $platform->platformId = $platformId;
285 $platform->deploymentId = $deploymentId;
286 $dataConnector->loadPlatform($platform);
287 $dataConnector->loadGlobalToolConsumerSettings($platform);
301 $platform->initialize();
302 $platform->setKey($key);
304 $dataConnector->loadPlatform($platform);
305 $dataConnector->loadGlobalToolConsumerSettings($platform);
319 $platform->initialize();
320 $platform->setRecordId((
int) $id);
322 $dataConnector->loadPlatform($platform);
323 $dataConnector->loadGlobalToolConsumerSettings($platform);
337 $platform->initialize();
338 $platform->setExtConsumerId($id);
340 $platform->initialize();
355 $toolConsumer->initialize();
356 $toolConsumer->setExtConsumerId($a_ext_consumer_id);
357 $toolConsumer->setRefId($a_ref_id);
360 if ($consumer_pk !=
null) {
361 $toolConsumer = self::fromRecordId($consumer_pk, $a_data_connector);
363 return $toolConsumer;
static getLogger(string $a_component_id)
Get component logger.
static getDataConnector(mixed $db=null, string $dbTableNamePrefix='', string $type='')
lookupRecordIdByGlobalSettingsAndRefId(ilLTIPlatform $platform)
Load extended tool consumer object with ILIAS extension.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
saveToolConsumerILIAS(ilLTIPlatform $platform)
Save extended tool consumer object with ILIAS extensions.
saveGlobalToolConsumerSettings(ilLTIPlatform $platform)
Save platform object.
loadGlobalToolConsumerSettings(ilLTIPlatform $platform)
Load tool consumer settings.
deleteGlobalToolConsumerSettings(ilLTIPlatform $platform)
Delete global tool consumer settings.