Search in sources :

Example 1 with WebKeysSettings

use of org.gluu.config.oxauth.WebKeysSettings in project oxTrust by GluuFederation.

the class UpdateOrganizationAction method saveWebKeySettings.

public void saveWebKeySettings() {
    String configurationDn = configurationFactory.getConfigurationDn();
    ldapOxAuthConfiguration = organizationService.getOxAuthSetting(configurationDn);
    WebKeysSettings oldwebKeysSettings = ldapOxAuthConfiguration.getOxWebKeysSettings();
    if ((oldwebKeysSettings != null) && !oldwebKeysSettings.equals(webKeysSettings)) {
        webKeysSettings.setUpdateAt(new Date());
        ldapOxAuthConfiguration.setOxWebKeysSettings(webKeysSettings);
        organizationService.saveLdapOxAuthConfiguration(ldapOxAuthConfiguration);
    }
}
Also used : WebKeysSettings(org.gluu.config.oxauth.WebKeysSettings) Date(java.util.Date)

Example 2 with WebKeysSettings

use of org.gluu.config.oxauth.WebKeysSettings in project oxTrust by GluuFederation.

the class UpdateOrganizationAction method initOxAuthSetting.

private void initOxAuthSetting() {
    String configurationDn = configurationFactory.getConfigurationDn();
    try {
        ldapOxAuthConfiguration = organizationService.getOxAuthSetting(configurationDn);
        this.webKeysSettings = ldapOxAuthConfiguration.getOxWebKeysSettings();
        if (webKeysSettings == null) {
            webKeysSettings = new WebKeysSettings();
        }
    } catch (BasePersistenceException ex) {
        log.error("Failed to load configuration from LDAP");
    }
}
Also used : BasePersistenceException(org.gluu.persist.exception.BasePersistenceException) WebKeysSettings(org.gluu.config.oxauth.WebKeysSettings)

Aggregations

WebKeysSettings (org.gluu.config.oxauth.WebKeysSettings)2 Date (java.util.Date)1 BasePersistenceException (org.gluu.persist.exception.BasePersistenceException)1