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_auth_mode_type'] =
'radius';
112 $_SESSION[
'tmp_external_account'] = $a_username;
114 $_SESSION[
'tmp_roles'] =
array(0 => $this->radius_settings->getDefaultRole());
116 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmd=showAccountMigration&cmdClass=ilstartupgui');
119 $new_name = $this->radius_user->create($a_username);
120 $a_auth->setAuth($new_name);
134 $a_auth->setAuth($user_data[
'ilInternalAccount']);
145 include_once
'Services/Radius/classes/class.ilRadiusSettings.php';
158 include_once(
'Services/Radius/classes/class.ilRadiusAttributeToUser.php');
169 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
174 $GLOBALS[
'ilLog']->write(__METHOD__.
'Using ldap data source');
176 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
179 $sync->setUserData(
array());
180 $sync->forceCreation($this->force_creation);
183 $internal_account = $sync->sync();
186 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
187 $a_auth->status = AUTH_WRONG_LOGIN;
193 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
199 $GLOBALS[
'ilLog']->write(__METHOD__.
': Starting account migration.');
201 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
204 $a_auth->setAuth($internal_account);
Description of ilLDAPSyncronisationException.
initRADIUSAttributeToUser()
Init RADIUS attribute mapping.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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)
Get instance by 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)
Create styles array
The data for the language used.
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 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