Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 15th, 2012  |  syntax: None  |  size: 0.29 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Spring Security: Authentication user manually
  2. Authentication authentication =  new UsernamePasswordAuthenticationToken(person, null, person.getAuthorities());
  3. log.debug("Logging in with {}", authentication.getPrincipal());
  4. SecurityContextHolder.getContext().setAuthentication(authentication);