24 include_once(
'Auth/Container/RADIUS.php');
58 #$_POST['username'] = utf8_decode($_POST['username']); 59 #$_POST['password'] = utf8_decode($_POST['password']); 60 $GLOBALS[
'ilLog']->write(__METHOD__.
': Decoded username and password to latin1.');
63 parent::__construct($this->radius_settings->toPearAuthArray());
83 $this->force_creation =
true;
94 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
100 $user_data = array_change_key_case($a_auth->getAuthData(),CASE_LOWER);
103 if(!$user_data[
'ilInternalAccount'])
105 if($this->radius_settings->enabledCreation())
111 $_SESSION[
'tmp_external_account'] = $a_username;
113 $_SESSION[
'tmp_roles'] = array(0 => $this->radius_settings->getDefaultRole());
115 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmd=showAccountMigration&cmdClass=ilstartupgui');
118 $new_name = $this->radius_user->create($a_username);
119 $a_auth->setAuth($new_name);
133 $a_auth->setAuth($user_data[
'ilInternalAccount']);
144 include_once
'Services/Radius/classes/class.ilRadiusSettings.php';
157 include_once(
'Services/Radius/classes/class.ilRadiusAttributeToUser.php');
168 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
173 $GLOBALS[
'ilLog']->write(__METHOD__.
'Using ldap data source');
175 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
178 $sync->setUserData(array());
179 $sync->forceCreation($this->force_creation);
182 $internal_account = $sync->sync();
184 catch(UnexpectedValueException $e) {
185 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
192 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
198 $GLOBALS[
'ilLog']->write(__METHOD__.
': Starting account migration.');
200 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
203 $a_auth->setAuth($internal_account);
Description of ilLDAPSyncronisationException.
initRADIUSAttributeToUser()
Init RADIUS attribute mapping.
Synchronization of user accounts used in auth container ldap, radius , cas,...
const AUTH_RADIUS_NO_ILIAS_USER
setExternalAccount($a_ext)
Set external account (unique for each auth mode)
Description of ilLDAPAccountMigrationRequiredException.
static getInstanceByServerId($a_server_id)
handleLDAPDataSource($a_auth, $ext_account)
Handle ldap as data source.
static isDataSourceActive($a_auth_mode)
Check if a data source is active for a specific auth mode ilDB $ilDB.
static _getInstance()
singleton get instance
forceCreation($a_status)
Force creation of user accounts.
static getDataSource($a_auth_mode)
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
Overwritten Pear class AuthContainerRadius This class is overwritten to support to perform Radius aut...
supportsCaptchaVerification()
const AUTH_WRONG_LOGIN
Returned if container is unable to authenticate user/password pair.
const RADIUS_CHARSET_LATIN1
initSettings()
Init radius settings.
__construct()
Constructor.
loginObserver($a_username, $a_auth)
Called from base class after successful login.
static redirect($a_script)
http redirect to other script