I am working against an Active Directory and the server response is a boolean. And always, always, enter the "true" part of the if.
I have done debug returns false
the validation against the Active Directory has gone well or badly.
Since the result is false, should not I go to the else?
The part of my code:
if(callLDAP(internalVO));//este metodo devuelve un boolean
System.out.println("Entra en el true");
}else{
System.out.println("Entra en el false");
}
The code of callLDAP
is basically this:
private static boolean callLDAP(InternalDoLoginVO internalVO){
boolean status = false;
String LDAPServer = "servidor";
String LDAPPort = "puerto";
String LDAPDomain = "dominio";
String LDAPUser = internalVO.getUser();
String LDAPassword = internalVO.getPass();
LDAPServer LDAP = new LDAPServer(LDAPServer, LDAPPort, LDAPDomain);
LDAP.setCredentials(LDAPUser, LDAPassword);
status = LDAP.doLogin();//haciendo debug esta variable es false
return status;
}