security-config.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  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="
  6. http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8. http://www.springframework.org/schema/security
  9. http://www.springframework.org/schema/security/spring-security-2.0.2.xsd">
  10. <!-- Configure Spring Security -->
  11. <security:http auto-config="true">
  12. <security:form-login login-page="/app/login" login-processing-url="/app/authenticate" authentication-failure-url="/app/login?login_error=1" />
  13. <security:logout logout-url="/app/logout" />
  14. </security:http>
  15. <!--
  16. Define local authentication provider, a real app would use an external provider (JDBC, LDAP, CAS, etc)
  17. usernames/passwords are:
  18. keith/melbourne
  19. erwin/leuven
  20. jeremy/atlanta
  21. scott/rochester
  22. -->
  23. <security:authentication-provider>
  24. <security:password-encoder hash="md5" />
  25. <security:user-service>
  26. <security:user name="keith" password="417c7382b16c395bc25b5da1398cf076" authorities="ROLE_USER, ROLE_SUPERVISOR" />
  27. <security:user name="erwin" password="12430911a8af075c6f41c6976af22b09" authorities="ROLE_USER, ROLE_SUPERVISOR" />
  28. <security:user name="jeremy" password="57c6cbff0d421449be820763f03139eb" authorities="ROLE_USER" />
  29. <security:user name="scott" password="942f2339bf50796de535a384f0d1af3e" authorities="ROLE_USER" />
  30. </security:user-service>
  31. </security:authentication-provider>
  32. </beans>