public Principal authenticate(String username, String credentials) {
GenericPrincipal principal = principals.get(username);
boolean validated = principal != null && getCredentialHandler().matches(credentials, principal.getPassword());
return validated ? principal : null;
}
<BUG>public void addUser(String username, String password) {
principals.put(username, new GenericPrincipal(username, password, Collections.singletonList(AUTH_ROLE)));</BUG>
}
@Override
protected String getName() {

public Principal authenticate(String username, String credentials) {
GenericPrincipal principal = principals.get(username);
boolean validated = principal != null && getCredentialHandler().matches(credentials, principal.getPassword());
return validated ? principal : null;
}
void addUser(String username, String password) {
principals.put(username, new GenericPrincipal(username, password, Collections.singletonList(AUTH_ROLE)));
}
@Override
protected String getName() {
