|
Frankly, I’m not too much of an expert on NTLM authentication either, but I believe it uses your windows NT attributes. When I view our site using IE I do not get prompted for my username or password. I believe IE simply provides my NT authentication in the background. However, when I view my site using Firefox I do get a box prompting me for a username and password. I’m guessing it’s due to Firefox not having access to my NT authentication on my computer.
I thought using the setAuthentication method would work since all firefox needs is a username and password, but that has not worked for me. The code below does work as expected using HtmlUnit.
As far as the actual addNTLMCredentials method, I pass in a null and -1 to be for any domain on any port. Not sure if that is how I should be doing it or not, but it works fine. Looking at the API for DefaultCredentialsProvider in the HtmlUnit docs will be helpful.
Joe Athman -----Original Message-----
I would like to use jWebUnit, however I can’t figure out how to use NTLM authentication. HtmlUnit supports this. Using HtmlUnit I would write something like:
final WebClient webClient = new WebClient(); DefaultCredentialsProvider creds = new DefaultCredentialsProvider(); creds.addNTLMCredentials("userName", "password", null, -1, "myComputerName", "myDomain"); webClient.setCredentialsProvider(creds); webClient.setRedirectEnabled(true); URL url = "" URL("http://myappUrl.net/");
Using just the normal setAuthorization method does not work for me. Any ideas?
Joe Athman
============================================================================== This communication, together with any attachments hereto or links contained herein, is for the sole use of the intended recipient(s) and may contain information that is confidential or legally protected. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, dissemination, distribution or use of this communication is STRICTLY PROHIBITED. If you have received this communication in error, please notify the sender immediately by return e-mail message and delete the original and all copies of the communication, along with any attachments hereto or links herein, from your system. ============================================================================== The St. Paul Travelers e-mail system made this annotation on 09/06/06, 10:24:27. |
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
