java - Example on using ldap authentication for apache http client to make rest api calls -


can 1 give example on how configure apache http client use ldap authentication instead of basic authentication. basic authentication,following code.

httpclient client = httpclientbuilder.create().build(); httpget = new httpget(get_taskstatus_url);  string authdata = username + ":" + username; string encoded = new sun.misc.base64encoder().encode(authdata                 .getbytes()); get.setheader("content-type", "application/xml"); get.setheader("authorization", "basic " + encoded); get.setheader("accept", "application/xml");  httpresponse cgresponse = client.execute(get); 

what changes need perform in order make ldap authentication instead of basic authentication.

any appreciated. thanks.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -