protected final boolean doAuthentication(final Credentials credentials)
throws AuthenticationException {
final SpnegoCredentials ntlmCredentials = (SpnegoCredentials) credentials;
final byte[] src = ntlmCredentials.getInitToken();
UniAddress dc = null;
try {
if (this.loadBalance) {
// find the first dc that matches the includepattern
if(this.includePattern != null){
NbtAddress [] dcs = NbtAddress.getAllByName(this.domainController,0x1C, null,null);
for(int i=0;i<dcs.length;i++){
if(dcs[i].getHostAddress().matches(this.includePattern)){
dc = new UniAddress(dcs[i]);
break;
}
}
}
else
dc = new UniAddress(NbtAddress.getByName(this.domainController,
0x1C, null));
} else {
dc = UniAddress.getByName(this.domainController, true);
}
final byte[] challenge = SmbSession.getChallenge(dc);