@Override
      public void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
        AmbariAuthenticationException cause;
        if (e instanceof AmbariAuthenticationException) {
          cause = (AmbariAuthenticationException) e;
        } else {
          cause = new AmbariAuthenticationException(null, e.getLocalizedMessage(), false, e);
        }
        eventHandler.onUnsuccessfulAuthentication(AmbariKerberosAuthenticationFilter.this, httpServletRequest, httpServletResponse, cause);

        entryPoint.commence(httpServletRequest, httpServletResponse, e);
      }
Constructor.
<p>
Given supplied data, sets up the the {@link SpnegoAuthenticationProcessingFilter} to perform
authentication and audit logging if configured do to so.

@param authenticationManager the Spring authentication manager
@param entryPoint            the Spring entry point
@param configuration         the Ambari configuration data
@param eventHandler          the Ambari authentication event handler
ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilter.java