resin-acegisecurity.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
  3. <!--
  4. * The Acegi Security System for Spring is published under the terms
  5. * of the Apache Software License.
  6. *
  7. * This springsecurity.xml file will only be used by Resin. Normally the
  8. * springsecurity.xml is container-wide, but in the case of Resin it is
  9. * web application specific.
  10. *
  11. * $Id$
  12. *
  13. * This file will be copied into WAR's classes directory if using container adapter
  14. *
  15. -->
  16. <beans>
  17. <!-- ================= CONTAINER ADAPTER CONFIGURATION ================ -->
  18. <!-- Data access object which stores authentication information -->
  19. <bean id="inMemoryDaoImpl" class="net.sf.acegisecurity.providers.dao.memory.InMemoryDaoImpl">
  20. <property name="userMap">
  21. <value>
  22. marissa=koala,ROLE_TELLER,ROLE_SUPERVISOR
  23. dianne=emu,ROLE_TELLER
  24. scott=wombat,ROLE_TELLER
  25. peter=opal,disabled,ROLE_TELLER
  26. </value>
  27. </property>
  28. </bean>
  29. <!-- Authentication provider that queries our data access object -->
  30. <bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
  31. <property name="authenticationDao"><ref bean="inMemoryDaoImpl"/></property>
  32. <property name="forcePrincipalAsString"><value>true</value></property>
  33. </bean>
  34. <!-- The authentication manager that iterates through our only authentication provider -->
  35. <bean id="authenticationManager" class="net.sf.acegisecurity.providers.ProviderManager">
  36. <property name="providers">
  37. <list>
  38. <ref bean="daoAuthenticationProvider"/>
  39. </list>
  40. </property>
  41. </bean>
  42. </beans>