Re: [Httpunit-develop] https and AuthorizationRequiredException
Brought to you by:
russgold
From: Russell G. <rus...@ac...> - 2001-12-11 21:37:23
|
At 12:12 PM 12/11/2001 -0800, Jerome Banks wrote: > I'm trying to convert my tests to https. I think I've > jumped through all the hoops to get SSL to work; > I have the certificate in a truststore, and I can load > access a page with java.net.HttpURLConnection. > However, when I run my httpunit tests, I get an > AuthorizationRequiredException thrown, with a message > "Basic authentication required: realm="weblogic"" > How should I handle this ??? Do I need to configure something else > with httpunit ??? > > I'm running with jsse 1.0.2 and weblogic6.0 sp2, if that is relevant. This message is the equivalent of a dialog box popping up your browser and asking for a username and password. So that's what you have to do. Before calling getResponse, call setAuthorization( username, password ) on your WebConversation. If you provide valid credentials, that should be sufficient. |