ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAuthProviderECS Class Reference

Auth prvider for ecs auth. More...

+ Inheritance diagram for ilAuthProviderECS:
+ Collaboration diagram for ilAuthProviderECS:

Public Member Functions

 __construct (\ilAuthCredentials $credentials)
 Constructor. More...
 
 getAbreviation ()
 get abbreviation More...
 
 getMID ()
 get mid More...
 
 setMID (int $a_mid)
 
 setCurrentServer (ilECSSetting $server)
 Set current server. More...
 
 getCurrentServer ()
 Get current server. More...
 
 getServerSettings ()
 Get server settings. More...
 
 doAuthentication (\ilAuthStatus $status)
 Try ecs authentication. More...
 
 handleLogin ()
 Called from base class after successful login. More...
 
 initRemoteUserWithRemoteId ()
 
 validateHash ()
 Validate ECS hash. More...
 
- Public Member Functions inherited from ilAuthProvider
 __construct (ilAuthCredentials $credentials)
 Constructor. More...
 
 getLogger ()
 Get logger. More...
 
 getCredentials ()
 

Protected Member Functions

 handleLoginByAuthMode (ilAuthStatus $status)
 Redirects to shibboleth login; to standard login page for LDAP based authentication or authenticates/creates a local account. More...
 
 resumeCurrentSession ()
 
 createUser (ilECSUser $user)
 create new user More...
 
 updateUser (ilECSUser $user, int $a_local_user_id)
 update existing user More...
 
 resetMailOptions (int $a_usr_id)
 Reset mail options to "local only". More...
 
- Protected Member Functions inherited from ilAuthProvider
 handleAuthenticationFail (ilAuthStatus $status, string $a_reason)
 Handle failed authentication. More...
 

Protected Attributes

int $mid = null
 
string $abreviation = null
 
ilECSSetting $currentServer
 
ilECSServerSettings $servers
 

Private Member Functions

 initECSServices ()
 Init ECS Services. More...
 

Private Attributes

ilIniFile $clientIniFile
 
ilRbacAdmin $rbacAdmin
 
ilSetting $setting
 
ilLanguage $lng
 
Refinery $refinery
 
HTTPServices $http
 
ilAuthSession $authSession
 
ilCtrlInterface $ctrl
 

Detailed Description

Auth prvider for ecs auth.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 28 of file class.ilAuthProviderECS.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthProviderECS::__construct ( \ilAuthCredentials  $credentials)

Constructor.

Parameters
\ilAuthCredentials$credentials

