32 include_once(
'Services/Authentication/classes/class.ilAuthUtils.php');
60 include_once
"./Services/Administration/classes/class.ilSetting.php";
75 if (self::$instance) {
76 return self::$instance;
91 return $this->kind == self::TYPE_MANUAL;
114 $this->kind = $a_kind;
125 if (!strlen($a_username)) {
126 return $this->position ? $this->position :
array();
130 foreach ($this->position as $auth_key) {
131 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
136 if (strlen(
$server->getUsernameFilter())) {
138 $pattern = str_replace(
'*',
'.*?',
$server->getUsernameFilter());
140 if (preg_match(
'/^' . $pattern .
'$/', $a_username)) {
142 array_unshift($sorted, $auth_key);
148 $sorted[] = $auth_key;
151 return (
array) $sorted;
162 return count($this->position);
174 $this->position = $a_pos;
191 foreach ($this->position as $auth_mode) {
208 $this->kind = $this->
settings->get(
'kind', self::TYPE_MANUAL);
211 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
214 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
216 $rad_active = $rad_settings->isActive();
218 $soap_active = $ilSetting->get(
'soap_auth_active',
false);
221 $apache_settings =
new ilSetting(
'apache_auth');
222 $apache_active = $apache_settings->get(
'apache_enable_auth');
228 $auth_mode = $this->
settings->get((
string)
$i++,
false);
229 if ($auth_mode ===
false) {
234 switch ((
int) $auth_mode) {
236 $this->position[] = $auth_mode;
244 $this->position[] = $auth_mode;
250 $this->position[] = $auth_mode;
256 $this->position[] = $auth_mode;
261 if ($apache_active) {
262 $this->position[] = $auth_mode;
269 if ($pl->isAuthActive($auth_mode)) {
270 $this->position[] = $auth_mode;
289 if (!in_array(
AUTH_LDAP .
'_' . $sid, $this->position)) {
290 $this->position[] = (
AUTH_LDAP .
'_' . $sid);
301 if (!in_array(
AUTH_SOAP, $this->position)) {
305 if ($apache_active) {
312 foreach ($pl->getAuthIds() as $auth_id) {
313 if ($pl->isAuthActive($auth_id)) {
314 if (!in_array($auth_id, $this->position)) {
315 $this->position[] = $auth_id;
setAuthModeSequence($a_pos)
set auth mode sequence
static _getActiveServerList()
Get active server list.
static getInstanceByServerId($a_server_id)
Get instance by server id.
isManualSelection()
is manual selection
static getAuthPlugins()
Get active enabled auth plugins.
static _getInstance()
singleton get instance
static getServerIdByAuthMode($a_auth_mode)
Get auth id by auth mode.
Create styles array
The data for the language used.
setKind($a_kind)
set kind of determination
__construct()
Constructor (Singleton)
static _getInstance()
Get instance.
getAuthModeSequence($a_username='')
get auth mode sequence
getCountActiveAuthModes()
get number of auth modes
static getLogger($a_component_id)
Get component logger.