protected Principal getPrincipal(String username) {
Principal p = userPrincipals.get(username);
if (p == null) {
String pass = userPass.get(username);
if (pass != null) {
p = new GenericPrincipal(username, pass,
userRoles.get(username));
userPrincipals.put(username, p);
}
}
return p;