Примерно так:
Authentication authentication = new UsernamePasswordAuthenticationToken(person, null, person.getAuthorities());
log.debug("Logging in with {}", authentication.getPrincipal());
SecurityContextHolder.getContext().setAuthentication(authentication);
Где person
- ваш объект UserDetailsBean.