1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
private boolean checkLogin(String login, String password) throws RemoteException, MalformedURLException, NotBoundException
{
FGXPersistentDoor persistentLayerDoor = (FGXPersistentDoor) getPersistentDoor();
// Recherche des droits de la personne en fonction du login
FGXDBUserRights p = persistentLayerDoor.loadUser(login);
if (p != null)
{
// Personne trouvée, on vérifie le password
boolean passwordOk = p.getPasswd().equals(password);
if (passwordOk)
{
if (_log.isDebugEnabled())
_log.debug("[checkLogin] user : \"" + login + "\" authentifie");
}
else
{
_log.warn("[checkLogin] user : \"" + login + "\" non authentifie !");
}
return passwordOk;
}
else
{
_log.warn("[checkLogin] l'utilisateur " + login + " n'existe pas");
return false;
}
} |
Partager