Re: SSO cookie scenario

Martin Petras <[email protected]>
Newsgroups gmane.comp.jakarta.slide.user
Message-ID <[email protected]>
Hi Bob,
try this solution:

HttpURL httpURL = new HttpURL("http://SERVER/exchange/USER/Inbox/");
NTCredentials ntc = new NTCredentials("USER", "PASSWORD", "HOST","DOMAIN");
WebdavResource wr = new WebdavResource(httpURL, ntc, WebdavResource.ALL,0);

// add cookie
   HttpClient client = webdavResource.getSessionInstance(httpURL);
   HttpState state = client.getState();
   state.addCookie( new Cookie(
        		"servername", 
        		"cookieName", 
        		"cookieValue",
        		"/", 
        		null, 
        		false
        		) );

wr.setFollowRedirects(true);
WebdavResources resources = wr.getChildResources();


Hope this helps
Martin


Bob Damato wrote:
> I'm attempting to use Slide to communicate with an Exchange server. I am
> able to connect and retrieve information using basic auth so I know I'm
> on the right track. The next thing I need to do is integrate our single
> sign on cookie. I have been digging through the Slide javadocs and can't
> seem to figure out exactly how I would attach a cookie to my initial
> request.
>
> Below is some code that is working for me (using basic auth). My goal is
> to remove the NTCredentials piece and replace it with an encrypted
> cookie that the server is already configured to accept for SSO.
>
>
> HttpURL httpURL = new HttpURL("http://SERVER/exchange/USER/Inbox/");
> NTCredentials ntc = new NTCredentials("USER", "PASSWORD", "HOST",
> "DOMAIN");
> WebdavResource wr = new WebdavResource(httpURL, ntc, WebdavResource.ALL,
> 0);
> wr.setFollowRedirects(true);
> WebdavResources resources = wr.getChildResources();
>
> Any ideas how/where I would attach a cookie here?
>
> Thanks!!!
>
>
>
> ________________________________________________________________________
> _____________
> Bob Damato
> Cox Target Media	
> Internet Technology Manager
> Largo, Florida
>
> Our greatest glory is not in never falling, but in rising every time we
> fall.  -- Confucius
>
>
>   


-- 
____________________________________
*/Martin Petráš/*
Java Developer Junior

*/S&K Management Systems, s.r.o./*
Záhradnícka 72, SK-821 08 Bratislava
e-mail: petras /at/ skms.sk <mailto:[email protected]> , www.skms.sk 
<http://www.skms.sk>


<http://www.skms.sk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.