Currently I am writing a web application using Spring Security. We have a web service which authenticates users by username and password.
Web service:
String[] login(String username, String password);
How do I configure Spring Security to pass the provided username and password to the web service?
I have written a UserDetailsService which only receives a username.
I think the problem is with your xml. Did you turned off the auto-config? And does your class extend AbstractUserDetailsAuthenticationProvider?
解决方案
Extend org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
/**
* @author rodrigoap
*
*/
public class WebServiceUserDetailsAuthenticationProvider extends
AbstractUserDetailsAuthenticationProvider {
@Override
protected UserDetails r