mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +01:00
LSsession : added loadLSauth() method and used this method to load LSauth class and configuration.
This commit is contained in:
parent
6feab1b394
commit
06cd1f4c78
1 changed files with 30 additions and 6 deletions
|
@ -284,6 +284,33 @@ class LSsession {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chargement d'une classe d'authentification d'LdapSaisie
|
||||||
|
*
|
||||||
|
* @param[in] $auth Nom de la classe d'authentification a charger (Exemple : HTTP)
|
||||||
|
*
|
||||||
|
* @author Benjamin Renard <brenard@easter-eggs.com
|
||||||
|
*
|
||||||
|
* @retval boolean true si le chargement a reussi, false sinon.
|
||||||
|
*/
|
||||||
|
public static function loadLSauth($auth=false) {
|
||||||
|
if (self :: loadLSclass('LSauth')) {
|
||||||
|
if ($auth) {
|
||||||
|
if(self :: includeFile(LS_CLASS_DIR .'class.LSauth'.$auth.'.php')) {
|
||||||
|
self :: includeFile(LS_CONF_DIR."LSauth/config.LSauth".$auth.".php");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LSerror :: addErrorCode('LSsession_05','LSauth');
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chargement des addons LdapSaisie
|
* Chargement des addons LdapSaisie
|
||||||
*
|
*
|
||||||
|
@ -553,11 +580,11 @@ class LSsession {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (self :: loadLSclass('LSauth')) {
|
if (self :: loadLSauth()) {
|
||||||
if (isset(self :: $ldapServer['LSauth']['method'])) {
|
if (isset(self :: $ldapServer['LSauth']['method'])) {
|
||||||
$LSauthClass = 'LSauth'.self :: $ldapServer['LSauth']['method'];
|
$LSauthClass = 'LSauth'.self :: $ldapServer['LSauth']['method'];
|
||||||
if (!self :: loadLSclass($LSauthClass)) {
|
if (!self :: loadLSauth(self :: $ldapServer['LSauth']['method'])) {
|
||||||
LSerror :: addErrorCode('LSsession_08',$LSauthClass);
|
LSerror :: addErrorCode('LSsession_08',self :: $ldapServer['LSauth']['method']);
|
||||||
$LSauthClass = 'LSauth';
|
$LSauthClass = 'LSauth';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,9 +609,6 @@ class LSsession {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
LSerror :: addErrorCode('LSsession_05','LSauth');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue