use of org.codice.ddf.admin.ldap.fields.query.LdapRecommendedSettingsField in project admin-console-beta by connexta.
the class LdapRecommendedSettings method performFunction.
@Override
public LdapRecommendedSettingsField performFunction() {
LdapConnectionAttempt connectionAttempt = utils.bindUserToLdapConnection(conn, creds);
addResultMessages(connectionAttempt.messages());
if (!connectionAttempt.connection().isPresent()) {
return null;
}
ServerGuesser guesser = ServerGuesser.buildGuesser(ldapType.getValue(), connectionAttempt.connection().get());
return new LdapRecommendedSettingsField().userDns(guesser.getUserBaseChoices()).groupDns(guesser.getGroupBaseChoices()).userNameAttributes(guesser.getUserNameAttribute()).groupObjectClasses(guesser.getGroupObjectClass()).groupAttributesHoldingMember(guesser.getGroupAttributeHoldingMember()).memberAttributesReferencedInGroup(guesser.getMemberAttributeReferencedInGroup()).queryBases(guesser.getBaseContexts());
}
Aggregations