this.resourceStreamSource = configuration.getResourceStreamSource();
}
@Override
public final boolean isValid(final AuthenticationRequest request) {
final AuthenticationRequestPassword passwordRequest = (AuthenticationRequestPassword) request;
final String username = passwordRequest.getName();
if (Strings.isNullOrEmpty(username)) {
return false;
}
final String password = passwordRequest.getPassword();
Assert.assertNotNull(password);
BufferedReader reader = null;
try {
final InputStream readStream = resourceStreamSource.readResource(FileAuthenticationConstants.PASSWORDS_FILE);