ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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)
 
 getLogger ()
 
 getCredentials ()
 
- Public Member Functions inherited from ilAuthProviderInterface
 doAuthentication (ilAuthStatus $status)
 

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)
 

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 29 of file class.ilAuthProviderECS.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthProviderECS::__construct ( \ilAuthCredentials  $credentials)

Constructor.

Parameters
\ilAuthCredentials$credentials

Definition at line 51 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().

52  {
54 
55  global $DIC;
56 
57  $this->clientIniFile = $DIC->clientIni();
58  $this->rbacAdmin = $DIC->rbac()->admin();
59  $this->setting = $DIC->settings();
60  $this->lng = $DIC->language();
61  $this->lng->loadLanguageModule('ecs');
62  $this->http = $DIC->http();
63  $this->refinery = $DIC->refinery();
64  $this->authSession = $DIC['ilAuthSession'];
65  $this->ctrl = $DIC->ctrl();
66 
67  $this->initECSServices();
68  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26
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 354 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(), IL_CAL_DATETIME, IL_CAL_UNIX, ilObjUser\PASSWD_CRYPTED, resetMailOptions(), and SYSTEM_USER_ID.

Referenced by handleLogin().

354  : string
355  {
356  $userObj = new ilObjUser();
357  $userObj->setOwner(SYSTEM_USER_ID);
358 
359  $local_user = ilAuthUtils::_generateLogin($this->getAbreviation() . '_' . $user->getLogin());
360 
361  $newUser["login"] = $local_user;
362  $newUser["firstname"] = $user->getFirstname();
363  $newUser["lastname"] = $user->getLastname();
364  $newUser['email'] = $user->getEmail();
365  $newUser['institution'] = $user->getInstitution();
366 
367  // set "plain md5" password (= no valid password)
368  $newUser["passwd"] = "";
369  $newUser["passwd_type"] = ilObjUser::PASSWD_CRYPTED;
370 
371  $newUser["auth_mode"] = "ecs";
372  $newUser["profile_incomplete"] = 0;
373 
374  // system data
375  $userObj->assignData($newUser);
376  $userObj->setTitle($userObj->getFullname());
377  $userObj->setDescription($userObj->getEmail());
378 
379  // set user language to system language
380  $userObj->setLanguage($this->setting->get("language"));
381 
382  // Time limit
383  $userObj->setTimeLimitOwner(7);
384  $userObj->setTimeLimitUnlimited(false);
385  $userObj->setTimeLimitFrom(time() - 5);
386  $userObj->setTimeLimitUntil(time() + (int) $this->clientIniFile->readVariable("session", "expire"));
387 
388  // Create user in DB
389  $userObj->setOwner(6);
390  $tmp_date = new ilDateTime(time(), IL_CAL_UNIX);
391  $userObj->setAgreeDate($tmp_date->get(IL_CAL_DATETIME));
392  $userObj->create();
393  $userObj->setActive(true);
394  $userObj->saveAsNew();
395  $userObj->updateOwner();
396  $userObj->writePrefs();
397 
398  if ($this->getCurrentServer()->getGlobalRole()) {
399  $this->rbacAdmin->assignUser($this->getCurrentServer()->getGlobalRole(), $userObj->getId());
400  }
401  ilObject::_writeImportId($userObj->getId(), $user->getImportId());
402 
403  $this->getLogger()->info('Created new remote user with usr_id: ' . $user->getImportId());
404 
405  // Send Mail
406  #$this->sendNotification($userObj);
407  $this->resetMailOptions($userObj->getId());
408 
409  return $userObj->getLogin();
410  }
static _generateLogin(string $a_login)
generate free login by starting with a default string and adding postfix numbers
const IL_CAL_DATETIME
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
const IL_CAL_UNIX
getAbreviation()
get abbreviation
getLastname()
getLastname
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.

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

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

119  : bool
120  {
121  $this->getLogger()->debug('Starting ECS authentication');
122  if (!$this->getServerSettings()->activeServerExists()) {
123  $this->getLogger()->warning('No active ecs server found. Aborting');
124  $this->handleAuthenticationFail($status, 'err_wrong_login');
125  return false;
126  }
127 
128  // Iterate through all active ecs instances
129  foreach ($this->getServerSettings()->getServers(ilECSServerSettings::ACTIVE_SERVER) as $server) {
130  $this->setCurrentServer($server);
131  if ($this->validateHash()) {
132  return $this->handleLoginByAuthMode($status);
133  }
134  }
135  $this->getLogger()->warning('Could not validate ecs hash for any active server.');
136  $this->handleAuthenticationFail($status, 'err_wrong_login');
137  return false;
138  }
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)
setCurrentServer(ilECSSetting $server)
Set current server.
$server
Definition: shib_login.php:28
validateHash()
Validate ECS hash.
+ Here is the call graph for this function:

