Community
Participate
Working Groups
@Override public Details loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException { User u = User.get(username, false); Details p = u != null ? u.getProperty(Details.class) : null; if (p == null) { throw new UsernameNotFoundException("Password is not set: " + username); } if (p.getUser() == null) { throw new AssertionError(); } return p; } @Override protected Details authenticate(String username, String password) throws AuthenticationException { Details u = loadUserByUsername(username); if (!PASSWORD_ENCODER.isPasswordValid(u.getPassword(), password, null)) { throw new BadCredentialsException("Failed to login as " + username); } return u; } The second method shows that the username exists. We should just return invalid login or incorrect credentials instead.
The Eclipse Hudson project has been terminated and archived.