Definition at line 50 of file class.ilAuthProviderECS.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), initECSServices(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

51  {
53 
54  global $DIC;
55 
56  $this->clientIniFile = $DIC->clientIni();
57  $this->rbacAdmin = $DIC->rbac()->admin();
58  $this->setting = $DIC->settings();
59  $this->lng = $DIC->language();
60  $this->lng->loadLanguageModule('ecs');
61  $this->http = $DIC->http();
62  $this->refinery = $DIC->refinery();
63  $this->authSession = $DIC['ilAuthSession'];
64  $this->ctrl = $DIC->ctrl();
65 
66  $this->initECSServices();
67  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
ilAuthCredentials $credentials
initECSServices()
Init ECS Services.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ createUser()

ilAuthProviderECS::createUser ( ilECSUser  $user)
protected

create new user

Definition at line 353 of file class.ilAuthProviderECS.php.

References ilAuthUtils\_generateLogin(), ilObject\_writeImportId(), getAbreviation(), getCurrentServer(), ilECSUser\getEmail(), ilECSUser\getFirstname(), ilECSUser\getImportId(), ilECSUser\getInstitution(), ilECSUser\getLastname(), ilAuthProvider\getLogger(), ilECSUser\getLogin(), ilObjUser\PASSWD_CRYPTED, resetMailOptions(), and SYSTEM_USER_ID.

Referenced by handleLogin().

353  : string
354  {
355  $userObj = new ilObjUser();
356  $userObj->setOwner(SYSTEM_USER_ID);
357 
358  $local_user = ilAuthUtils::_generateLogin($this->getAbreviation() . '_' . $user->getLogin());
359 
360  $newUser["login"] = $local_user;
361  $newUser["firstname"] = $user->getFirstname();
362  $newUser["lastname"] = $user->getLastname();
363  $newUser['email'] = $user->getEmail();
364  $newUser['institution'] = $user->getInstitution();
365 
366  // set "plain md5" password (= no valid password)
367  $newUser["passwd"] = "";
368  $newUser["passwd_type"] = ilObjUser::PASSWD_CRYPTED;
369 
370  $newUser["auth_mode"] = "ecs";
371  $newUser["profile_incomplete"] = 0;
372 
373  // system data
374  $userObj->assignData($newUser);
375  $userObj->setTitle($userObj->getFullname());
376  $userObj->setDescription($userObj->getEmail());
377 
378  // set user language to system language
379  $userObj->setLanguage($this->setting->get("language"));
380 
381  // Time limit
382  $userObj->setTimeLimitOwner(7);
383  $userObj->setTimeLimitUnlimited(false);
384  $userObj->setTimeLimitFrom(time() - 5);
385  $userObj->setTimeLimitUntil(time() + (int) $this->clientIniFile->readVariable("session", "expire"));
386 
387  // Create user in DB
388  $userObj->setOwner(6);
389  $userObj->create();
390  $userObj->setActive(true);
391  $userObj->saveAsNew();
392  $userObj->updateOwner();
393  $userObj->writePrefs();
394 
395  if ($this->getCurrentServer()->getGlobalRole()) {
396  $this->rbacAdmin->assignUser($this->getCurrentServer()->getGlobalRole(), $userObj->getId());
397  }
398  ilObject::_writeImportId($userObj->getId(), $user->getImportId());
399 
400  $this->getLogger()->info('Created new remote user with usr_id: ' . $user->getImportId());
401 
402  // Send Mail
403  #$this->sendNotification($userObj);
404  $this->resetMailOptions($userObj->getId());
405 
406  return $userObj->getLogin();
407  }
static _generateLogin(string $a_login)
generate free login by starting with a default string and adding postfix numbers
getFirstname()
get firstname
static _writeImportId(int $obj_id, string $import_id)
write import id to db (static)
resetMailOptions(int $a_usr_id)
Reset mail options to "local only".
getCurrentServer()
Get current server.
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26
getAbreviation()
get abbreviation
getLastname()
getLastname
getLogger()
Get logger.
const PASSWD_CRYPTED
getEmail()
get email
getLogin()
get login
getImportId()
get Email
getInstitution()
get institution
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doAuthentication()

ilAuthProviderECS::doAuthentication ( \ilAuthStatus  $status)

Try ecs authentication.

Implements ilAuthProviderInterface.

Definition at line 118 of file class.ilAuthProviderECS.php.

References $server, ilECSServerSettings\ACTIVE_SERVER, ilAuthProvider\getLogger(), getServerSettings(), ilAuthProvider\handleAuthenticationFail(), handleLoginByAuthMode(), setCurrentServer(), and validateHash().

118  : bool
119  {
120  $this->getLogger()->debug('Starting ECS authentication');
121  if (!$this->getServerSettings()->activeServerExists()) {
122  $this->getLogger()->warning('No active ecs server found. Aborting');
123  $this->handleAuthenticationFail($status, 'err_wrong_login');
124  return false;
125  }
126 
127  // Iterate through all active ecs instances
128  foreach ($this->getServerSettings()->getServers(ilECSServerSettings::ACTIVE_SERVER) as $server) {
129  $this->setCurrentServer($server);
130  if ($this->validateHash()) {
131  return $this->handleLoginByAuthMode($status);
132  }
133  }
134  $this->getLogger()->warning('Could not validate ecs hash for any active server.');
135  $this->handleAuthenticationFail($status, 'err_wrong_login');
136  return false;
137  }
getServerSettings()
Get server settings.
handleLoginByAuthMode(ilAuthStatus $status)
Redirects to shibboleth login; to standard login page for LDAP based authentication or authenticates/...
handleAuthenticationFail(ilAuthStatus $status, string $a_reason)
Handle failed authentication.
setCurrentServer(ilECSSetting $server)
Set current server.
getLogger()
Get logger.
$server
validateHash()
Validate ECS hash.
+ Here is the call graph for this function:

◆ getAbreviation()

ilAuthProviderECS::getAbreviation ( )

get abbreviation

Definition at line 72 of file class.ilAuthProviderECS.php.

References $abreviation.

Referenced by createUser().

72  : string
73  {
74  return $this->abreviation;
75  }
+ Here is the caller graph for this function:

◆ getCurrentServer()

ilAuthProviderECS::getCurrentServer ( )

Get current server.

Definition at line 101 of file class.ilAuthProviderECS.php.

References $currentServer.

Referenced by createUser(), handleLogin(), handleLoginByAuthMode(), initRemoteUserWithRemoteId(), resumeCurrentSession(), updateUser(), and validateHash().

101  : ilECSSetting
102  {
103  return $this->currentServer;
104  }
+ Here is the caller graph for this function:

◆ getMID()

ilAuthProviderECS::getMID ( )

get mid

Definition at line 80 of file class.ilAuthProviderECS.php.

References $mid.

Referenced by handleLogin(), handleLoginByAuthMode(), and initRemoteUserWithRemoteId().

80  : int
81  {
82  return $this->mid;
83  }
+ Here is the caller graph for this function:

◆ getServerSettings()

ilAuthProviderECS::getServerSettings ( )

Get server settings.

Definition at line 109 of file class.ilAuthProviderECS.php.

References $servers.

Referenced by doAuthentication().

110  {
111  return $this->servers;
112  }
ilECSServerSettings $servers
Collection of ECS settings.
+ Here is the caller graph for this function:

◆ handleLogin()

ilAuthProviderECS::handleLogin ( )

Called from base class after successful login.

Definition at line 225 of file class.ilAuthProviderECS.php.

References ilObjUser\_lookupId(), ilObject\_lookupObjIdByImportId(), createUser(), getCurrentServer(), ilAuthProvider\getLogger(), getMID(), ILIAS\FileDelivery\http(), and updateUser().

Referenced by handleLoginByAuthMode().

226  {
227  $user = new ilECSUser($this->http->request()->getQueryParams());
228 
229  if (!$usr_id = ilObject::_lookupObjIdByImportId($user->getImportId())) {
230  $username = $this->createUser($user);
231  } else {
232  $username = $this->updateUser($user, $usr_id);
233  }
234 
235  // set user imported
236  $import = new ilECSImport($this->getCurrentServer()->getServerId(), $usr_id);
237  $import->save();
238 
239  // Store remote user data
240  $remoteUserRepository = new ilECSRemoteUserRepository();
241  $remoteUserRepository->createIfNotExisting(
242  $this->getCurrentServer()->getServerId(),
243  $this->getMID(),
244  ilObjUser::_lookupId($username),
245  $user->getImportId()
246  );
247 
248  $this->getLogger()->info('Current user is: ' . $username);
249 
250  return ilObjUser::_lookupId($username);
251  }
static _lookupObjIdByImportId(string $import_id)
Get (latest) object id for an import id.
updateUser(ilECSUser $user, int $a_local_user_id)
update existing user
getCurrentServer()
Get current server.
static _lookupId($a_user_str)
createUser(ilECSUser $user)
create new user
static http()
Fetches the global http state from ILIAS.
Storage of ECS imported objects.
getLogger()
Get logger.
Stores relevant user data.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleLoginByAuthMode()

ilAuthProviderECS::handleLoginByAuthMode ( ilAuthStatus  $status)
protected

Redirects to shibboleth login; to standard login page for LDAP based authentication or authenticates/creates a local account.

Definition at line 143 of file class.ilAuthProviderECS.php.

References ILIAS\Repository\ctrl(), getCurrentServer(), ilAuthProvider\getLogger(), getMID(), ilAuthProvider\handleAuthenticationFail(), handleLogin(), ILIAS\FileDelivery\http(), ilECSParticipantSetting\INCOMING_AUTH_TYPE_LOGIN_PAGE, ilECSParticipantSetting\INCOMING_AUTH_TYPE_SHIBBOLETH, initRemoteUserWithRemoteId(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), resumeCurrentSession(), ilSession\set(), ilAuthStatus\setAuthenticatedUserId(), ilAuthStatus\setStatus(), and ilAuthStatus\STATUS_AUTHENTICATED.

Referenced by doAuthentication().

143  : bool
144  {
145  $is_external_account = false;
146  if ($this->http->wrapper()->query()->has('ecs_external_account')) {
147  $is_external_account = $this->http->wrapper()->query()->retrieve(
148  'ecs_external_account',
149  $this->refinery->kindlyTo()->bool()
150  );
151  }
152  $redirection_target = '';
153  if ($this->http->wrapper()->query()->has('target')) {
154  $redirection_target = $this->http->wrapper()->query()->retrieve(
155  'target',
156  $this->refinery->kindlyTo()->string()
157  );
158  }
159  $part_settings = new ilECSParticipantSetting(
160  $this->getCurrentServer()->getServerId(),
161  $this->getMID()
162  );
163  if ($this->resumeCurrentSession()) {
164  $this->getLogger()->debug('Continuing current user session');
166  $status->setAuthenticatedUserId($this->authSession->getUserId());
167  return true;
168  }
169  if (
170  $is_external_account &&
171  $part_settings->getIncomingAuthType() === ilECSParticipantSetting::INCOMING_AUTH_TYPE_LOGIN_PAGE
172  ) {
173  $this->getLogger()->info('ILIAS login page authentication required.');
174  ilSession::set('success', $this->lng->txt('ecs_login_success_ilias'));
176  $this->ctrl->redirectToURL('login.php?target=' . $redirection_target);
177  return false;
178  }
179  if (
180  $is_external_account &&
181  $part_settings->getIncomingAuthType() === ilECSParticipantSetting::INCOMING_AUTH_TYPE_SHIBBOLETH
182  ) {
183  $this->getLogger()->info('Redirect to shibboleth authentication');
185  $this->ctrl->redirectToURL('shib_login.php?target=' . $redirection_target);
186  }
187  if ($part_settings->areIncomingLocalAccountsSupported()) {
188  // handle successful authentication
189  $new_usr_id = $this->handleLogin();
190  $this->getLogger()->info('ECS authentication successful.');
192  $status->setAuthenticatedUserId($new_usr_id);
193  return true;
194  }
195  $this->handleAuthenticationFail($status, 'err_wrong_login');
196  return false;
197  }
handleLogin()
Called from base class after successful login.
getCurrentServer()
Get current server.
handleAuthenticationFail(ilAuthStatus $status, string $a_reason)
Handle failed authentication.
static http()
Fetches the global http state from ILIAS.
setStatus(int $a_status)
Set auth status.
getLogger()
Get logger.
setAuthenticatedUserId(int $a_id)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initECSServices()

ilAuthProviderECS::initECSServices ( )
private

Init ECS Services.

Definition at line 345 of file class.ilAuthProviderECS.php.

References ilECSServerSettings\getInstance().

Referenced by __construct().

345  : void
346  {
347  $this->servers = ilECSServerSettings::getInstance();
348  }
static getInstance()
Get singleton instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRemoteUserWithRemoteId()

ilAuthProviderECS::initRemoteUserWithRemoteId ( )

Definition at line 253 of file class.ilAuthProviderECS.php.

References getCurrentServer(), getMID(), and ILIAS\FileDelivery\http().

Referenced by handleLoginByAuthMode().

253  : void
254  {
255  $user = new ilECSUser($this->http->request()->getQueryParams());
256 
257  // Store remote user data
258  $remoteUserRepository = new ilECSRemoteUserRepository();
259  $remoteUserRepository->createIfRemoteUserNotExisting(
260  $this->getCurrentServer()->getServerId(),
261  $this->getMID(),
262  0,
263  $user->getLogin()
264  );
265  }
getCurrentServer()
Get current server.
static http()
Fetches the global http state from ILIAS.
Stores relevant user data.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetMailOptions()

ilAuthProviderECS::resetMailOptions ( int  $a_usr_id)
protected

Reset mail options to "local only".

Definition at line 447 of file class.ilAuthProviderECS.php.

References ilMailOptions\INCOMING_LOCAL.

Referenced by createUser(), and updateUser().

447  : void
448  {
449  $options = new ilMailOptions($a_usr_id);
450  $options->setIncomingType(ilMailOptions::INCOMING_LOCAL);
451  $options->updateOptions();
452  }
Class ilMailOptions this class handles user mails.
+ Here is the caller graph for this function:

◆ resumeCurrentSession()

ilAuthProviderECS::resumeCurrentSession ( )
protected

Definition at line 199 of file class.ilAuthProviderECS.php.

References ilObjUser\_lookupExternalAccount(), ANONYMOUS_USER_ID, getCurrentServer(), ilAuthProvider\getLogger(), and ILIAS\FileDelivery\http().

Referenced by handleLoginByAuthMode().

199  : bool
200  {
201  $session_user_id = $this->authSession->getUserId();
202  if (!$session_user_id || $session_user_id === ANONYMOUS_USER_ID) {
203  $this->getLogger()->debug('No valid session found');
204  $this->authSession->setAuthenticated(false, ANONYMOUS_USER_ID);
205  return false;
206  }
207  $session_ext_account = ilObjUser::_lookupExternalAccount($session_user_id);
208  $user = new ilECSUser($this->http->request()->getQueryParams());
209  $this->getLogger()->debug('ECS user name: ' . $user->getLogin());
210  $this->getLogger()->debug('Session external account: ' . $session_ext_account);
211  if (!$session_ext_account || strcmp($user->getLogin(), $session_ext_account) !== 0) {
212  $this->getLogger()->debug('No matching session found. Terminating current user session.');
213  $this->authSession->setAuthenticated(false, ANONYMOUS_USER_ID);
214  return false;
215  }
216  // assign to ECS global role
217  $this->rbacAdmin->assignUser($this->getCurrentServer()->getGlobalRole(), $this->authSession->getUserId());
218  return true;
219  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
getCurrentServer()
Get current server.
static _lookupExternalAccount(int $a_user_id)
static http()
Fetches the global http state from ILIAS.
getLogger()
Get logger.
Stores relevant user data.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCurrentServer()

ilAuthProviderECS::setCurrentServer ( ilECSSetting  $server)

Set current server.

Definition at line 93 of file class.ilAuthProviderECS.php.

References $server.

Referenced by doAuthentication().

93  : void
94  {
95  $this->currentServer = $server;
96  }
$server
+ Here is the caller graph for this function:

◆ setMID()

ilAuthProviderECS::setMID ( int  $a_mid)

Definition at line 85 of file class.ilAuthProviderECS.php.

Referenced by validateHash().

85  : void
86  {
87  $this->mid = $a_mid;
88  }
+ Here is the caller graph for this function:

◆ updateUser()

ilAuthProviderECS::updateUser ( ilECSUser  $user,
int  $a_local_user_id 
)
protected

update existing user

Definition at line 412 of file class.ilAuthProviderECS.php.

References getCurrentServer(), ilECSUser\getEmail(), ilECSUser\getFirstname(), ilECSUser\getImportId(), ilECSUser\getInstitution(), ilECSUser\getLastname(), ilAuthProvider\getLogger(), and resetMailOptions().

Referenced by handleLogin().

412  : string
413  {
414  $user_obj = new ilObjUser($a_local_user_id);
415  $user_obj->setFirstname($user->getFirstname());
416  $user_obj->setLastname($user->getLastname());
417  $user_obj->setEmail($user->getEmail());
418  $user_obj->setInstitution($user->getInstitution());
419  $user_obj->setActive(true);
420 
421  $until = $user_obj->getTimeLimitUntil();
422 
423  if ($until < (time() + (int) $this->clientIniFile->readVariable('session', 'expire'))) {
424  $user_obj->setTimeLimitFrom(time() - 60);
425  $user_obj->setTimeLimitUntil(time() + (int) $this->clientIniFile->readVariable("session", "expire"));
426  }
427  $user_obj->update();
428  $user_obj->refreshLogin();
429 
430  if ($this->getCurrentServer()->getGlobalRole()) {
431  $this->rbacAdmin->assignUser(
432  $this->getCurrentServer()->getGlobalRole(),
433  $user_obj->getId()
434  );
435  }
436 
437  $this->resetMailOptions($a_local_user_id);
438 
439  $this->getLogger()->debug('Finished update of remote user with usr_id: ' . $user->getImportId());
440  return $user_obj->getLogin();
441  }
getFirstname()
get firstname
resetMailOptions(int $a_usr_id)
Reset mail options to "local only".
getCurrentServer()
Get current server.
getLastname()
getLastname
getLogger()
Get logger.
getEmail()
get email
getImportId()
get Email
getInstitution()
get institution
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validateHash()

ilAuthProviderECS::validateHash ( )

Validate ECS hash.

Definition at line 270 of file class.ilAuthProviderECS.php.

References ILIAS\LTI\ToolProvider\$details, Vendor\Package\$e, $res, ilLogLevel\DEBUG, getCurrentServer(), ilECSCommunityReader\getInstanceByServerId(), ilAuthProvider\getLogger(), ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), and setMID().

Referenced by doAuthentication().

270  : bool
271  {
272  // fetch hash
273  $hash = "";
274  if ($this->http->wrapper()->query()->has('ecs_hash')) {
275  $hash = $this->http->wrapper()->query()->retrieve(
276  'ecs_hash',
277  $this->refinery->kindlyTo()->string()
278  );
279  }
280  if ($this->http->wrapper()->query()->has('ecs_hash_url')) {
281  $hashurl = urldecode(
282  $this->http->wrapper()->query()->retrieve(
283  'ecs_hash_url',
284  $this->refinery->kindlyTo()->string()
285  )
286  );
287  $hash = basename(parse_url($hashurl, PHP_URL_PATH));
288  }
289 
290  $this->getLogger()->info('Using ecs hash: ' . $hash);
291  // Check if hash is valid ...
292  try {
293  $connector = new ilECSConnector($this->getCurrentServer());
294  $res = $connector->getAuth($hash);
295  $auths = $res->getResult();
296 
297  $this->getLogger()->dump($auths, ilLogLevel::DEBUG);
298 
299  if ($auths->pid) {
300  try {
301  $reader = ilECSCommunityReader::getInstanceByServerId($this->getCurrentServer()->getServerId());
302  foreach ($reader->getParticipantsByPid($auths->pid) as $participant) {
303  if ($participant->getOrganisation() instanceof \ilECSOrganisation) {
304  $this->abreviation = $participant->getOrganisation()->getAbbreviation();
305  break;
306  }
307  }
308  if (!$this->abreviation) {
309  $this->abreviation = $auths->abbr;
310  }
311  } catch (Exception $e) {
312  $this->getLogger()->warning('Authentication failed with message: ' . $e->getMessage());
313  return false;
314  }
315  } else {
316  $this->abreviation = $auths->abbr;
317  }
318 
319  $this->getLogger()->debug('Got abbreviation: ' . $this->abreviation);
320  } catch (ilECSConnectorException $e) {
321  $this->getLogger()->warning('Authentication failed with message: ' . $e->getMessage());
322  return false;
323  }
324 
325  // read current mid
326  try {
327  $connector = new ilECSConnector($this->getCurrentServer());
328  $details = $connector->getAuth($hash, true);
329 
330  $this->getLogger()->dump($details, ilLogLevel::DEBUG);
331  $this->getLogger()->debug('Token create for mid: ' . $details->getFirstSender());
332 
333  $this->setMID($details->getFirstSender());
334  } catch (ilECSConnectorException $e) {
335  $this->getLogger()->warning('Receiving mid failed with message: ' . $e->getMessage());
336  return false;
337  }
338  return true;
339  }
$res
Definition: ltiservices.php:69
getCurrentServer()
Get current server.
array $details
Details for error message relating to last request processed.
Definition: System.php:109
static http()
Fetches the global http state from ILIAS.
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
getLogger()
Get logger.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $abreviation

string ilAuthProviderECS::$abreviation = null
protected

Definition at line 40 of file class.ilAuthProviderECS.php.

Referenced by getAbreviation().

◆ $authSession

ilAuthSession ilAuthProviderECS::$authSession
private

Definition at line 36 of file class.ilAuthProviderECS.php.

◆ $clientIniFile

ilIniFile ilAuthProviderECS::$clientIniFile
private

Definition at line 30 of file class.ilAuthProviderECS.php.

◆ $ctrl

ilCtrlInterface ilAuthProviderECS::$ctrl
private

Definition at line 37 of file class.ilAuthProviderECS.php.

◆ $currentServer

ilECSSetting ilAuthProviderECS::$currentServer
protected

Definition at line 42 of file class.ilAuthProviderECS.php.

Referenced by getCurrentServer().

◆ $http

HTTPServices ilAuthProviderECS::$http
private

Definition at line 35 of file class.ilAuthProviderECS.php.

◆ $lng

ilLanguage ilAuthProviderECS::$lng
private

Definition at line 33 of file class.ilAuthProviderECS.php.

◆ $mid

int ilAuthProviderECS::$mid = null
protected

Definition at line 39 of file class.ilAuthProviderECS.php.

Referenced by getMID().

◆ $rbacAdmin

ilRbacAdmin ilAuthProviderECS::$rbacAdmin
private

Definition at line 31 of file class.ilAuthProviderECS.php.

◆ $refinery

Refinery ilAuthProviderECS::$refinery
private

Definition at line 34 of file class.ilAuthProviderECS.php.

◆ $servers

ilECSServerSettings ilAuthProviderECS::$servers
protected

Definition at line 43 of file class.ilAuthProviderECS.php.

Referenced by getServerSettings().

◆ $setting

ilSetting ilAuthProviderECS::$setting
private

Definition at line 32 of file class.ilAuthProviderECS.php.


The documentation for this class was generated from the following file: