use of cz.metacentrum.perun.core.impl.modules.pwdmgr.GenericPasswordManagerModule in project perun by CESNET.
the class UsersManagerBlImpl method getPasswordManagerModule.
@Override
public PasswordManagerModule getPasswordManagerModule(PerunSession session, String namespace) {
PasswordManagerModule module = getUsersManagerImpl().getPasswordManagerModule(session, namespace);
if (module == null) {
log.info("Password manager module for '{}' not found. Loading 'generic' password manager module instead.", namespace);
module = getUsersManagerImpl().getPasswordManagerModule(session, "generic");
if (module instanceof GenericPasswordManagerModule) {
// set proper login-namespace to the generic module
((GenericPasswordManagerModule) module).setActualLoginNamespace(namespace);
}
}
if (module == null) {
log.error("No password manager module found by the class loader for both '{}' and 'generic' namespaces.", namespace);
throw new InternalErrorException("No password manager module implementation found by the class loader for both '" + namespace + "' and 'generic' namespaces.");
}
return module;
}
Aggregations