title: How to capture the authentication events?
body: <p>I tried the following:</p>
  
  <pre><code>&lt;bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"&gt;
  
      &lt;property name="providers"&gt;
          &lt;list&gt;
            &lt;ref local="myAuthnProvider"/&gt;
          &lt;/list&gt;
        &lt;/property&gt;
  
      &lt;property name="authenticationEventPublisher"&gt;
          &lt;bean class="myPublisher/&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;security:authentication-manager&gt;
      &lt;security:authentication-provider ref="authenticationManager" /&gt;
  &lt;/security:authentication-manager&gt;
  </code></pre>
  
  <p>But I get an exception during startup. I also tried with the constructor tag, same result:</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Could not resolve matching constructor (hint: secify index/type/name arguments for simple parameters to avoid type ambiguities) 
  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:250)
  </code></pre>
  
  <p>I'm using spring 3.1.1.</p>
  
  <p>Any ideas why this error is thrown? Or other suggestions on how to capture the authentication events? Thanks.</p>