protected void logInWithPassword(String username, char[] password) {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(
protected void logInWithPassword(String username, char[] password) {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(
- username, new String(password));
Authentication authentication = authenticationManager
.authenticate(token);
SecurityContextHolder.getContext().setAuthentication(authentication);
Authentication authentication = authenticationManager
.authenticate(token);
SecurityContextHolder.getContext().setAuthentication(authentication);