use of org.gluu.config.oxtrust.LdapOxAuthConfiguration in project oxTrust by GluuFederation.
the class OrganizationService method getOxAuthSetting.
public LdapOxAuthConfiguration getOxAuthSetting(String configurationDn) {
LdapOxAuthConfiguration ldapOxAuthConfiguration = null;
try {
configurationDn = configurationDn.replace("ou=oxtrust", "ou=oxauth");
ldapOxAuthConfiguration = persistenceEntryManager.find(LdapOxAuthConfiguration.class, configurationDn);
return ldapOxAuthConfiguration;
} catch (BasePersistenceException ex) {
log.error("Failed to load configuration from LDAP");
}
return null;
}
use of org.gluu.config.oxtrust.LdapOxAuthConfiguration in project oxTrust by GluuFederation.
the class JsonConfigurationService method saveOxAuthDynamicConfigJson.
public boolean saveOxAuthDynamicConfigJson(String oxAuthDynamicConfigJson) throws IOException {
String configurationDn = configurationFactory.getConfigurationDn();
LdapOxAuthConfiguration ldapOxAuthConfiguration = loadOxAuthConfig(configurationDn);
ldapOxAuthConfiguration.setOxAuthConfigDynamic(oxAuthDynamicConfigJson);
ldapOxAuthConfiguration.setRevision(ldapOxAuthConfiguration.getRevision() + 1);
persistenceEntryManager.merge(ldapOxAuthConfiguration);
return true;
}
use of org.gluu.config.oxtrust.LdapOxAuthConfiguration in project oxTrust by GluuFederation.
the class JsonConfigurationService method loadOxAuthConfig.
private LdapOxAuthConfiguration loadOxAuthConfig(String configurationDn) {
try {
configurationDn = configurationDn.replace("ou=oxtrust", "ou=oxauth");
LdapOxAuthConfiguration conf = persistenceEntryManager.find(LdapOxAuthConfiguration.class, configurationDn);
return conf;
} catch (BasePersistenceException ex) {
log.error("Failed to load configuration from LDAP");
}
return null;
}
Aggregations