// Commenting out for the using latest securty API's
//boolean success = userManager.authenticate(username, password);
//if (success)
AuthenticatedUser authUser = null;
try{
authUser = authProvider.authenticate(username, password);
}
catch (SecurityException e)
{
audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_FAILURE, "PortalFilter");
request.getSession().setAttribute(LoginConstants.ERRORCODE, LoginConstants.ERROR_INVALID_PASSWORD);