-
Nov 18th, 2012, 07:33 AM
#1
security tag can not work after autologin
I add some code for autologin after register. this is the code
UserDetails userDetails = userDetailsService.loadUserByUsername(username);
Authentication authentication = new PrincipalSpringSecurityUserToken(username,
username, userDetails.getPassword(), userDetails.getAuthorities(), userDetails);
// Place the new Authentication object in the security context.
SecurityContextHolder.getContext().setAuthenticati on(authentication);
I use security tag to show username after login. but username do not appear. who can tell me, what wrong.
thanks in advances
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules