All:
I'm using Acegi 0.7.0 (older project and no time to upgrade) and I need to automatically log in a user after he registers. I'm trying the code below, but it's not working. Am I even on the right track? I don't receive any errors. Logging in using the form method works fine. Any assistance is appreciated.
Code:Authentication auth = new UsernamePasswordAuthenticationToken(user.getUsername(),user.getPassword(),new GrantedAuthority[]{}); SecureContext acontext = (SecureContext)ContextHolder.getContext(); if (acontext == null) { acontext = new SecureContextImpl(); } ContextHolder.setContext(acontext); auth.setAuthenticated(true); acontext.setAuthentication(auth);


