use of org.xdi.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 = ldapEntryManager.find(LdapOxAuthConfiguration.class, configurationDn);
return conf;
} catch (LdapMappingException ex) {
log.error("Failed to load configuration from LDAP");
}
return null;
}
use of org.xdi.config.oxtrust.LdapOxAuthConfiguration in project oxTrust by GluuFederation.
the class JsonConfigurationService method saveOxAuthDynamicConfigJson.
public boolean saveOxAuthDynamicConfigJson(String oxAuthDynamicConfigJson) throws JsonParseException, JsonMappingException, IOException {
String configurationDn = configurationFactory.getConfigurationDn();
LdapOxAuthConfiguration ldapOxAuthConfiguration = loadOxAuthConfig(configurationDn);
ldapOxAuthConfiguration.setOxAuthConfigDynamic(oxAuthDynamicConfigJson);
ldapOxAuthConfiguration.setRevision(ldapOxAuthConfiguration.getRevision() + 1);
ldapEntryManager.merge(ldapOxAuthConfiguration);
return true;
}
use of org.xdi.config.oxtrust.LdapOxAuthConfiguration in project oxTrust by GluuFederation.
the class JsonConfigurationService method getOxAuthDynamicConfigJson.
public String getOxAuthDynamicConfigJson() throws JsonGenerationException, JsonMappingException, IOException {
String configurationDn = configurationFactory.getConfigurationDn();
LdapOxAuthConfiguration ldapOxAuthConfiguration = loadOxAuthConfig(configurationDn);
return ldapOxAuthConfiguration.getOxAuthConfigDynamic();
}
Aggregations