Commit 6ae86ad6 authored by michael.simon's avatar michael.simon
Browse files

add check for localUid not found

parent cbb0376d
......@@ -55,10 +55,6 @@ public class TwoFaConfigurationResolver {
invocable.invokeFunction("resolveConfig", scriptingEnv, configMap, identity, logger);
if (! configMap.containsKey("userId")) {
configMap.put("userId", identity.getTwoFaUserId());
}
return configMap;
} else {
throw new TwoFaConfigurationResolverException("unkown script type: " + scriptEntity.getScriptType());
......
......@@ -82,6 +82,9 @@ public class TwoFaLoginServiceImpl implements TwoFaLoginService {
if (registryList.size() == 0) {
registryList.addAll(registryDao.findAllByRegValueAndStatus(service, "localUid", eppn, RegistryStatus.ON_HOLD));
}
if (registryList.size() == 0) {
throw new NoUserFoundException("no such localUid in registries");
}
registry = registryList.get(0);
user = registry.getUser();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment