// Validate and return info for given user and pass
AuthInfo info = mapping.get(credentials.getUsername());
- if (info != null && info.validate(credentials.getUsername(), credentials.getPassword()))
+ if (info != null && info.validate(credentials.getUsername(), credentials.getPassword())) {
configs.put("DEFAULT", info.getConfiguration());
+ return configs;
+ }
- return configs;
+ // Unauthorized
+ return null;
}