◆ getAbreviation()

ilAuthProviderECS::getAbreviation ( )

get abbreviation

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

References $abreviation.

Referenced by createUser().

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

◆ getCurrentServer()

ilAuthProviderECS::getCurrentServer ( )

Get current server.

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

References $currentServer.

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

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

◆ getMID()

ilAuthProviderECS::getMID ( )

get mid

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

References $mid.

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

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

◆ getServerSettings()

ilAuthProviderECS::getServerSettings ( )

Get server settings.

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

References $servers.

Referenced by doAuthentication().

111  {
112  return $this->servers;
113  }
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 226 of file class.ilAuthProviderECS.php.

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

Referenced by handleLoginByAuthMode().

227  {
228  $user = new ilECSUser($this->http->request()->getQueryParams());
229 
230  if (!$usr_id = ilObject::_lookupObjIdByImportId($user->getImportId())) {
231  $username = $this->createUser($user);
232  } else {
233  $username = $this->updateUser($user, $usr_id);
234  }
235 
236  // set user imported
237  $import = new ilECSImport($this->getCurrentServer()->getServerId(), $usr_id);
238  $import->save();
239 
240  // Store remote user data
241  $remoteUserRepository = new ilECSRemoteUserRepository();
242  $remoteUserRepository->createIfNotExisting(
243  $this->getCurrentServer()->getServerId(),
244  $this->getMID(),
245  ilObjUser::_lookupId($username),
246  $user->getImportId()
247  );
248 
249  $this->getLogger()->info('Current user is: ' . $username);
250 
251  return ilObjUser::_lookupId($username);
252  }
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.
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 144 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().

144  : bool
145  {
146  $is_external_account = false;
147  if ($this->http->wrapper()->query()->has('ecs_external_account')) {
148  $is_external_account = $this->http->wrapper()->query()->retrieve(
149  'ecs_external_account',
150  $this->refinery->kindlyTo()->bool()
151  );
152  }
153  $redirection_target = '';
154  if ($this->http->wrapper()->query()->has('target')) {
155  $redirection_target = $this->http->wrapper()->query()->retrieve(
156  'target',
157  $this->refinery->kindlyTo()->string()
158  );
159  }
160  $part_settings = new ilECSParticipantSetting(
161  $this->getCurrentServer()->getServerId(),
162  $this->getMID()
163  );
164  if ($this->resumeCurrentSession()) {
165  $this->getLogger()->debug('Continuing current user session');
167  $status->setAuthenticatedUserId($this->authSession->getUserId());
168  return true;
169  }
170  if (
171  $is_external_account &&
172  $part_settings->getIncomingAuthType() === ilECSParticipantSetting::INCOMING_AUTH_TYPE_LOGIN_PAGE
173  ) {
174  $this->getLogger()->info('ILIAS login page authentication required.');
175  ilSession::set('success', $this->lng->txt('ecs_login_success_ilias'));
177  $this->ctrl->redirectToURL('login.php?target=' . $redirection_target);
178  return false;
179  }
180  if (
181  $is_external_account &&
182  $part_settings->getIncomingAuthType() === ilECSParticipantSetting::INCOMING_AUTH_TYPE_SHIBBOLETH
183  ) {
184  $this->getLogger()->info('Redirect to shibboleth authentication');
186  $this->ctrl->redirectToURL('shib_login.php?target=' . $redirection_target);
187  }
188  if ($part_settings->areIncomingLocalAccountsSupported()) {
189  // handle successful authentication
190  $new_usr_id = $this->handleLogin();
191  $this->getLogger()->info('ECS authentication successful.');
193  $status->setAuthenticatedUserId($new_usr_id);
194  return true;
195  }
196  $this->handleAuthenticationFail($status, 'err_wrong_login');
197  return false;
198  }
handleLogin()
Called from base class after successful login.
getCurrentServer()
Get current server.
const int STATUS_AUTHENTICATED
handleAuthenticationFail(ilAuthStatus $status, string $a_reason)
static http()
Fetches the global http state from ILIAS.
setStatus(int $a_status)
Set auth status.
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 346 of file class.ilAuthProviderECS.php.

References ilECSServerSettings\getInstance().

Referenced by __construct().

346  : void
347  {
348  $this->servers = ilECSServerSettings::getInstance();
349  }
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 254 of file class.ilAuthProviderECS.php.

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

Referenced by handleLoginByAuthMode().

254  : void
255  {
256  $user = new ilECSUser($this->http->request()->getQueryParams());
257 
258  // Store remote user data
259  $remoteUserRepository = new ilECSRemoteUserRepository();
260  $remoteUserRepository->createIfRemoteUserNotExisting(
261  $this->getCurrentServer()->getServerId(),
262  $this->getMID(),
263  0,
264  $user->getLogin()
265  );
266  }
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 450 of file class.ilAuthProviderECS.php.

