- public static void updatePrincipal(UserDetails newPrincipal) {
- Authentication authentication = new UsernamePasswordAuthenticationToken(newPrincipal, null, (Collection) newPrincipal.getAuthorities());
- SecurityContextHolder.getContext().setAuthentication(authentication);
- }
0 件のコメント:
コメントを投稿