How to configure spring security 2.0 to use a custom UserDetailsService?
I feel quite stupid for having to ask this, but I just wasn't getting anywhere with the docs and google...
How do I configure Spring Security to use my own UserDetailsService implementation? My UserDetailsService is defined in the normal Spring web app context config file (myappname-servlet.xml):
I also have another config file, applicationContext-security-ns.xml. In this file I have a simple security setup:
<bean id="userDetailsService" class="myappname.auth.UserDetailsServiceImpl">
<ref bean="testDao" />
<form-login login-page="/home.html" />
<user name="user" password="user"
authorities="ROLE_ADMIN, ROLE_USER" />
The simple authentication-provider works ok, but trying to refer to my own userDetailsService doesn't work. This has got to be very simple, could someone please show me how to do it?