error.setErrorText("authKey must not be empty for AuthKey authentication type.");
}
}
}
else if(authType.equals(AuthType.IP_WHITE_LIST)){
IpWhiteList ipWhiteListAuth = auth.getIpWhiteListAuth();
if(ipWhiteListAuth == null) {
inError = true;
error.setErrorText("Request did not contain ipWhiteListAuth info.");
} else {
// We don't check for null ipList here, but could ....
List<String> ipList = ipWhiteListAuth.getIp();
// Check for duplicate white-list ips by adding all members of list to a Set
Set<String> testSet = new HashSet<String>();
for (String ip : ipList) {
if (testSet.contains(ip)) {
if(LOG.isDebugEnabled())