use of com.sequenceiq.freeipa.ldap.LdapConfig in project cloudbreak by hortonworks.
the class LdapConfigV1Service method convertMinimalLdapConfigRequestToLdapConfig.
private LdapConfig convertMinimalLdapConfigRequestToLdapConfig(MinimalLdapConfigRequest minimalLdapConfigRequest) {
LdapConfig config = new LdapConfig();
config.setBindDn(minimalLdapConfigRequest.getBindDn());
config.setBindPassword(minimalLdapConfigRequest.getBindPassword());
config.setServerHost(minimalLdapConfigRequest.getHost());
config.setServerPort(minimalLdapConfigRequest.getPort());
config.setProtocol(minimalLdapConfigRequest.getProtocol());
return config;
}
use of com.sequenceiq.freeipa.ldap.LdapConfig in project cloudbreak by hortonworks.
the class LdapConfigV1Service method testConnection.
public TestLdapConfigResponse testConnection(TestLdapConfigRequest testLdapConfigRequest) {
LdapConfig ldapConfig = null;
if (testLdapConfigRequest.getLdap() != null) {
ldapConfig = convertMinimalLdapConfigRequestToLdapConfig(testLdapConfigRequest.getLdap());
}
String result = ldapConfigService.testConnection(testLdapConfigRequest.getEnvironmentCrn(), ldapConfig);
TestLdapConfigResponse testLdapConfigResponse = new TestLdapConfigResponse();
testLdapConfigResponse.setResult(result);
return testLdapConfigResponse;
}
use of com.sequenceiq.freeipa.ldap.LdapConfig in project cloudbreak by hortonworks.
the class LdapConfigV1Service method post.
public DescribeLdapConfigResponse post(CreateLdapConfigRequest createLdapConfigRequest) {
LdapConfig ldapConfig = convertCreateLdapConfigRequest(createLdapConfigRequest);
ldapConfig = ldapConfigService.createLdapConfig(ldapConfig);
return convertLdapConfigToDescribeLdapConfigResponse(ldapConfig);
}
Aggregations