Search in sources :

Example 1 with LdapClaimsHandlerServiceProperties

use of org.codice.ddf.admin.security.common.services.LdapClaimsHandlerServiceProperties in project admin-console-beta by connexta.

the class LdapServiceCommons method getLdapConfigurations.

public ListField<LdapConfigurationField> getLdapConfigurations() {
    List<LdapConfigurationField> ldapLoginConfigs = new LdapLoginServiceProperties(configuratorSuite).getLdapLoginManagedServices().values().stream().map(this::ldapLoginServiceToLdapConfiguration).collect(Collectors.toList());
    List<LdapConfigurationField> ldapClaimsHandlerConfigs = new LdapClaimsHandlerServiceProperties(configuratorSuite).getLdapClaimsHandlerManagedServices().values().stream().map(this::ldapClaimsHandlerServiceToLdapConfig).collect(Collectors.toList());
    List<LdapConfigurationField> configs = Stream.concat(ldapLoginConfigs.stream(), ldapClaimsHandlerConfigs.stream()).collect(Collectors.toList());
    configs.stream().forEach(config -> config.bindUserInfoField().password(FLAG_PASSWORD));
    return new LdapConfigurationField.ListImpl().addAll(configs);
}
Also used : LdapClaimsHandlerServiceProperties(org.codice.ddf.admin.security.common.services.LdapClaimsHandlerServiceProperties) LdapConfigurationField(org.codice.ddf.admin.ldap.fields.config.LdapConfigurationField) LdapLoginServiceProperties(org.codice.ddf.admin.security.common.services.LdapLoginServiceProperties)

Example 2 with LdapClaimsHandlerServiceProperties

use of org.codice.ddf.admin.security.common.services.LdapClaimsHandlerServiceProperties in project admin-console-beta by connexta.

the class LdapServiceCommons method getLdapConfigurations.

public ListField<LdapConfigurationField> getLdapConfigurations(ConfiguratorFactory configuratorFactory) {
    List<LdapConfigurationField> ldapLoginConfigs = new LdapClaimsHandlerServiceProperties(configuratorFactory).getLdapClaimsHandlerManagedServices().values().stream().map(this::ldapLoginServiceToLdapConfiguration).collect(Collectors.toList());
    List<LdapConfigurationField> ldapClaimsHandlerConfigs = new LdapClaimsHandlerServiceProperties(configuratorFactory).getLdapClaimsHandlerManagedServices().values().stream().map(this::ldapClaimsHandlerServiceToLdapConfig).collect(Collectors.toList());
    List<LdapConfigurationField> configs = Stream.concat(ldapLoginConfigs.stream(), ldapClaimsHandlerConfigs.stream()).collect(Collectors.toList());
    configs.stream().forEach(config -> config.bindUserInfoField().password("*******"));
    return new ListFieldImpl<>(LdapConfigurationField.class).addAll(configs);
}
Also used : LdapClaimsHandlerServiceProperties(org.codice.ddf.admin.security.common.services.LdapClaimsHandlerServiceProperties) LdapConfigurationField(org.codice.ddf.admin.ldap.fields.config.LdapConfigurationField)

Aggregations

LdapConfigurationField (org.codice.ddf.admin.ldap.fields.config.LdapConfigurationField)2 LdapClaimsHandlerServiceProperties (org.codice.ddf.admin.security.common.services.LdapClaimsHandlerServiceProperties)2 LdapLoginServiceProperties (org.codice.ddf.admin.security.common.services.LdapLoginServiceProperties)1