Search in sources :

Example 1 with WebKeysSettings

use of org.xdi.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.xdi.config.oxauth.WebKeysSettings) Date(java.util.Date)

Example 2 with WebKeysSettings

use of org.xdi.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 (BaseMappingException ex) {
        log.error("Failed to load configuration from LDAP");
    }
}
Also used : BaseMappingException(org.gluu.persist.exception.mapping.BaseMappingException) WebKeysSettings(org.xdi.config.oxauth.WebKeysSettings)

Aggregations

WebKeysSettings (org.xdi.config.oxauth.WebKeysSettings)2 Date (java.util.Date)1 BaseMappingException (org.gluu.persist.exception.mapping.BaseMappingException)1