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
Post a Comment