final boolean isValidPassword = this.payerService.checkPassword(
pass, payer.getPassword());
if (isValidPassword) {
systemAuthentication = doAuthenticate(authentication, payer);
} else {
throw new AuthenticationFailedException(
"cts.error.auth.password.not.valid");
}
} catch (final DataNotRetrievedException e) {
LOGGER.error(e.getLocalizedMessage());
throw new AuthenticationFailedException(
"cts.error.auth.user.not.found");
}
return systemAuthentication;
}