3); $objChecker = new com_borealis_authentication_checker_LdapChecker($objRawPasswordCreator, $g_strLDAPHostname, $g_iLDAPPort, $g_strLDAPSearchDN, $g_strLDAPUsernameColumn, $g_strLDAPArrayOptions) ; break; case 'pdo': // Checker qui vérifie les droits de connexion par une BD $g_strPDODSN = 'pgsql:host=192.168.3.204;port=5433;dbname=geoprisma;user=postgres;password=postgres'; $g_strPDOQuery = 'select id from users where username = :username and password = :password'; $objChecker = new com_borealis_authentication_checker_PDOChecker($objMD5PasswordCreator, $g_strPDODSN, $g_strPDOQuery); break; case 'xml_1': // Checker qui vérifie les droits de connexion par un fichier XML $g_strXMLFILE = dirname(__FILE__).'/users.xml'; $objChecker = new com_borealis_authentication_checker_XMLChecker($objRawPasswordCreator, $g_strXMLFILE); break; case 'xml_2': // Checker qui vérifie les droits de connexion par un fichier XML $g_strXMLFILE = dirname(__FILE__).'/users.xml'; $objChecker = new com_borealis_authentication_checker_XMLChecker($objMD5PasswordCreator, $g_strXMLFILE); break; } // ---- com_borealis_authentication_SettingImpl setCheckers (Permet d'indiquer la liste des Checker qui serons utiliser par le com_borealis_authentication_AuthenticationManager) // ---- com_borealis_authentication_SettingImpl::setCheckers(array($objChecker)); // ----------------------------------------------- // --- Step 4 : Test if user is authorized to login // ----------------------------------------------- $bIsAuthorized = com_borealis_authentication_AuthenticationManager::isAuthorized($strUsername, $strPassword); if ($bIsAuthorized) { $_SESSION['login_username'] = $strUsername; } else { $strError = 'Bad username or password'; include 'login.php'; exit; } } ?>