Search in sources :

Example 21 with GluuLdapConfiguration

use of org.gluu.model.ldap.GluuLdapConfiguration in project oxTrust by GluuFederation.

the class ConfigureCacheRefreshAction method validateLists.

private boolean validateLists() {
    boolean result = true;
    for (GluuLdapConfiguration sourceConfig : this.cacheRefreshConfiguration.getSourceConfigs()) {
        result &= validateList(sourceConfig, "Source", true);
    }
    result &= validateList(this.cacheRefreshConfiguration.getInumConfig(), "Inum", true);
    if (CacheRefreshUpdateMethod.VDS.equals(cacheRefreshConfiguration.getUpdateMethod())) {
        result &= validateList(this.cacheRefreshConfiguration.getTargetConfig(), "Target", false);
    }
    result &= validateList(this.cacheRefreshConfiguration.getKeyAttributes(), "Key attribute");
    result &= validateList(this.cacheRefreshConfiguration.getKeyObjectClasses(), "Object class");
    result &= validateList(this.cacheRefreshConfiguration.getSourceAttributes(), "Source attribute");
    return result;
}
Also used : GluuLdapConfiguration(org.gluu.model.ldap.GluuLdapConfiguration)

Example 22 with GluuLdapConfiguration

use of org.gluu.model.ldap.GluuLdapConfiguration in project oxAuth by GluuFederation.

the class AppInitializer method prepareAuthConnectionProperties.

private List<Properties> prepareAuthConnectionProperties(List<GluuLdapConfiguration> persistenceAuthConfigs, String persistenceType) {
    List<Properties> result = new ArrayList<Properties>();
    // Prepare connection providers per LDAP authentication configuration
    for (GluuLdapConfiguration persistenceAuthConfig : persistenceAuthConfigs) {
        Properties decrypytedConnectionProperties = prepareAuthConnectionProperties(persistenceAuthConfig, persistenceType);
        result.add(decrypytedConnectionProperties);
    }
    return result;
}
Also used : ArrayList(java.util.ArrayList) Properties(java.util.Properties) GluuLdapConfiguration(org.gluu.model.ldap.GluuLdapConfiguration)

Example 23 with GluuLdapConfiguration

use of org.gluu.model.ldap.GluuLdapConfiguration in project oxAuth by GluuFederation.

the class AppInitializer method loadPersistenceAuthConfigs.

private List<GluuLdapConfiguration> loadPersistenceAuthConfigs(GluuConfiguration configuration) {
    List<GluuLdapConfiguration> persistenceAuthConfigs = new ArrayList<GluuLdapConfiguration>();
    List<oxIDPAuthConf> persistenceIdpAuthConfigs = loadLdapIdpAuthConfigs(configuration);
    if (persistenceIdpAuthConfigs == null) {
        return persistenceAuthConfigs;
    }
    for (oxIDPAuthConf persistenceIdpAuthConfig : persistenceIdpAuthConfigs) {
        GluuLdapConfiguration persistenceAuthConfig = persistenceIdpAuthConfig.getConfig();
        if ((persistenceAuthConfig != null) && persistenceAuthConfig.isEnabled()) {
            persistenceAuthConfigs.add(persistenceAuthConfig);
        }
    }
    return persistenceAuthConfigs;
}
Also used : ArrayList(java.util.ArrayList) org.oxauth.persistence.model.configuration.oxIDPAuthConf(org.oxauth.persistence.model.configuration.oxIDPAuthConf) GluuLdapConfiguration(org.gluu.model.ldap.GluuLdapConfiguration)

Aggregations

GluuLdapConfiguration (org.gluu.model.ldap.GluuLdapConfiguration)23 ArrayList (java.util.ArrayList)6 Operation (io.swagger.v3.oas.annotations.Operation)3 ApiResponses (io.swagger.v3.oas.annotations.responses.ApiResponses)3 LdapConfigurationDuplicatedException (org.gluu.oxtrust.api.server.util.LdapConfigurationDuplicatedException)3 OxIDPAuthConf (org.gluu.oxtrust.model.OxIDPAuthConf)3 ProtectedApi (org.gluu.oxtrust.service.filter.ProtectedApi)3 PersistenceEntryManager (org.gluu.persist.PersistenceEntryManager)3 BasePersistenceException (org.gluu.persist.exception.BasePersistenceException)3 IOException (java.io.IOException)2 EncryptionException (org.gluu.util.security.StringEncrypter.EncryptionException)2 SocketException (java.net.SocketException)1 List (java.util.List)1 Properties (java.util.Properties)1 CacheRefreshAttributeMapping (org.gluu.config.oxtrust.CacheRefreshAttributeMapping)1 CacheRefreshConfiguration (org.gluu.config.oxtrust.CacheRefreshConfiguration)1 CustomScript (org.gluu.model.custom.script.model.CustomScript)1 ConnectionStatusDTO (org.gluu.oxtrust.api.server.model.ConnectionStatusDTO)1 GluuConfiguration (org.gluu.oxtrust.model.GluuConfiguration)1 LdapConfigurationLookup (org.gluu.oxtrust.util.LdapConfigurationLookup)1