I have now implemented this successfully i.e. I can register users and they can login using the acegi filter but I have hit one problem: I am trying to programatically authenticate the user after they register on our site:
Code:
/**
* Programatically authenticate the user so he doesn't have to sign in
*
* @param email
* @param password
*/
private void authenticateUser(String email, String password) {
Authentication auth = new UsernamePasswordAuthenticationToken(email, password);
Authentication result = authenticationManager.authenticate(auth);
SecurityContext ctx = new SecurityContextImpl();
ctx.setAuthentication(result);
SecurityContextHolder.setContext(ctx);
}
This code worked fine when we were using plaintext passwords, but it no longer works no I am using MD5 hashes, what do I need to change?
Thanks
Toby