validPassword.setCandidatePassword(candidate);
validPassword.setIdentifier(querySpec.getIdentifier());
// Here's where the validation occurs
for (int i=0;i<validationRules.size();i++) {
logger.info("[PasswordValidationRequestCommand] Running rule "+i+"...");
PasswordValidationRule rule=(PasswordValidationRule)validationRules.get(i);
ValidationStatus status=rule.validate(querySpec);
if (status!=null) {
logger.info("[PasswordValidationRequestCommand] Candidate password "+candidate
+" violates rule "+i+", "+rule.getClass().getName());
validationStatuses.add(status);
}
}
// check for rule violation. If none, return validation status 0
if (validationStatuses.size()==0) {