private void authenticateUser(String userName, String password) throws SecurityException
{
DirContext ctx = null;
try
{
Filter filter = new EqualsFilter(userEntryPrefix, userName);
if (userFilter != null)
{
filter = new AndFilter().and(userFilter).and(filter);
}
ctx = poolingContextsource.getReadOnlyContext();
NamingEnumeration<SearchResult> results = ctx.search(userSearchPath, filter.encode(), searchControls);
String dn = null;
if (null != results && results.hasMore())
{
SearchResult result = results.next();