authentication-beanRef-attributes.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:security="http://www.springframework.org/schema/security"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  6. http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
  7. <!-- http://www.springframework.org/schema/security file:/Users/vpuri/interface21/acegisecurity/trunk/acegisecurity/core/src/main/resources/org/acegisecurity/config/spring-security-2.0.xsd -->
  8. <!-- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd" -->
  9. <security:authentication-repository id="authenticationRepository" repositoryBeanRef="refToUserDetailsService">
  10. <security:salt-source saltSourceBeanRef="refToSaltSource"/>
  11. <security:password-encoder encoderBeanRef="refToPasswordEncoder"/>
  12. </security:authentication-repository>
  13. <bean id="refToUserDetailsService"
  14. class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
  15. <property name="dataSource">
  16. <ref bean="dataSource" />
  17. </property>
  18. </bean>
  19. <bean id="dataSource"
  20. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  21. <property name="driverClassName">
  22. <value>org.hsqldb.jdbcDriver</value>
  23. </property>
  24. <property name="url">
  25. <value>jdbc:hsqldb:mem:test</value>
  26. <!-- <value>jdbc:hsqldb:hsql://localhost/acl</value> -->
  27. </property>
  28. <property name="username">
  29. <value>sa</value>
  30. </property>
  31. <property name="password">
  32. <value></value>
  33. </property>
  34. </bean>
  35. <bean id="refToSaltSource"
  36. class="org.acegisecurity.providers.dao.salt.SystemWideSaltSource">
  37. <property name="systemWideSalt">
  38. <value>12345</value>
  39. </property>
  40. </bean>
  41. <bean id="refToPasswordEncoder"
  42. class="org.acegisecurity.providers.encoding.Md5PasswordEncoder" />
  43. </beans>