You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "aldettinger (via GitHub)" <gi...@apache.org> on 2023/09/15 15:59:16 UTC
[GitHub] [camel-quarkus] aldettinger commented on a diff in pull request #5310: Updates to LDAP tests and usage docs
aldettinger commented on code in PR #5310:
URL: https://github.com/apache/camel-quarkus/pull/5310#discussion_r1327502993
##########
integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java:
##########
@@ -62,43 +70,43 @@ public class LdapResource {
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void configure(Map<String, String> options) throws Exception {
- String host = options.get("host");
- String port = options.get("port");
- boolean useSSL = Boolean.valueOf(options.get("ssl"));
- String trustStoreFilename = options.get("trustStore");
- String trustStorePassword = options.get("trustStorePassword");
-
- DirContext dirContext = createLdapContext(host, port, useSSL, trustStoreFilename, trustStorePassword);
- camelContext.getRegistry().bind("ldapserver", dirContext);
+ ldapHost = options.get("host");
+ ldapPort = options.get("port");
+ useSSL = Boolean.valueOf(options.get("ssl"));
+ trustStoreFilename = options.get("trustStore");
+ trustStorePassword = options.get("trustStorePassword");
}
@Path("/search")
@GET
@Produces(MediaType.APPLICATION_JSON)
- public Response search(@QueryParam("q") String filter) throws Exception {
- ProducerTemplate producer = camelContext.createProducerTemplate();
- List<SearchResult> results = producer.requestBody("direct:start", filter, List.class);
- return Response.ok(convertSearchResults(results)).build();
+ public Response search(@QueryParam("q") String q) throws Exception {
Review Comment:
This `q` param seems mysterious. Could we find a better name ? Or maybe `q` is a kind of LDAP notion ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org