Patches item #1554148, was opened at 2006-09-07 16:32
Message generated for change (Comment added) made by sju59
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497984&aid=1554148&group_id=61302
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Release 2.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Joe Athman (sju59)
Assigned to: Julien HENRY (henryju)
Summary: Add Support for NTLM Authentication
Initial Comment:
There were two main pieces to get this working
correctly. First the testContext needs to be aware of
NTLM credentials. I used the
DefaultCredentialsProvider from HtmlUnit.
The second part I hope isn't only needed for myself.
Here's my problem. In our web infrastructure to log on
to applications we first need to go to an internal site
to get a "Security Token" which is basically a cookie.
After we have obtained this cookie we are
authenticated to our application so we can proceed to
our site. It would look like this:
gotoPage("http://internalSecuritySite.com/logon")
// cookie now obtained
gotoPage("http://myapp.com")
However with jWedUnit you can not do this directly. I
tried doing
setBaseUrl("securitySite")
beginAt("/")
setBaseUrl("myapp")
beginAt("/")
but this reintializes the web client which gets rid of
the security token. So I added a check in the beginAt
method to see if a web client has already been created.
If it has, then do not call initWebClient again. This
solved my problem.
I'm attaching a zip file with both an updated
TestContext.java and HtmlUnitDialog.java
Let me know if you have any questions.
jathman1(at)spt.com
----------------------------------------------------------------------
>Comment By: Joe Athman (sju59)
Date: 2006-09-16 03:15
Message:
Logged In: YES
user_id=808844
goToPage using an absolute URL will be a great feature to
have. Thanks!
----------------------------------------------------------------------
Comment By: Julien HENRY (henryju)
Date: 2006-09-15 14:36
Message:
Logged In: YES
user_id=1235926
I have modified beginAt and gotoPage. They now accept
absolute URL starting by "http://", "https://" or "www."
I'm now working on authentication.
----------------------------------------------------------------------
Comment By: Joe Athman (sju59)
Date: 2006-09-08 22:16
Message:
Logged In: YES
user_id=808844
I don't believe you can do:
setBaseURL("securitySite");
beginAt("/");
// cookie now obtained
gotoPage("http://myapp.com");
Because what gotoPage(String) actually does is take in a
relative URL. So if you did the above, the page it would
actually try to go to would be:
securitySitehttp://myapp.com
I saw no way of just saying gotoPage with an absolute URL.
am I missing something?
----------------------------------------------------------------------
Comment By: Julien HENRY (henryju)
Date: 2006-09-07 17:37
Message:
Logged In: YES
user_id=1235926
Concerning the second point, setBaseURL is only used to make
things easiers when you use intensivly beginAt.
In your case, why not use :
setBaseURL("securitySite");
beginAt("/");
// cookie now obtained
gotoPage("http://myapp.com");
??
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497984&aid=1554148&group_id=61302
-------------------------------------------------------------------------
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-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development