19 declare(strict_types=1);
53 $this->
getLogger()->error(
'Cannot bind to LDAP server... ' . $e->getMessage());
59 $users =
$query->fetchUser(
78 if (!
$query->checkGroupMembership(
79 $this->getCredentials()->getUsername(),
86 $this->
getLogger()->error(
'Cannot fetch LDAP user data... ' . $e->getMessage());
111 $user = array_change_key_case($user, CASE_LOWER);
115 'ldap_' . $this->
getServer()->getServerId(),
118 $sync->setExternalAccount($this->
getCredentials()->getUsername());
119 $sync->setUserData($user);
120 $sync->forceCreation($this->force_new_account);
123 $internal_account = $sync->sync();
124 $this->
getLogger()->debug(
'Internal account: ' . $internal_account);
126 $this->
getLogger()->info(
'Login failed with message: ' . $e->getMessage());
134 $this->
getLogger()->info(
'Login failed with message: ' . $e->getMessage());
140 $this->
getLogger()->info(
'Authentication failed: account migration required for external account: ' . $this->
getCredentials()->getUsername());
159 $this->force_new_account =
true;
165 $this->
getLogger()->error(
'Cannot bind to LDAP server... ' . $e->getMessage());
171 $users =
$query->fetchUser(
183 $this->
getLogger()->error(
'Cannot fetch LDAP user data... ' . $e->getMessage());
197 $this->force_new_account =
true;
203 $this->
getLogger()->error(
'Cannot bind to LDAP server... ' . $e->getMessage());
225 return 'ldap_' . $this->
getServer()->getServerId();
238 $this->migration_account = $a_name;
247 return array_key_first(array_change_key_case([$a_string => $a_string]));
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface of auth credentials.
updateAccount(ilAuthStatus $status, array $user)
Update Account.
createNewAccount(ilAuthStatus $status)
string $migration_account
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Synchronization of user accounts used in auth container ldap, cas,...
static _lookupId($a_user_str)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
changeKeyCase(string $a_string)
Change case similar to array_change_key_case, to avoid further encoding problems. ...
handleAuthenticationFail(ilAuthStatus $status, string $a_reason)
Handle failed authentication.
Base class for authentication providers (ldap, apache, ...)
__construct(ilAuthCredentials $credentials, int $a_server_id=0)
setStatus(int $a_status)
Set auth status.
doAuthentication(ilAuthStatus $status)
ilAuthCredentials $credentials
const STATUS_AUTHENTICATED
initServer(int $a_server_id)
migrateAccount(ilAuthStatus $status)
__construct(Container $dic, ilPlugin $plugin)
setAuthenticatedUserId(int $a_id)
setExternalAccountName(string $a_name)
Auth status implementation.
const STATUS_ACCOUNT_MIGRATION_REQUIRED