bAuthenticated = (getUsername().length() > 0) &&
(getPassword().length() > 0) &&
upCreds.getUsername().equalsIgnoreCase(getUsername()) &&
upCreds.getPassword().equals(getPassword());
} else if (credentials instanceof DistinguishedNameCredential) {
DistinguishedNameCredential dnCred = (DistinguishedNameCredential)credentials;
bAuthenticated = (getDN().length() > 0) &&
dnCred.getDistinguishedName().equalsIgnoreCase(getDN());
} else if (credentials instanceof UsernameCredential) {
UsernameCredential unCred = (UsernameCredential)credentials;
bAuthenticated = (getUsername().length() > 0) &&
unCred.getUsername().equalsIgnoreCase(getUsername());
}