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

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -