// add success to audit trail
boolean authenticated = result.isAuthenticated();
LogUtil.info(getClass().getName(), "Authentication for user " + username + ": " + authenticated);
WorkflowHelper workflowHelper = (WorkflowHelper) AppUtil.getApplicationContext().getBean("workflowHelper");
workflowHelper.addAuditTrail("DirectoryJsonController", "authenticate", "Authentication for user " + username + ": " + authenticated);
} catch (AuthenticationException e) {
// add failure to audit trail
if (username != null) {
LogUtil.info(getClass().getName(), "Authentication for user " + username + ": false");