I tried the following:

```
<bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">

    <property name="providers">
        <list>
          <ref local="myAuthnProvider"/>
        </list>
      </property>

    <property name="authenticationEventPublisher">
        <bean class="myPublisher/>
    </property>
</bean>

<security:authentication-manager>
    <security:authentication-provider ref="authenticationManager" />
</security:authentication-manager>

```

But I get an exception during startup. I also tried with the constructor tag, same result:

```
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)

```

I'm using spring 3.1.1.

Any ideas why this error is thrown? Or other suggestions on how to capture the authentication events? Thanks.