log.debug("Checking publicKeyHash: " + publicKeyHash);
byte[] hash = Hex.fromHex(publicKeyHash);
UserEntity user;
try {
user = repository.findUserByPublicKey(hash);
} catch (RepositoryException e) {
throw new AuthenticatorException("Error while authenticating user", e);
}