Should return null if user is not valid.

This commit is contained in:
Michael Jumper
2011-12-21 00:09:18 -08:00
parent cc2e57e1d6
commit 19fe9dcc9b

View File

@@ -137,10 +137,13 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider<U
// 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;
}