References ilMailOptions\INCOMING_LOCAL.

Referenced by createUser(), and updateUser().

450  : void
451  {
452  $options = new ilMailOptions($a_usr_id);
453  $options->setIncomingType(ilMailOptions::INCOMING_LOCAL);
454  $options->updateOptions();
455  }
final const int INCOMING_LOCAL
+ Here is the caller graph for this function:

◆ resumeCurrentSession()

ilAuthProviderECS::resumeCurrentSession ( )
protected

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

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

Referenced by handleLoginByAuthMode().

200  : bool
201  {
202  $session_user_id = $this->authSession->getUserId();
203  if (!$session_user_id || $session_user_id === ANONYMOUS_USER_ID) {
204  $this->getLogger()->debug('No valid session found');
205  $this->authSession->setAuthenticated(false, ANONYMOUS_USER_ID);
206  return false;
207  }
208  $session_ext_account = ilObjUser::_lookupExternalAccount($session_user_id);
209  $user = new ilECSUser($this->http->request()->getQueryParams());
210  $this->getLogger()->debug('ECS user name: ' . $user->getLogin());
211  $this->getLogger()->debug('Session external account: ' . $session_ext_account);
212  if (!$session_ext_account || strcmp($user->getLogin(), $session_ext_account) !== 0) {
213  $this->getLogger()->debug('No matching session found. Terminating current user session.');
214  $this->authSession->setAuthenticated(false, ANONYMOUS_USER_ID);
215  return false;
216  }
217  // assign to ECS global role
218  $this->rbacAdmin->assignUser($this->getCurrentServer()->getGlobalRole(), $this->authSession->getUserId());
219  return true;
220  }
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.
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 94 of file class.ilAuthProviderECS.php.

References $server.

Referenced by doAuthentication().

94  : void
95  {
96  $this->currentServer = $server;
97  }
$server
Definition: shib_login.php:28
+ Here is the caller graph for this function:

◆ setMID()

ilAuthProviderECS::setMID ( int  $a_mid)

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

Referenced by validateHash().

86  : void
87  {
88  $this->mid = $a_mid;
89  }
+ 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 415 of file class.ilAuthProviderECS.php.

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

Referenced by handleLogin().

415  : string
416  {
417  $user_obj = new ilObjUser($a_local_user_id);
418  $user_obj->setFirstname($user->getFirstname());
419  $user_obj->setLastname($user->getLastname());
420  $user_obj->setEmail($user->getEmail());
421  $user_obj->setInstitution($user->getInstitution());
422  $user_obj->setActive(true);
423 
424  $until = $user_obj->getTimeLimitUntil();
425 
426  if ($until < (time() + (int) $this->clientIniFile->readVariable('session', 'expire'))) {
427  $user_obj->setTimeLimitFrom(time() - 60);
428  $user_obj->setTimeLimitUntil(time() + (int) $this->clientIniFile->readVariable("session", "expire"));
429  }
430  $user_obj->update();
431  $user_obj->refreshLogin();
432 
433  if ($this->getCurrentServer()->getGlobalRole()) {
434  $this->rbacAdmin->assignUser(
435  $this->getCurrentServer()->getGlobalRole(),
436  $user_obj->getId()
437  );
438  }
439 
440  $this->resetMailOptions($a_local_user_id);
441 
442  $this->getLogger()->debug('Finished update of remote user with usr_id: ' . $user->getImportId());
443  return $user_obj->getLogin();
444  }
getFirstname()
get firstname
resetMailOptions(int $a_usr_id)
Reset mail options to "local only".
getCurrentServer()
Get current server.
getLastname()
getLastname
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 271 of file class.ilAuthProviderECS.php.

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

Referenced by doAuthentication().

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

Referenced by getAbreviation().

◆ $authSession

ilAuthSession ilAuthProviderECS::$authSession
private

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

◆ $clientIniFile

ilIniFile ilAuthProviderECS::$clientIniFile
private

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

◆ $ctrl

ilCtrlInterface ilAuthProviderECS::$ctrl
private

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

◆ $currentServer

ilECSSetting ilAuthProviderECS::$currentServer
protected

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

Referenced by getCurrentServer().

◆ $http

HTTPServices ilAuthProviderECS::$http
private

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

◆ $lng

ilLanguage ilAuthProviderECS::$lng
private

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

◆ $mid

int ilAuthProviderECS::$mid = null
protected

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

Referenced by getMID().

◆ $rbacAdmin

ilRbacAdmin ilAuthProviderECS::$rbacAdmin
private

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

◆ $refinery

Refinery ilAuthProviderECS::$refinery
private

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

◆ $servers

ilECSServerSettings ilAuthProviderECS::$servers
protected

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

Referenced by getServerSettings().

◆ $setting

ilSetting ilAuthProviderECS::$setting
private

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


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