lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: Adding authentication Token to the CommonsHttpSolrServer
Date Sun, 15 Mar 2009 07:22:04 GMT
On Fri, Mar 13, 2009 at 12:03 AM, Narayanan, Karthikeyan <
Karthikeyan.Narayanan@gs.com> wrote:

> Hi,
>      We have installed the Solr in Tomcat server and enabled the
> security constraint at the Tomcat level.. We require to pass the
> authentication token(cookie) to the search call that is made using
> CommonsHttpSolrServer. Would like to know how can I add  the token to
> the CommonsHttpSolrServer. Appreciate any idea on this.
>

I took a look at commons-httpclient javadocs. This should work:

Create an instance of HttpState and use the HttpState#addCookie to add your
auth cookie. Then you can create an instance of HttpClient and use
HttpClient#setState method to pass the HttpState object. Finally pass this
HttpClient object to the constructor of CommonsHttpSolrServer.

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message